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

            pub mod audio_effect_instance {
                use super::*;
                # [doc = "`core class AudioEffectInstance` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AudioEffectInstance { } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectInstance { } unsafe impl GodotObject for AudioEffectInstance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectInstance" } } impl std :: ops :: Deref for AudioEffectInstance { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectInstance { }
            }
            pub use crate::generated::audio_effect_instance::AudioEffectInstance;
            
            pub mod rich_text_effect {
                use super::*;
                # [doc = "`core class RichTextEffect` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RichTextEffect" } } impl std :: ops :: Deref for RichTextEffect { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextEffect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: object :: Object > for RichTextEffect { } impl Instanciable for RichTextEffect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::rich_text_effect::RichTextEffect;
            
            pub mod split_container {
                use super::*;
                # [doc = "`core class SplitContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SplitContainer { pub const DRAGGER_HIDDEN : i64 = 1i64 ; pub const DRAGGER_HIDDEN_COLLAPSED : i64 = 2i64 ; pub const DRAGGER_VISIBLE : i64 = 0i64 ; } impl SplitContainer { # [doc = "Clamps the [member 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Determines the dragger's visibility. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: split_container :: DraggerVisibility (ret) } } # [doc = "The initial offset of the splitting between the two [Control]s, with `0` being at the end of the first [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area of the first [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area of the first [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , collapsed) ; } } # [doc = "Determines the dragger's visibility. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The initial offset of the splitting between the two [Control]s, with `0` being at the end of the first [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SplitContainer { } unsafe impl GodotObject for SplitContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SplitContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for SplitContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for SplitContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for SplitContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for SplitContainer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "get_dragger_visibility\u{0}" . as_ptr () as * const c_char) ; table . get_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_split_offset\u{0}" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\u{0}" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\u{0}" . as_ptr () as * const c_char) ; table . set_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_dragger_visibility\u{0}" . as_ptr () as * const c_char) ; table . set_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_split_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::split_container::SplitContainer;
            
            pub mod visual_script_math_constant {
                use super::*;
                # [doc = "`core class VisualScriptMathConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptMathConstant { pub const MATH_CONSTANT_E : i64 = 4i64 ; pub const MATH_CONSTANT_HALF_PI : i64 = 2i64 ; pub const MATH_CONSTANT_INF : i64 = 6i64 ; pub const MATH_CONSTANT_MAX : i64 = 8i64 ; pub const MATH_CONSTANT_NAN : i64 = 7i64 ; pub const MATH_CONSTANT_ONE : i64 = 0i64 ; pub const MATH_CONSTANT_PI : i64 = 1i64 ; pub const MATH_CONSTANT_SQRT2 : i64 = 5i64 ; pub const MATH_CONSTANT_TAU : i64 = 3i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_math_constant :: MathConstant (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , which) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptMathConstant { } unsafe impl GodotObject for VisualScriptMathConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptMathConstant" } } impl std :: ops :: Deref for VisualScriptMathConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptMathConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptMathConstant { } impl Instanciable for VisualScriptMathConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_math_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_math_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_math_constant::VisualScriptMathConstant;
            
            pub mod visual_shader_node_scalar_switch {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarSwitch` inherits `VisualShaderNodeSwitch` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSwitch" } } impl std :: ops :: Deref for VisualShaderNodeScalarSwitch { type Target = crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarSwitch { } impl Instanciable for VisualShaderNodeScalarSwitch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_switch::VisualShaderNodeScalarSwitch;
            
            pub mod world {
                use super::*;
                # [doc = "`core class World` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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. Must only be accessed from within `_physics_process(delta)`."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The World's [Environment]."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The World's fallback_environment will be used if the World's [Environment] fails or is missing."] # [doc = ""] # [inline] pub fn fallback_environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_fallback_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The World's [Environment]."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } # [doc = "The World's fallback_environment will be used if the World's [Environment] fails or is missing."] # [doc = ""] # [inline] pub fn set_fallback_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_fallback_environment ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World" } } impl std :: ops :: Deref for World { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for World { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for World { } unsafe impl SubClass < crate :: generated :: object :: Object > for World { } impl Instanciable for World { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\u{0}" . as_ptr () as * const c_char) ; table . get_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_environment\u{0}" . as_ptr () as * const c_char) ; table . get_scenario = (gd_api . godot_method_bind_get_method) (class_name , "get_scenario\u{0}" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\u{0}" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\u{0}" . as_ptr () as * const c_char) ; table . set_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback_environment\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::world::World;
            
            pub mod rich_text_label {
                use super::*;
                # [doc = "`core class RichTextLabel` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RichTextLabel { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const ITEM_ALIGN : i64 = 8i64 ; pub const ITEM_COLOR : i64 = 5i64 ; pub const ITEM_CUSTOMFX : i64 = 18i64 ; pub const ITEM_FADE : i64 = 12i64 ; pub const ITEM_FONT : i64 = 4i64 ; pub const ITEM_FRAME : i64 = 0i64 ; pub const ITEM_IMAGE : i64 = 2i64 ; pub const ITEM_INDENT : i64 = 9i64 ; pub const ITEM_LIST : i64 = 10i64 ; pub const ITEM_META : i64 = 17i64 ; pub const ITEM_NEWLINE : i64 = 3i64 ; pub const ITEM_RAINBOW : i64 = 16i64 ; pub const ITEM_SHAKE : i64 = 13i64 ; pub const ITEM_STRIKETHROUGH : i64 = 7i64 ; pub const ITEM_TABLE : i64 = 11i64 ; pub const ITEM_TEXT : i64 = 1i64 ; pub const ITEM_TORNADO : i64 = 15i64 ; pub const ITEM_UNDERLINE : i64 = 6i64 ; pub const ITEM_WAVE : i64 = 14i64 ; pub const LIST_DOTS : i64 = 2i64 ; pub const LIST_LETTERS : i64 = 1i64 ; pub const LIST_NUMBERS : i64 = 0i64 ; } 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 , thread_access :: 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`"] # [doc = ""] # [inline] pub fn add_image (& self , image : impl AsArg < crate :: generated :: texture :: Texture > , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_image ; let ret = crate :: icalls :: icallptr_void_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , width , height) ; } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Parses `bbcode` and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Clears the tag stack and sets [member 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 :: icallptr_void (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 `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The range of characters to display, as a [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 [member visible_characters] based on current [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 tab_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_tab_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the vertical scrollbar."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Installs a custom effect. `effect` should be a valid [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 :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , effect . owned_to_variant ()) ; } } # [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] in [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label underlines meta tags such as `[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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label uses 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses `bbcode` successfully."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Parses BBCode parameter `expressions` into a dictionary."] # [doc = ""] # [inline] pub fn parse_expressions_for_values (& self , expressions : StringArray) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_expressions_for_values ; let ret = crate :: icalls :: icallptr_dict_strarr (method_bind , self . this . sys () . as_ptr () , expressions) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds an `[align]` tag based on the given `align` value. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "Adds a `[font]` tag with a bold font to the tag stack. This is the same as adding a `**` tag if not currently in a `[i]` 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[cell]` tag to the tag stack. Must be inside a `[table]` tag. See [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds a `[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 :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_font ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Adds an `[indent]` tag to the tag stack. Multiplies `level` by current [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , level) ; } } # [doc = "Adds a `[font]` tag with a italics font to the tag stack. This is the same as adding a `[i]` 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[list]` tag to the tag stack. Similar to the BBCodes `[ol]` or `[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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [doc = "Adds a `[meta]` tag to the tag stack. Similar to the BBCode `[url=something]{text}[/url]`, but supports non-[String] 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 :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant ()) ; } } # [doc = "Adds a `[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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , columns) ; } } # [doc = "Adds a `[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 :: icallptr_void (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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [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 `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method 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 :: icallptr_void_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] in [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the label underlines meta tags such as `[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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = "The range of characters to display, as a [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 [member visible_characters] based on current [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , percent_visible) ; } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , follow) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , spaces) ; } } # [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 :: icallptr_void_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , column , expand , ratio) ; } } # [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 [member 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the label uses 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextLabel { } unsafe impl GodotObject for RichTextLabel { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RichTextLabel { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextLabel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: node :: Node > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: object :: Object > for RichTextLabel { } impl Instanciable for RichTextLabel { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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_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_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 , 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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_text = (gd_api . godot_method_bind_get_method) (class_name , "add_text\u{0}" . as_ptr () as * const c_char) ; table . append_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "append_bbcode\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "get_bbcode\u{0}" . as_ptr () as * const c_char) ; table . get_content_height = (gd_api . godot_method_bind_get_method) (class_name , "get_content_height\u{0}" . as_ptr () as * const c_char) ; table . get_effects = (gd_api . godot_method_bind_get_method) (class_name , "get_effects\u{0}" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\u{0}" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\u{0}" . as_ptr () as * const c_char) ; table . get_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_size\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\u{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\u{0}" . as_ptr () as * const c_char) ; table . install_effect = (gd_api . godot_method_bind_get_method) (class_name , "install_effect\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_meta_underlined = (gd_api . godot_method_bind_get_method) (class_name , "is_meta_underlined\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_active\u{0}" . as_ptr () as * const c_char) ; table . is_scroll_following = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_following\u{0}" . as_ptr () as * const c_char) ; table . is_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_using_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "is_using_bbcode\u{0}" . as_ptr () as * const c_char) ; table . newline = (gd_api . godot_method_bind_get_method) (class_name , "newline\u{0}" . as_ptr () as * const c_char) ; table . parse_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "parse_bbcode\u{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\u{0}" . as_ptr () as * const c_char) ; table . pop = (gd_api . godot_method_bind_get_method) (class_name , "pop\u{0}" . as_ptr () as * const c_char) ; table . push_align = (gd_api . godot_method_bind_get_method) (class_name , "push_align\u{0}" . as_ptr () as * const c_char) ; table . push_bold = (gd_api . godot_method_bind_get_method) (class_name , "push_bold\u{0}" . as_ptr () as * const c_char) ; table . push_bold_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_bold_italics\u{0}" . as_ptr () as * const c_char) ; table . push_cell = (gd_api . godot_method_bind_get_method) (class_name , "push_cell\u{0}" . as_ptr () as * const c_char) ; table . push_color = (gd_api . godot_method_bind_get_method) (class_name , "push_color\u{0}" . as_ptr () as * const c_char) ; table . push_font = (gd_api . godot_method_bind_get_method) (class_name , "push_font\u{0}" . as_ptr () as * const c_char) ; table . push_indent = (gd_api . godot_method_bind_get_method) (class_name , "push_indent\u{0}" . as_ptr () as * const c_char) ; table . push_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_italics\u{0}" . as_ptr () as * const c_char) ; table . push_list = (gd_api . godot_method_bind_get_method) (class_name , "push_list\u{0}" . as_ptr () as * const c_char) ; table . push_meta = (gd_api . godot_method_bind_get_method) (class_name , "push_meta\u{0}" . as_ptr () as * const c_char) ; table . push_mono = (gd_api . godot_method_bind_get_method) (class_name , "push_mono\u{0}" . as_ptr () as * const c_char) ; table . push_normal = (gd_api . godot_method_bind_get_method) (class_name , "push_normal\u{0}" . as_ptr () as * const c_char) ; table . push_strikethrough = (gd_api . godot_method_bind_get_method) (class_name , "push_strikethrough\u{0}" . as_ptr () as * const c_char) ; table . push_table = (gd_api . godot_method_bind_get_method) (class_name , "push_table\u{0}" . as_ptr () as * const c_char) ; table . push_underline = (gd_api . godot_method_bind_get_method) (class_name , "push_underline\u{0}" . as_ptr () as * const c_char) ; table . remove_line = (gd_api . godot_method_bind_get_method) (class_name , "remove_line\u{0}" . as_ptr () as * const c_char) ; table . scroll_to_line = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_line\u{0}" . as_ptr () as * const c_char) ; table . set_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_bbcode\u{0}" . as_ptr () as * const c_char) ; table . set_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_effects\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_meta_underline = (gd_api . godot_method_bind_get_method) (class_name , "set_meta_underline\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\u{0}" . as_ptr () as * const c_char) ; table . set_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_active\u{0}" . as_ptr () as * const c_char) ; table . set_scroll_follow = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_follow\u{0}" . as_ptr () as * const c_char) ; table . set_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selection_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_use_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_use_bbcode\u{0}" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::rich_text_label::RichTextLabel;
            
            pub mod editor_resource_preview_generator {
                use super::*;
                # [doc = "`tools class EditorResourcePreviewGenerator` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorResourcePreviewGenerator { } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePreviewGenerator { } unsafe impl GodotObject for EditorResourcePreviewGenerator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorResourcePreviewGenerator" } } impl std :: ops :: Deref for EditorResourcePreviewGenerator { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreviewGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorResourcePreviewGenerator { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::editor_resource_preview_generator::EditorResourcePreviewGenerator;
            
            pub mod visual_script_basic_type_constant {
                use super::*;
                # [doc = "`core class VisualScriptBasicTypeConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , name) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptBasicTypeConstant" } } impl std :: ops :: Deref for VisualScriptBasicTypeConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptBasicTypeConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptBasicTypeConstant { } impl Instanciable for VisualScriptBasicTypeConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_basic_type_constant::VisualScriptBasicTypeConstant;
            
            pub mod multi_mesh_instance {
                use super::*;
                # [doc = "`core class MultiMeshInstance` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] resource that will be used and shared among all instances of the [MultiMeshInstance]."] # [doc = ""] # [inline] pub fn multimesh (& self) -> Option < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstanceMethodTable :: get (get_api ()) . get_multimesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance]."] # [doc = ""] # [inline] pub fn set_multimesh (& self , multimesh : impl AsArg < crate :: generated :: multi_mesh :: MultiMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstanceMethodTable :: get (get_api ()) . set_multimesh ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MultiMeshInstance { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiMeshInstance { } impl Instanciable for MultiMeshInstance { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "set_multimesh\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::multi_mesh_instance::MultiMeshInstance;
            
            pub mod sky {
                use super::*;
                # [doc = "`core class Sky` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Sky { pub const RADIANCE_SIZE_1024 : i64 = 5i64 ; pub const RADIANCE_SIZE_128 : i64 = 2i64 ; pub const RADIANCE_SIZE_2048 : i64 = 6i64 ; pub const RADIANCE_SIZE_256 : i64 = 3i64 ; pub const RADIANCE_SIZE_32 : i64 = 0i64 ; pub const RADIANCE_SIZE_512 : i64 = 4i64 ; pub const RADIANCE_SIZE_64 : i64 = 1i64 ; pub const RADIANCE_SIZE_MAX : i64 = 7i64 ; } impl Sky { # [doc = "The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.\nSee [enum RadianceSize] constants for values.\n**Note:** Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: sky :: RadianceSize (ret) } } # [doc = "The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.\nSee [enum RadianceSize] constants for values.\n**Note:** Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sky { } unsafe impl GodotObject for Sky { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Sky" } } impl std :: ops :: Deref for Sky { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Sky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Sky { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_radiance_size = (gd_api . godot_method_bind_get_method) (class_name , "set_radiance_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sky::Sky;
            
            pub mod panel {
                use super::*;
                # [doc = "`core class Panel` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Panel { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Panel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Panel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Panel { } unsafe impl SubClass < crate :: generated :: node :: Node > for Panel { } unsafe impl SubClass < crate :: generated :: object :: Object > for Panel { } impl Instanciable for Panel { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::panel::Panel;
            
            pub mod kinematic_body {
                use super::*;
                # [doc = "`core class KinematicBody` inherits `PhysicsBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "Lock the body's Z axis movement."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; ret as _ } } # [doc = "Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If the body is at least this close to another body, this body will consider them to be colliding."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [KinematicCollision], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1)."] # [doc = ""] # [inline] pub fn get_slide_collision (& self , slide_idx : i64) -> Option < Ref < crate :: generated :: kinematic_collision :: KinematicCollision , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_slide_collision ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , slide_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: kinematic_collision :: KinematicCollision , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on the ceiling. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on the floor. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on a wall. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Moves the body along the vector `rel_vec`. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.\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 :: kinematic_collision :: KinematicCollision , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . move_and_collide ; let ret = crate :: icalls :: icallptr_obj_vec3_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , rel_vec , infinite_inertia , exclude_raycast_shapes , test_only) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: kinematic_collision :: KinematicCollision , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.\nThis method should be used in [method Node._physics_process] (or in a method called by [method 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 [method move_and_collide], you should [i]not[/i] 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] nodes, but it won't also detect any collisions with them. If `false`, it will interact with [RigidBody] nodes like with [StaticBody].\nReturns the `linear_velocity` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].\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 :: icallptr_vec3_vec3_vec3_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , up_direction , stop_on_slope , max_slides , floor_max_angle , infinite_inertia) ; mem :: transmute (ret) } } # [doc = "Moves the body while keeping it attached to slopes. Similar to [method 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 [method 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 :: icallptr_vec3_vec3_vec3_vec3_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , snap , up_direction , stop_on_slope , max_slides , floor_max_angle , infinite_inertia) ; mem :: transmute (ret) } } # [doc = "Lock the body's Z axis movement."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , axis , lock) ; } } # [doc = "If the body is at least this close to another body, this body will consider them to be colliding."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixels) ; } } # [doc = "Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector `rel_vec`. Returns `true` if a collision would occur.\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 :: icallptr_bool_trans_vec3_bool (method_bind , self . this . sys () . as_ptr () , from , rel_vec , infinite_inertia) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicBody { } unsafe impl GodotObject for KinematicBody { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for KinematicBody { type Target = crate :: generated :: physics_body :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for KinematicBody { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for KinematicBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for KinematicBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for KinematicBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for KinematicBody { } impl Instanciable for KinematicBody { # [inline] fn construct () -> Ref < Self , thread_access :: 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_normal : * mut sys :: godot_method_bind , pub get_floor_velocity : * 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 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_safe_margin : * 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_normal : 0 as * mut sys :: godot_method_bind , get_floor_velocity : 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 , 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_safe_margin : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_floor_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_normal\u{0}" . as_ptr () as * const c_char) ; table . get_floor_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_safe_margin\u{0}" . as_ptr () as * const c_char) ; table . get_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_collision\u{0}" . as_ptr () as * const c_char) ; table . get_slide_count = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_count\u{0}" . as_ptr () as * const c_char) ; table . is_on_ceiling = (gd_api . godot_method_bind_get_method) (class_name , "is_on_ceiling\u{0}" . as_ptr () as * const c_char) ; table . is_on_floor = (gd_api . godot_method_bind_get_method) (class_name , "is_on_floor\u{0}" . as_ptr () as * const c_char) ; table . is_on_wall = (gd_api . godot_method_bind_get_method) (class_name , "is_on_wall\u{0}" . as_ptr () as * const c_char) ; table . move_and_collide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_collide\u{0}" . as_ptr () as * const c_char) ; table . move_and_slide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\u{0}" . as_ptr () as * const c_char) ; table . set_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_safe_margin\u{0}" . as_ptr () as * const c_char) ; table . test_move = (gd_api . godot_method_bind_get_method) (class_name , "test_move\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::kinematic_body::KinematicBody;
            
            pub mod audio_effect_delay {
                use super::*;
                # [doc = "`core class AudioEffectDelay` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectDelay { } unsafe impl GodotObject for AudioEffectDelay { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectDelay" } } impl std :: ops :: Deref for AudioEffectDelay { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectDelay { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectDelay { } impl Instanciable for AudioEffectDelay { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_lowpass\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_pan\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_pan\u{0}" . as_ptr () as * const c_char) ; table . is_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "is_feedback_active\u{0}" . as_ptr () as * const c_char) ; table . is_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap1_active\u{0}" . as_ptr () as * const c_char) ; table . is_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap2_active\u{0}" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\u{0}" . as_ptr () as * const c_char) ; table . set_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_active\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_lowpass\u{0}" . as_ptr () as * const c_char) ; table . set_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_active\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_pan\u{0}" . as_ptr () as * const c_char) ; table . set_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_active\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_pan\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_delay::AudioEffectDelay;
            
            pub mod canvas_item_material {
                use super::*;
                # [doc = "`core class CanvasItemMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CanvasItemMaterial { pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_PREMULT_ALPHA : i64 = 4i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const LIGHT_MODE_LIGHT_ONLY : i64 = 2i64 ; pub const LIGHT_MODE_NORMAL : i64 = 0i64 ; pub const LIGHT_MODE_UNSHADED : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: canvas_item_material :: BlendMode (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: canvas_item_material :: LightMode (ret) } } # [doc = "The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , blend_mode) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , light_mode) ; } } # [doc = "The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _loop) ; } } # [doc = "The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , particles_anim) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasItemMaterial { } unsafe impl GodotObject for CanvasItemMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CanvasItemMaterial" } } impl std :: ops :: Deref for CanvasItemMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasItemMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasItemMaterial { } impl Instanciable for CanvasItemMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mode\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_animation\u{0}" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\u{0}" . as_ptr () as * const c_char) ; table . set_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mode\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_animation\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::canvas_item_material::CanvasItemMaterial;
            
            pub mod visual_script_function {
                use super::*;
                # [doc = "`core class VisualScriptFunction` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunction" } } impl std :: ops :: Deref for VisualScriptFunction { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunction { } impl Instanciable for VisualScriptFunction { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_function::VisualScriptFunction;
            
            pub mod visual_shader_node_scalar_derivative_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarDerivativeFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_scalar_derivative_func :: Function (ret) } } # [doc = "The derivative type. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarDerivativeFunc { } unsafe impl GodotObject for VisualShaderNodeScalarDerivativeFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarDerivativeFunc" } } impl std :: ops :: Deref for VisualShaderNodeScalarDerivativeFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarDerivativeFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarDerivativeFunc { } impl Instanciable for VisualShaderNodeScalarDerivativeFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_derivative_func::VisualShaderNodeScalarDerivativeFunc;
            
            pub mod arvr_interface {
                use super::*;
                # [doc = "`core class ARVRInterface` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRInterface { pub const ARVR_AR : i64 = 4i64 ; pub const ARVR_EXCESSIVE_MOTION : i64 = 1i64 ; pub const ARVR_EXTERNAL : i64 = 8i64 ; pub const ARVR_INSUFFICIENT_FEATURES : i64 = 2i64 ; pub const ARVR_MONO : i64 = 1i64 ; pub const ARVR_NONE : i64 = 0i64 ; pub const ARVR_NORMAL_TRACKING : i64 = 0i64 ; pub const ARVR_NOT_TRACKING : i64 = 4i64 ; pub const ARVR_STEREO : i64 = 2i64 ; pub const ARVR_UNKNOWN_TRACKING : i64 = 3i64 ; pub const EYE_LEFT : i64 = 1i64 ; pub const EYE_MONO : i64 = 0i64 ; pub const EYE_RIGHT : i64 = 2i64 ; } 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a combination of [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: arvr_interface :: TrackingStatus (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , initialized) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterface { } unsafe impl GodotObject for ARVRInterface { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterface" } } impl std :: ops :: Deref for ARVRInterface { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterface { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_capabilities = (gd_api . godot_method_bind_get_method) (class_name , "get_capabilities\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_render_targetsize = (gd_api . godot_method_bind_get_method) (class_name , "get_render_targetsize\u{0}" . as_ptr () as * const c_char) ; table . get_tracking_status = (gd_api . godot_method_bind_get_method) (class_name , "get_tracking_status\u{0}" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\u{0}" . as_ptr () as * const c_char) ; table . is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "is_initialized\u{0}" . as_ptr () as * const c_char) ; table . is_primary = (gd_api . godot_method_bind_get_method) (class_name , "is_primary\u{0}" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "set_is_initialized\u{0}" . as_ptr () as * const c_char) ; table . set_is_primary = (gd_api . godot_method_bind_get_method) (class_name , "set_is_primary\u{0}" . as_ptr () as * const c_char) ; table . uninitialize = (gd_api . godot_method_bind_get_method) (class_name , "uninitialize\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_interface::ARVRInterface;
            
            pub mod audio_effect_stereo_enhance {
                use super::*;
                # [doc = "`core class AudioEffectStereoEnhance` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectStereoEnhance { } unsafe impl GodotObject for AudioEffectStereoEnhance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectStereoEnhance" } } impl std :: ops :: Deref for AudioEffectStereoEnhance { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectStereoEnhance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectStereoEnhance { } impl Instanciable for AudioEffectStereoEnhance { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_surround = (gd_api . godot_method_bind_get_method) (class_name , "get_surround\u{0}" . as_ptr () as * const c_char) ; table . get_time_pullout = (gd_api . godot_method_bind_get_method) (class_name , "get_time_pullout\u{0}" . as_ptr () as * const c_char) ; table . set_pan_pullout = (gd_api . godot_method_bind_get_method) (class_name , "set_pan_pullout\u{0}" . as_ptr () as * const c_char) ; table . set_surround = (gd_api . godot_method_bind_get_method) (class_name , "set_surround\u{0}" . as_ptr () as * const c_char) ; table . set_time_pullout = (gd_api . godot_method_bind_get_method) (class_name , "set_time_pullout\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_stereo_enhance::AudioEffectStereoEnhance;
            
            pub mod input_event_joypad_button {
                use super::*;
                # [doc = "`core class InputEventJoypadButton` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Represents the pressure the user puts on the button with his 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Button identifier. One of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "Represents the pressure the user puts on the button with his 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pressure) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventJoypadButton { } unsafe impl GodotObject for InputEventJoypadButton { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventJoypadButton" } } impl std :: ops :: Deref for InputEventJoypadButton { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventJoypadButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventJoypadButton { } impl Instanciable for InputEventJoypadButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\u{0}" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_joypad_button::InputEventJoypadButton;
            
            pub mod segment_shape_2d {
                use super::*;
                # [doc = "`core class SegmentShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , b) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SegmentShape2D { } unsafe impl GodotObject for SegmentShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SegmentShape2D" } } impl std :: ops :: Deref for SegmentShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SegmentShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for SegmentShape2D { } impl Instanciable for SegmentShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_b = (gd_api . godot_method_bind_get_method) (class_name , "get_b\u{0}" . as_ptr () as * const c_char) ; table . set_a = (gd_api . godot_method_bind_get_method) (class_name , "set_a\u{0}" . as_ptr () as * const c_char) ; table . set_b = (gd_api . godot_method_bind_get_method) (class_name , "set_b\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::segment_shape_2d::SegmentShape2D;
            
            pub mod animation_node {
                use super::*;
                # [doc = "`core class AnimationNode` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNode { pub const FILTER_BLEND : i64 = 3i64 ; pub const FILTER_IGNORE : i64 = 0i64 ; pub const FILTER_PASS : i64 = 1i64 ; pub const FILTER_STOP : i64 = 2i64 ; } 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 , thread_access :: 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]."] # [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 :: icallptr_void_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]). 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 :: icallptr_void_str_f64_f64_bool_f64 (method_bind , self . this . sys () . as_ptr () , animation . into () , time , delta , seeked , blend) ; } } # [doc = "Blend an input. This is only useful for nodes created for an [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 [enum 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 :: icallptr_f64_i64_f64_bool_f64_i64_bool (method_bind , self . this . sys () . as_ptr () , input_index , time , seek , blend , filter , optimize) ; ret as _ } } # [doc = "Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [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 :: animation_node :: 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 :: icallptr_f64_str_obj_f64_bool_f64_i64_bool (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , time , seek , blend , filter , optimize) ; ret as _ } } # [doc = "Amount of inputs in this node, only useful for nodes that go into [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , input) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` whether a 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 :: icallptr_bool_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_nodepath_bool (method_bind , self . this . sys () . as_ptr () , path . into () , enable) ; } } # [doc = "Sets a custom parameter. These are used as local storage, 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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNode" } } impl std :: ops :: Deref for AnimationNode { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNode { } impl Instanciable for AnimationNode { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . blend_animation = (gd_api . godot_method_bind_get_method) (class_name , "blend_animation\u{0}" . as_ptr () as * const c_char) ; table . blend_input = (gd_api . godot_method_bind_get_method) (class_name , "blend_input\u{0}" . as_ptr () as * const c_char) ; table . blend_node = (gd_api . godot_method_bind_get_method) (class_name , "blend_node\u{0}" . as_ptr () as * const c_char) ; table . get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_input_count\u{0}" . as_ptr () as * const c_char) ; table . get_input_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_name\u{0}" . as_ptr () as * const c_char) ; table . get_parameter = (gd_api . godot_method_bind_get_method) (class_name , "get_parameter\u{0}" . as_ptr () as * const c_char) ; table . is_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_filter_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_path_filtered = (gd_api . godot_method_bind_get_method) (class_name , "is_path_filtered\u{0}" . as_ptr () as * const c_char) ; table . remove_input = (gd_api . godot_method_bind_get_method) (class_name , "remove_input\u{0}" . as_ptr () as * const c_char) ; table . set_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_path\u{0}" . as_ptr () as * const c_char) ; table . set_parameter = (gd_api . godot_method_bind_get_method) (class_name , "set_parameter\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node::AnimationNode;
            
            pub mod progress_bar {
                use super::*;
                # [doc = "`core class ProgressBar` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProgressBar { } unsafe impl GodotObject for ProgressBar { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ProgressBar { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProgressBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for ProgressBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for ProgressBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ProgressBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for ProgressBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProgressBar { } impl Instanciable for ProgressBar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::progress_bar::ProgressBar;
            
            pub mod navigation_mesh {
                use super::*;
                # [doc = "`core class NavigationMesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NavigationMesh { pub const PARSED_GEOMETRY_BOTH : i64 = 2i64 ; pub const PARSED_GEOMETRY_MESH_INSTANCES : i64 = 0i64 ; pub const PARSED_GEOMETRY_STATIC_COLLIDERS : i64 = 1i64 ; pub const SAMPLE_PARTITION_LAYERS : i64 = 2i64 ; pub const SAMPLE_PARTITION_MONOTONE : i64 = 1i64 ; pub const SAMPLE_PARTITION_WATERSHED : i64 = 0i64 ; } 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 , thread_access :: 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 = ""] # [doc = ""] # [inline] pub fn add_polygon (& self , polygon : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . add_polygon ; let ret = crate :: icalls :: icallptr_void_i32arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn create_from_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . create_from_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn parsed_geometry_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_parsed_geometry_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_polygon (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn sample_partition_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_sample_partition_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn source_geometry_mode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_source_geometry_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn vertices (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_vertices ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_height) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_max_climb) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_max_slope) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_radius) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cell_height) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cell_size) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = ""] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_dist) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_max_error) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , edge_max_error) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , edge_max_length) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_ledge_spans) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_low_hanging_obstacles) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_walkable_low_height_spans) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , geometry_type) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , region_merge_size) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , region_min_size) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sample_partition_type) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , mask . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_vertices (& self , vertices : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_vertices ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , vertices) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , verts_per_poly) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMesh { } unsafe impl GodotObject for NavigationMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NavigationMesh" } } impl std :: ops :: Deref for NavigationMesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationMesh { } impl Instanciable for NavigationMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\u{0}" . as_ptr () as * const c_char) ; table . create_from_mesh = (gd_api . godot_method_bind_get_method) (class_name , "create_from_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_height\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_radius\u{0}" . as_ptr () as * const c_char) ; table . get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_height\u{0}" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_height\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_radius\u{0}" . as_ptr () as * const c_char) ; table . set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_height\u{0}" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation_mesh::NavigationMesh;
            
            pub mod visibility_notifier_2d {
                use super::*;
                # [doc = "`core class VisibilityNotifier2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier2D { } unsafe impl GodotObject for VisibilityNotifier2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityNotifier2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityNotifier2D { } impl Instanciable for VisibilityNotifier2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\u{0}" . as_ptr () as * const c_char) ; table . set_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_rect\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visibility_notifier_2d::VisibilityNotifier2D;
            
            pub mod networked_multiplayer_peer {
                use super::*;
                # [doc = "`core class NetworkedMultiplayerPeer` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NetworkedMultiplayerPeer { pub const CONNECTION_CONNECTED : i64 = 2i64 ; pub const CONNECTION_CONNECTING : i64 = 1i64 ; pub const CONNECTION_DISCONNECTED : i64 = 0i64 ; pub const TARGET_PEER_BROADCAST : i64 = 0i64 ; pub const TARGET_PEER_SERVER : i64 = 1i64 ; pub const TRANSFER_MODE_RELIABLE : i64 = 2i64 ; pub const TRANSFER_MODE_UNRELIABLE : i64 = 0i64 ; pub const TRANSFER_MODE_UNRELIABLE_ORDERED : i64 = 1i64 ; } impl NetworkedMultiplayerPeer { # [doc = "Returns the current state of the connection. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: networked_multiplayer_peer :: ConnectionStatus (ret) } } # [doc = "Returns the ID of the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The manner in which to send packets to the `target_peer`. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: networked_multiplayer_peer :: TransferMode (ret) } } # [doc = "Returns the ID of this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, this [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets the peer to which packets will be sent.\nThe `id` can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant 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 [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "The manner in which to send packets to the `target_peer`. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerPeer { } unsafe impl GodotObject for NetworkedMultiplayerPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerPeer" } } impl std :: ops :: Deref for NetworkedMultiplayerPeer { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_packet_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_peer\u{0}" . as_ptr () as * const c_char) ; table . get_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_mode\u{0}" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\u{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\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_target_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_target_peer\u{0}" . as_ptr () as * const c_char) ; table . set_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::networked_multiplayer_peer::NetworkedMultiplayerPeer;
            
            pub mod parallax_layer {
                use super::*;
                # [doc = "`core class ParallaxLayer` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , mirror) ; } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [member 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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxLayer { } unsafe impl GodotObject for ParallaxLayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ParallaxLayer { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: node :: Node > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for ParallaxLayer { } impl Instanciable for ParallaxLayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_offset\u{0}" . as_ptr () as * const c_char) ; table . get_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_scale\u{0}" . as_ptr () as * const c_char) ; table . set_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "set_mirroring\u{0}" . as_ptr () as * const c_char) ; table . set_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_offset\u{0}" . as_ptr () as * const c_char) ; table . set_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_scale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::parallax_layer::ParallaxLayer;
            
            pub mod web_rtc_data_channel_gdnative {
                use super::*;
                # [doc = "`core class WebRTCDataChannelGDNative` inherits `WebRTCDataChannel` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannelGDNative" } } impl std :: ops :: Deref for WebRTCDataChannelGDNative { type Target = crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel ; # [inline] fn deref (& self) -> & crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannelGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCDataChannelGDNative { } impl Instanciable for WebRTCDataChannelGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::web_rtc_data_channel_gdnative::WebRTCDataChannelGDNative;
            
            pub mod kinematic_body_2d {
                use super::*;
                # [doc = "`core class KinematicBody2D` inherits `PhysicsBody2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If the body is at least this close to another body, this body will consider them to be colliding."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [KinematicCollision2D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method 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 :: kinematic_collision_2d :: KinematicCollision2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_slide_collision ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , slide_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: kinematic_collision_2d :: KinematicCollision2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on the ceiling. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on the floor. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the body is on a wall. Only updates when calling [method move_and_slide]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do **not** use together with [method move_and_slide] or [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Moves the body along the vector `rel_vec`. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.\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 :: kinematic_collision_2d :: KinematicCollision2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . move_and_collide ; let ret = crate :: icalls :: icallptr_obj_vec2_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , rel_vec , infinite_inertia , exclude_raycast_shapes , test_only) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: kinematic_collision_2d :: KinematicCollision2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.\nThis method should be used in [method Node._physics_process] (or in a method called by [method 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 [method move_and_collide], you should [i]not[/i] 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] nodes, but it won't also detect any collisions with them. If `false`, it will interact with [RigidBody2D] nodes like with [StaticBody2D].\nReturns the `linear_velocity` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].\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 :: icallptr_vec2_vec2_vec2_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , up_direction , stop_on_slope , max_slides , floor_max_angle , infinite_inertia) ; mem :: transmute (ret) } } # [doc = "Moves the body while keeping it attached to slopes. Similar to [method 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 [method 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 :: icallptr_vec2_vec2_vec2_vec2_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , snap , up_direction , stop_on_slope , max_slides , floor_max_angle , infinite_inertia) ; mem :: transmute (ret) } } # [doc = "If the body is at least this close to another body, this body will consider them to be colliding."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixels) ; } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do **not** use together with [method move_and_slide] or [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector `rel_vec`. Returns `true` if a collision would occur.\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 :: icallptr_bool_trans2D_vec2_bool (method_bind , self . this . sys () . as_ptr () , from , rel_vec , infinite_inertia) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicBody2D { } unsafe impl GodotObject for KinematicBody2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for KinematicBody2D { type Target = crate :: generated :: physics_body_2d :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body_2d :: PhysicsBody2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for KinematicBody2D { } impl Instanciable for KinematicBody2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_normal : * mut sys :: godot_method_bind , pub get_floor_velocity : * 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_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_normal : 0 as * mut sys :: godot_method_bind , get_floor_velocity : 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_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_floor_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_normal\u{0}" . as_ptr () as * const c_char) ; table . get_floor_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_safe_margin\u{0}" . as_ptr () as * const c_char) ; table . get_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_collision\u{0}" . as_ptr () as * const c_char) ; table . get_slide_count = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_count\u{0}" . as_ptr () as * const c_char) ; table . is_on_ceiling = (gd_api . godot_method_bind_get_method) (class_name , "is_on_ceiling\u{0}" . as_ptr () as * const c_char) ; table . is_on_floor = (gd_api . godot_method_bind_get_method) (class_name , "is_on_floor\u{0}" . as_ptr () as * const c_char) ; table . is_on_wall = (gd_api . godot_method_bind_get_method) (class_name , "is_on_wall\u{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\u{0}" . as_ptr () as * const c_char) ; table . move_and_collide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_collide\u{0}" . as_ptr () as * const c_char) ; table . move_and_slide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_safe_margin\u{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\u{0}" . as_ptr () as * const c_char) ; table . test_move = (gd_api . godot_method_bind_get_method) (class_name , "test_move\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::kinematic_body_2d::KinematicBody2D;
            
            pub mod video_stream {
                use super::*;
                # [doc = "`core class VideoStream` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl VideoStream { } impl gdnative_core :: private :: godot_object :: Sealed for VideoStream { } unsafe impl GodotObject for VideoStream { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStream" } } impl std :: ops :: Deref for VideoStream { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStream { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStream { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStream { }
            }
            pub use crate::generated::video_stream::VideoStream;
            
            pub mod packet_peer_dtls {
                use super::*;
                # [doc = "`core class PacketPeerDTLS` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PacketPeerDTLS { pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; } 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 , thread_access :: 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] which must be connected (see [method PacketPeerUDP.connect_to_host]). If `validate_certs` is `true`, [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] 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 :: packet_peer_udp :: PacketPeerUDP > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . connect_to_peer ; let ret = crate :: icalls :: icallptr_i64_obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , packet_peer . as_arg_ptr () , validate_certs , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: packet_peer_dtls :: Status (ret) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerDTLS { } unsafe impl GodotObject for PacketPeerDTLS { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerDTLS" } } impl std :: ops :: Deref for PacketPeerDTLS { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerDTLS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerDTLS { } impl Instanciable for PacketPeerDTLS { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . disconnect_from_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_peer\u{0}" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packet_peer_dtls::PacketPeerDTLS;
            
            pub mod popup_panel {
                use super::*;
                # [doc = "`core class PopupPanel` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PopupPanel { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupPanel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for PopupPanel { } unsafe impl SubClass < crate :: generated :: control :: Control > for PopupPanel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PopupPanel { } unsafe impl SubClass < crate :: generated :: node :: Node > for PopupPanel { } unsafe impl SubClass < crate :: generated :: object :: Object > for PopupPanel { } impl Instanciable for PopupPanel { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::popup_panel::PopupPanel;
            
            pub mod animation_node_add_3 {
                use super::*;
                # [doc = "`core class AnimationNodeAdd3` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd3 { } unsafe impl GodotObject for AnimationNodeAdd3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd3" } } impl std :: ops :: Deref for AnimationNodeAdd3 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAdd3 { } impl Instanciable for AnimationNodeAdd3 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_add_3::AnimationNodeAdd3;
            
            pub mod tcp_server {
                use super::*;
                # [doc = "`core class TCP_Server` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , bind_address . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (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 :: stream_peer_tcp :: StreamPeerTCP , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer_tcp :: StreamPeerTCP , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for TCP_Server { } unsafe impl GodotObject for TCP_Server { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TCP_Server" } } impl std :: ops :: Deref for TCP_Server { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TCP_Server { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TCP_Server { } unsafe impl SubClass < crate :: generated :: object :: Object > for TCP_Server { } impl Instanciable for TCP_Server { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\u{0}" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tcp_server::TCP_Server;
            
            pub mod visual_script_function_state {
                use super::*;
                # [doc = "`core class VisualScriptFunctionState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: 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 :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_var_arr (method_bind , self . this . sys () . as_ptr () , args) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionState { } unsafe impl GodotObject for VisualScriptFunctionState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionState" } } impl std :: ops :: Deref for VisualScriptFunctionState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunctionState { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunctionState { } impl Instanciable for VisualScriptFunctionState { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\u{0}" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_function_state::VisualScriptFunctionState;
            
            pub mod mesh_library {
                use super::*;
                # [doc = "`core class MeshLibrary` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void (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 [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the list of item IDs in use."] # [doc = ""] # [inline] pub fn get_item_list (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_list ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the item's mesh."] # [doc = ""] # [inline] pub fn get_item_mesh (& self , id : i64) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_mesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh (& self , id : i64) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 [method set_item_preview]. Returns an empty [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_preview ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an item's collision shapes.\nThe array consists of each [Shape] followed by its [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) ; < 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the item's mesh."] # [doc = ""] # [inline] pub fn set_item_mesh (& self , id : i64 , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_mesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , mesh . as_arg_ptr ()) ; } } # [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 [method 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , name . into ()) ; } } # [doc = "Sets the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh (& self , id : i64 , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , id , 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_preview ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , texture . as_arg_ptr ()) ; } } # [doc = "Sets an item's collision shapes.\nThe array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant 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 :: icallptr_void_i64_arr (method_bind , self . this . sys () . as_ptr () , id , shapes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshLibrary { } unsafe impl GodotObject for MeshLibrary { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshLibrary" } } impl std :: ops :: Deref for MeshLibrary { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshLibrary { } impl Instanciable for MeshLibrary { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_item_list\u{0}" . as_ptr () as * const c_char) ; table . get_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_item_name = (gd_api . godot_method_bind_get_method) (class_name , "get_item_name\u{0}" . as_ptr () as * const c_char) ; table . get_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_item_preview\u{0}" . as_ptr () as * const c_char) ; table . get_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shapes\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\u{0}" . as_ptr () as * const c_char) ; table . set_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_item_name = (gd_api . godot_method_bind_get_method) (class_name , "set_item_name\u{0}" . as_ptr () as * const c_char) ; table . set_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_item_preview\u{0}" . as_ptr () as * const c_char) ; table . set_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shapes\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh_library::MeshLibrary;
            
            pub mod resource_loader {
                use super::*;
                # [doc = "`core singleton class ResourceLoader` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] type that should be handled by the [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into ()) ; ret as _ } } # [doc = "Returns the dependencies for the resource at the given `path`."] # [doc = ""] # [inline] pub fn get_dependencies (& self , path : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . get_dependencies ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; StringArray :: from_sys (ret) } } # [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 >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . get_recognized_extensions_for_type ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "[i]Deprecated method.[/i] Use [method has_cached] or [method 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [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 [method load] or [method load_interactive] methods will use the cached version. The cached resource can be overridden by using [method 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Loads a resource at the given `path`, caching the result for further access.\nThe registered [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] type that should be handled by the [ResourceFormatLoader].\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 could handle the file.\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 :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_obj_str_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into () , no_cache) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks.\nAn optional `type_hint` can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].\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 :: resource_interactive_loader :: ResourceInteractiveLoader , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . load_interactive ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource_interactive_loader :: ResourceInteractiveLoader , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , abort) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceLoader { } unsafe impl GodotObject for ResourceLoader { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourceLoader" } } impl std :: ops :: Deref for ResourceLoader { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_dependencies\u{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\u{0}" . as_ptr () as * const c_char) ; table . has = (gd_api . godot_method_bind_get_method) (class_name , "has\u{0}" . as_ptr () as * const c_char) ; table . has_cached = (gd_api . godot_method_bind_get_method) (class_name , "has_cached\u{0}" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\u{0}" . as_ptr () as * const c_char) ; table . load_interactive = (gd_api . godot_method_bind_get_method) (class_name , "load_interactive\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::resource_loader::ResourceLoader;
            
            pub mod directional_light {
                use super::*;
                # [doc = "`core class DirectionalLight` inherits `Light` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DirectionalLight { pub const SHADOW_DEPTH_RANGE_OPTIMIZED : i64 = 1i64 ; pub const SHADOW_DEPTH_RANGE_STABLE : i64 = 0i64 ; pub const SHADOW_ORTHOGONAL : i64 = 0i64 ; 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: directional_light :: ShadowDepthRange (ret) } } # [doc = "The light's shadow rendering algorithm. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: directional_light :: ShadowMode (ret) } } # [doc = "If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Optimizes shadow rendering for detail versus movement. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The light's shadow rendering algorithm. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DirectionalLight { } unsafe impl GodotObject for DirectionalLight { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for DirectionalLight { type Target = crate :: generated :: light :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DirectionalLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: light :: Light > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: node :: Node > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: object :: Object > for DirectionalLight { } impl Instanciable for DirectionalLight { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_blend_splits = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_splits\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::directional_light::DirectionalLight;
            
            pub mod reflection_probe {
                use super::*;
                # [doc = "`core class ReflectionProbe` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ReflectionProbe { pub const UPDATE_ALWAYS : i64 = 1i64 ; pub const UPDATE_ONCE : i64 = 0i64 ; } 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 , thread_access :: 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 [constant UPDATE_ALWAYS] [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the ambient light color to be used when this probe is set to [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the energy multiplier for this reflection probe's ambient light contribution when set to [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the max distance away from the probe an object can be before it is culled."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the origin offset to be used when this reflection probe is in box project mode."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets how frequently the probe is updated. Can be [constant UPDATE_ONCE] or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: reflection_probe :: UpdateMode (ret) } } # [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."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layers) ; } } # [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."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [constant UPDATE_ALWAYS] [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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."] # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [doc = "Sets the ambient light color to be used when this probe is set to [member 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 :: icallptr_void_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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ambient_energy) ; } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ambient_probe_contribution) ; } } # [doc = "Sets the max distance away from the probe an object can be before it is culled."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max_distance) ; } } # [doc = "Sets the origin offset to be used when this reflection probe is in box project mode."] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , origin_offset) ; } } # [doc = "Sets how frequently the probe is updated. Can be [constant UPDATE_ONCE] or [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ReflectionProbe { } unsafe impl GodotObject for ReflectionProbe { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ReflectionProbe { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ReflectionProbe { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: node :: Node > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: object :: Object > for ReflectionProbe { } impl Instanciable for ReflectionProbe { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\u{0}" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\u{0}" . as_ptr () as * const c_char) ; table . get_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_intensity\u{0}" . as_ptr () as * const c_char) ; table . get_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "get_interior_ambient\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\u{0}" . as_ptr () as * const c_char) ; table . get_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_origin_offset\u{0}" . as_ptr () as * const c_char) ; table . get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_update_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_as_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_as_interior\u{0}" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enable_shadows = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_shadows\u{0}" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\u{0}" . as_ptr () as * const c_char) ; table . set_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_intensity\u{0}" . as_ptr () as * const c_char) ; table . set_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "set_interior_ambient\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\u{0}" . as_ptr () as * const c_char) ; table . set_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_origin_offset\u{0}" . as_ptr () as * const c_char) ; table . set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_update_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::reflection_probe::ReflectionProbe;
            
            pub mod convex_polygon_shape_2d {
                use super::*;
                # [doc = "`core class ConvexPolygonShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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."] # [doc = ""] # [inline] pub fn points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details."] # [doc = ""] # [inline] pub fn set_point_cloud (& self , point_cloud : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_point_cloud ; let ret = crate :: icalls :: icallptr_void_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."] # [doc = ""] # [inline] pub fn set_points (& self , points : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape2D { } unsafe impl GodotObject for ConvexPolygonShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape2D" } } impl std :: ops :: Deref for ConvexPolygonShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConvexPolygonShape2D { } impl Instanciable for ConvexPolygonShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_point_cloud = (gd_api . godot_method_bind_get_method) (class_name , "set_point_cloud\u{0}" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::convex_polygon_shape_2d::ConvexPolygonShape2D;
            
            pub mod color_picker_button {
                use super::*;
                # [doc = "`core class ColorPickerButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [ColorPicker] that this node toggles."] # [doc = ""] # [inline] pub fn get_picker (& self) -> Option < Ref < crate :: generated :: color_picker :: ColorPicker , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . get_picker ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: color_picker :: ColorPicker , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: popup_panel :: PopupPanel , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_panel :: PopupPanel , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the alpha channel in the displayed [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the alpha channel in the displayed [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorPickerButton { } unsafe impl GodotObject for ColorPickerButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ColorPickerButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorPickerButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for ColorPickerButton { } impl Instanciable for ColorPickerButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_picker = (gd_api . godot_method_bind_get_method) (class_name , "get_picker\u{0}" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\u{0}" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\u{0}" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\u{0}" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::color_picker_button::ColorPickerButton;
            
            pub mod x509_certificate {
                use super::*;
                # [doc = "`core class X509Certificate` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for X509Certificate { } unsafe impl GodotObject for X509Certificate { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "X509Certificate" } } impl std :: ops :: Deref for X509Certificate { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for X509Certificate { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for X509Certificate { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for X509Certificate { } unsafe impl SubClass < crate :: generated :: object :: Object > for X509Certificate { } impl Instanciable for X509Certificate { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::x509_certificate::X509Certificate;
            
            pub mod baked_lightmap_data {
                use super::*;
                # [doc = "`core class BakedLightmapData` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: 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 :: icallptr_void_nodepath_obj_i64_rect2_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , lightmap . as_arg_ptr () , lightmap_slice , lightmap_uv_rect , instance) ; } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn octree (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_octree ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_lightmap (& self , user_idx : i64) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_lightmap ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , user_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , user_idx) ; NodePath :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cell_subdiv) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , interior) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octree (& self , octree : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_octree ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , octree) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmapData { } unsafe impl GodotObject for BakedLightmapData { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BakedLightmapData" } } impl std :: ops :: Deref for BakedLightmapData { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmapData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: object :: Object > for BakedLightmapData { } impl Instanciable for BakedLightmapData { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_data = (gd_api . godot_method_bind_get_method) (class_name , "clear_data\u{0}" . as_ptr () as * const c_char) ; table . clear_users = (gd_api . godot_method_bind_get_method) (class_name , "clear_users\u{0}" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_subdiv\u{0}" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\u{0}" . as_ptr () as * const c_char) ; table . get_octree = (gd_api . godot_method_bind_get_method) (class_name , "get_octree\u{0}" . as_ptr () as * const c_char) ; table . get_user_count = (gd_api . godot_method_bind_get_method) (class_name , "get_user_count\u{0}" . as_ptr () as * const c_char) ; table . get_user_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_user_lightmap\u{0}" . as_ptr () as * const c_char) ; table . get_user_path = (gd_api . godot_method_bind_get_method) (class_name , "get_user_path\u{0}" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\u{0}" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_subdiv\u{0}" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\u{0}" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\u{0}" . as_ptr () as * const c_char) ; table . set_octree = (gd_api . godot_method_bind_get_method) (class_name , "set_octree\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::baked_lightmap_data::BakedLightmapData;
            
            pub mod visual_shader_node_texture_uniform_triplanar {
                use super::*;
                # [doc = "`core class VisualShaderNodeTextureUniformTriplanar` inherits `VisualShaderNodeTextureUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTextureUniformTriplanar" } } impl std :: ops :: Deref for VisualShaderNodeTextureUniformTriplanar { type Target = crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTextureUniformTriplanar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTextureUniformTriplanar { } impl Instanciable for VisualShaderNodeTextureUniformTriplanar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_texture_uniform_triplanar::VisualShaderNodeTextureUniformTriplanar;
            
            pub mod canvas_modulate {
                use super::*;
                # [doc = "`core class CanvasModulate` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasModulate { } unsafe impl GodotObject for CanvasModulate { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CanvasModulate { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasModulate { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: node :: Node > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasModulate { } impl Instanciable for CanvasModulate { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::canvas_modulate::CanvasModulate;
            
            pub mod image {
                use super::*;
                # [doc = "`core class Image` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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) ; } 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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Image { pub const ALPHA_BIT : i64 = 1i64 ; pub const ALPHA_BLEND : i64 = 2i64 ; pub const ALPHA_NONE : i64 = 0i64 ; pub const COMPRESS_ETC : i64 = 3i64 ; pub const COMPRESS_ETC2 : i64 = 4i64 ; pub const COMPRESS_PVRTC2 : i64 = 1i64 ; pub const COMPRESS_PVRTC4 : i64 = 2i64 ; pub const COMPRESS_S3TC : i64 = 0i64 ; pub const COMPRESS_SOURCE_GENERIC : i64 = 0i64 ; pub const COMPRESS_SOURCE_NORMAL : i64 = 2i64 ; pub const COMPRESS_SOURCE_SRGB : i64 = 1i64 ; pub const FORMAT_BPTC_RGBA : i64 = 22i64 ; pub const FORMAT_BPTC_RGBF : i64 = 23i64 ; pub const FORMAT_BPTC_RGBFU : i64 = 24i64 ; pub const FORMAT_DXT1 : i64 = 17i64 ; pub const FORMAT_DXT3 : i64 = 18i64 ; pub const FORMAT_DXT5 : i64 = 19i64 ; 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_RGB8A1 : i64 = 36i64 ; pub const FORMAT_ETC2_RGBA8 : i64 = 35i64 ; pub const FORMAT_L8 : i64 = 0i64 ; pub const FORMAT_LA8 : i64 = 1i64 ; pub const FORMAT_MAX : i64 = 37i64 ; 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_R8 : i64 = 2i64 ; pub const FORMAT_RF : i64 = 8i64 ; pub const FORMAT_RG8 : i64 = 3i64 ; pub const FORMAT_RGB8 : i64 = 4i64 ; pub const FORMAT_RGBA4444 : i64 = 6i64 ; pub const FORMAT_RGBA5551 : i64 = 7i64 ; pub const FORMAT_RGBA8 : i64 = 5i64 ; pub const FORMAT_RGBAF : i64 = 11i64 ; pub const FORMAT_RGBAH : i64 = 15i64 ; pub const FORMAT_RGBE9995 : i64 = 16i64 ; pub const FORMAT_RGBF : i64 = 10i64 ; pub const FORMAT_RGBH : i64 = 14i64 ; pub const FORMAT_RGF : i64 = 9i64 ; pub const FORMAT_RGH : i64 = 13i64 ; pub const FORMAT_RGTC_R : i64 = 20i64 ; pub const FORMAT_RGTC_RG : i64 = 21i64 ; pub const FORMAT_RH : i64 = 12i64 ; pub const INTERPOLATE_BILINEAR : i64 = 1i64 ; pub const INTERPOLATE_CUBIC : i64 = 2i64 ; pub const INTERPOLATE_LANCZOS : i64 = 4i64 ; pub const INTERPOLATE_NEAREST : i64 = 0i64 ; pub const INTERPOLATE_TRILINEAR : i64 = 3i64 ; 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 , thread_access :: 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`."] # [doc = ""] # [inline] pub fn blend_rect (& self , src : impl AsArg < crate :: generated :: image :: 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 :: icallptr_void_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`. 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. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats."] # [doc = ""] # [inline] pub fn blend_rect_mask (& self , src : impl AsArg < crate :: generated :: image :: Image > , mask : impl AsArg < crate :: generated :: image :: 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 :: icallptr_void_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`."] # [doc = ""] # [inline] pub fn blit_rect (& self , src : impl AsArg < crate :: generated :: image :: 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 :: icallptr_void_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`. `src` pixel is copied onto `dst` if the corresponding `mask` pixel's alpha value is not 0. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats."] # [doc = ""] # [inline] pub fn blit_rect_mask (& self , src : impl AsArg < crate :: generated :: image :: Image > , mask : impl AsArg < crate :: generated :: image :: 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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bump_scale) ; } } # [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 :: icallptr_void (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 [enum CompressMode] and [enum 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 :: icallptr_i64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , mode , source , lossy_quality) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Converts the image's format. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Copies `src` image to this image."] # [doc = ""] # [inline] pub fn copy_from (& self , src : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . copy_from ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr ()) ; } } # [doc = "Creates an empty image of given size and format. See [enum Format] constants. If `use_mipmaps` is `true` then generate mipmaps for this image. See the [method 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 :: icallptr_void_i64_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , width , height , use_mipmaps , format) ; } } # [doc = "Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If `use_mipmaps` is `true` then loads mipmaps for this image from `data`. See [method generate_mipmaps]."] # [doc = ""] # [inline] pub fn create_from_data (& self , width : i64 , height : i64 , use_mipmaps : bool , format : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . create_from_data ; let ret = crate :: icalls :: icallptr_void_i64_i64_bool_i64_bytearr (method_bind , self . this . sys () . as_ptr () , width , height , use_mipmaps , format , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: AlphaMode (ret) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Fills the image with a given [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0.\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 :: icallptr_i64_bool (method_bind , self . this . sys () . as_ptr () , renormalize) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns a copy of the image's raw data."] # [doc = ""] # [inline] pub fn get_data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the image's format. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , mipmap) ; ret as _ } } # [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] with the value `(0, 0, 0, 1.0)`. This is the same as [method 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 :: icallptr_color_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; mem :: transmute (ret) } } # [doc = "Returns the color of the pixel at `src` if the image is locked. If the image is unlocked, it always returns a [Color] with the value `(0, 0, 0, 1.0)`. This is the same as [method 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 :: icallptr_color_vec2 (method_bind , self . this . sys () . as_ptr () , src) ; mem :: transmute (ret) } } # [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 :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallptr_obj_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns a [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Loads an image from file `path`. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn load_bmp_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_bmp_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a JPEG file."] # [doc = ""] # [inline] pub fn load_jpg_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_jpg_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a PNG file."] # [doc = ""] # [inline] pub fn load_png_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_png_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a TGA file."] # [doc = ""] # [inline] pub fn load_tga_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_tga_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a WebP file."] # [doc = ""] # [inline] pub fn load_webp_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_webp_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resizes the image to the given `width` and `height`. New pixels are calculated using `interpolation`. See `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 :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , interpolation) ; } } # [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.\n# Default Arguments\n* `square` - `false`"] # [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 :: icallptr_void_bool_i64 (method_bind , self . this . sys () . as_ptr () , square , interpolation) ; } } # [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 :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . rgbe_to_srgb ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.\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 :: icallptr_i64_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , grayscale) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn save_png_to_buffer (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_png_to_buffer ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [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 :: icallptr_void_i64_i64_color (method_bind , self . this . sys () . as_ptr () , x , y , color) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Image { } unsafe impl GodotObject for Image { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Image" } } impl std :: ops :: Deref for Image { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Image { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Image { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Image { } unsafe impl SubClass < crate :: generated :: object :: Object > for Image { } impl Instanciable for Image { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . blend_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blend_rect_mask\u{0}" . as_ptr () as * const c_char) ; table . blit_rect = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect\u{0}" . as_ptr () as * const c_char) ; table . blit_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect_mask\u{0}" . as_ptr () as * const c_char) ; table . bumpmap_to_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "bumpmap_to_normalmap\u{0}" . as_ptr () as * const c_char) ; table . clear_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "clear_mipmaps\u{0}" . as_ptr () as * const c_char) ; table . compress = (gd_api . godot_method_bind_get_method) (class_name , "compress\u{0}" . as_ptr () as * const c_char) ; table . convert = (gd_api . godot_method_bind_get_method) (class_name , "convert\u{0}" . as_ptr () as * const c_char) ; table . copy_from = (gd_api . godot_method_bind_get_method) (class_name , "copy_from\u{0}" . as_ptr () as * const c_char) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\u{0}" . as_ptr () as * const c_char) ; table . create_from_data = (gd_api . godot_method_bind_get_method) (class_name , "create_from_data\u{0}" . as_ptr () as * const c_char) ; table . crop = (gd_api . godot_method_bind_get_method) (class_name , "crop\u{0}" . as_ptr () as * const c_char) ; table . decompress = (gd_api . godot_method_bind_get_method) (class_name , "decompress\u{0}" . as_ptr () as * const c_char) ; table . detect_alpha = (gd_api . godot_method_bind_get_method) (class_name , "detect_alpha\u{0}" . as_ptr () as * const c_char) ; table . expand_x2_hq2x = (gd_api . godot_method_bind_get_method) (class_name , "expand_x2_hq2x\u{0}" . as_ptr () as * const c_char) ; table . fill = (gd_api . godot_method_bind_get_method) (class_name , "fill\u{0}" . as_ptr () as * const c_char) ; table . fix_alpha_edges = (gd_api . godot_method_bind_get_method) (class_name , "fix_alpha_edges\u{0}" . as_ptr () as * const c_char) ; table . flip_x = (gd_api . godot_method_bind_get_method) (class_name , "flip_x\u{0}" . as_ptr () as * const c_char) ; table . flip_y = (gd_api . godot_method_bind_get_method) (class_name , "flip_y\u{0}" . as_ptr () as * const c_char) ; table . generate_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "generate_mipmaps\u{0}" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\u{0}" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_mipmap_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_mipmap_offset\u{0}" . as_ptr () as * const c_char) ; table . get_pixel = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel\u{0}" . as_ptr () as * const c_char) ; table . get_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "get_pixelv\u{0}" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . has_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "has_mipmaps\u{0}" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\u{0}" . as_ptr () as * const c_char) ; table . is_empty = (gd_api . godot_method_bind_get_method) (class_name , "is_empty\u{0}" . as_ptr () as * const c_char) ; table . is_invisible = (gd_api . godot_method_bind_get_method) (class_name , "is_invisible\u{0}" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\u{0}" . as_ptr () as * const c_char) ; table . normalmap_to_xy = (gd_api . godot_method_bind_get_method) (class_name , "normalmap_to_xy\u{0}" . as_ptr () as * const c_char) ; table . premultiply_alpha = (gd_api . godot_method_bind_get_method) (class_name , "premultiply_alpha\u{0}" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\u{0}" . as_ptr () as * const c_char) ; table . resize_to_po2 = (gd_api . godot_method_bind_get_method) (class_name , "resize_to_po2\u{0}" . as_ptr () as * const c_char) ; table . rgbe_to_srgb = (gd_api . godot_method_bind_get_method) (class_name , "rgbe_to_srgb\u{0}" . as_ptr () as * const c_char) ; table . save_exr = (gd_api . godot_method_bind_get_method) (class_name , "save_exr\u{0}" . as_ptr () as * const c_char) ; table . save_png = (gd_api . godot_method_bind_get_method) (class_name , "save_png\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pixel = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel\u{0}" . as_ptr () as * const c_char) ; table . set_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "set_pixelv\u{0}" . as_ptr () as * const c_char) ; table . shrink_x2 = (gd_api . godot_method_bind_get_method) (class_name , "shrink_x2\u{0}" . as_ptr () as * const c_char) ; table . srgb_to_linear = (gd_api . godot_method_bind_get_method) (class_name , "srgb_to_linear\u{0}" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::image::Image;
            
            pub mod physics_2d_shape_query_result {
                use super::*;
                # [doc = "`core class Physics2DShapeQueryResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dshapequeryresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DShapeQueryResult 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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DShapeQueryResult { this : RawObject < Self > , } impl Physics2DShapeQueryResult { # [doc = "Returns the number of objects that intersected with the shape."] # [doc = ""] # [inline] pub fn get_result_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object (& self , idx : i64) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the instance ID of the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_id (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_id ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the child index of the object's [Shape] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_shape (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_shape ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the [RID] of the object that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_rid (& self , idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_rid ; let ret = crate :: icalls :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DShapeQueryResult { } unsafe impl GodotObject for Physics2DShapeQueryResult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DShapeQueryResult" } } impl std :: ops :: Deref for Physics2DShapeQueryResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DShapeQueryResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DShapeQueryResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DShapeQueryResult { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DShapeQueryResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_result_count : * mut sys :: godot_method_bind , pub get_result_object : * mut sys :: godot_method_bind , pub get_result_object_id : * mut sys :: godot_method_bind , pub get_result_object_shape : * mut sys :: godot_method_bind , pub get_result_rid : * mut sys :: godot_method_bind } impl Physics2DShapeQueryResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DShapeQueryResultMethodTable = Physics2DShapeQueryResultMethodTable { class_constructor : None , get_result_count : 0 as * mut sys :: godot_method_bind , get_result_object : 0 as * mut sys :: godot_method_bind , get_result_object_id : 0 as * mut sys :: godot_method_bind , get_result_object_shape : 0 as * mut sys :: godot_method_bind , get_result_rid : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Physics2DShapeQueryResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DShapeQueryResult\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_result_count = (gd_api . godot_method_bind_get_method) (class_name , "get_result_count\u{0}" . as_ptr () as * const c_char) ; table . get_result_object = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object\u{0}" . as_ptr () as * const c_char) ; table . get_result_object_id = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_id\u{0}" . as_ptr () as * const c_char) ; table . get_result_object_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_shape\u{0}" . as_ptr () as * const c_char) ; table . get_result_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_result_rid\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_shape_query_result::Physics2DShapeQueryResult;
            
            pub mod visual_shader_node_determinant {
                use super::*;
                # [doc = "`core class VisualShaderNodeDeterminant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeDeterminant" } } impl std :: ops :: Deref for VisualShaderNodeDeterminant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeDeterminant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeDeterminant { } impl Instanciable for VisualShaderNodeDeterminant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_determinant::VisualShaderNodeDeterminant;
            
            pub mod primitive_mesh {
                use super::*;
                # [doc = "`core class PrimitiveMesh` inherits `Mesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl PrimitiveMesh { # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 [constant SpatialMaterial.CULL_BACK] in [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current [Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method 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] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected 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 :: icallptr_void_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 [constant SpatialMaterial.CULL_BACK] in [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_faces) ; } } # [doc = "The current [Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrimitiveMesh" } } impl std :: ops :: Deref for PrimitiveMesh { type Target = crate :: generated :: mesh :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrimitiveMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_flip_faces\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_mesh_arrays = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_arrays\u{0}" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\u{0}" . as_ptr () as * const c_char) ; table . set_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_faces\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::primitive_mesh::PrimitiveMesh;
            
            pub mod editor_selection {
                use super::*;
                # [doc = "`tools class EditorSelection` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorSelection { # [doc = "Adds a node to the selection."] # [doc = ""] # [inline] pub fn add_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorSelection" } } impl std :: ops :: Deref for EditorSelection { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSelection { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_selected_nodes = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_nodes\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_selection::EditorSelection;
            
            pub mod visual_shader_node_transform_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_transform_func :: Function (ret) } } # [doc = "The function to be computed. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformFunc { } unsafe impl GodotObject for VisualShaderNodeTransformFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformFunc" } } impl std :: ops :: Deref for VisualShaderNodeTransformFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformFunc { } impl Instanciable for VisualShaderNodeTransformFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_func::VisualShaderNodeTransformFunc;
            
            pub mod omni_light {
                use super::*;
                # [doc = "`core class OmniLight` inherits `Light` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OmniLight { pub const SHADOW_CUBE : i64 = 1i64 ; pub const SHADOW_DETAIL_HORIZONTAL : i64 = 1i64 ; pub const SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: omni_light :: ShadowDetail (ret) } } # [doc = "See [enum ShadowMode]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: omni_light :: ShadowMode (ret) } } # [doc = "See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail) ; } } # [doc = "See [enum ShadowMode]."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OmniLight { } unsafe impl GodotObject for OmniLight { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for OmniLight { type Target = crate :: generated :: light :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OmniLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: light :: Light > for OmniLight { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for OmniLight { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for OmniLight { } unsafe impl SubClass < crate :: generated :: node :: Node > for OmniLight { } unsafe impl SubClass < crate :: generated :: object :: Object > for OmniLight { } impl Instanciable for OmniLight { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_mode\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_detail\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::omni_light::OmniLight;
            
            pub mod static_body_2d {
                use super::*;
                # [doc = "`core class StaticBody2D` inherits `PhysicsBody2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's friction. Values range from `0` (no friction) to `1` (full friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 physics_material_override (& self) -> Option < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [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 :: icallptr_void_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 [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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 :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for StaticBody2D { type Target = crate :: generated :: physics_body_2d :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StaticBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body_2d :: PhysicsBody2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for StaticBody2D { } impl Instanciable for StaticBody2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::static_body_2d::StaticBody2D;
            
            pub mod mesh {
                use super::*;
                # [doc = "`core class Mesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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_DEFAULT : ArrayFormat = ArrayFormat (97280i64) ; 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) ; } 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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Mesh { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_COMPRESS_BASE : i64 = 9i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 97280i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; } impl Mesh { # [doc = "Calculate a [ConvexPolygonShape] from the mesh."] # [doc = ""] # [inline] pub fn create_convex_shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_convex_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_outline ; let ret = crate :: icalls :: icallptr_obj_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Calculate a [ConcavePolygonShape] from the mesh."] # [doc = ""] # [inline] pub fn create_trimesh_shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_trimesh_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Generate a [TriangleMesh] from the mesh."] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the smallest [AABB] enclosing this mesh in local space. Not affected by `custom_aabb`. See also [method VisualInstance.get_transformed_aabb].\n**Note:** This is only implemented for [ArrayMesh] and [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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the amount of surfaces that the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_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 :: icallptr_void_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 [method 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) ; < 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [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 :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_material ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets a [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 :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_set_material ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , surf_idx , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mesh { } unsafe impl GodotObject for Mesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mesh" } } impl std :: ops :: Deref for Mesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Mesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Mesh { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_outline = (gd_api . godot_method_bind_get_method) (class_name , "create_outline\u{0}" . as_ptr () as * const c_char) ; table . create_trimesh_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_shape\u{0}" . as_ptr () as * const c_char) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\u{0}" . as_ptr () as * const c_char) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_arrays\u{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\u{0}" . as_ptr () as * const c_char) ; table . surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_material\u{0}" . as_ptr () as * const c_char) ; table . surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_material\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh::Mesh;
            
            pub mod viewport_container {
                use super::*;
                # [doc = "`core class ViewportContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [member stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ViewportContainer { } unsafe impl GodotObject for ViewportContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ViewportContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for ViewportContainer { } impl Instanciable for ViewportContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_stretch_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_stretch_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_shrink = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_shrink\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::viewport_container::ViewportContainer;
            
            pub mod visual_script_switch {
                use super::*;
                # [doc = "`core class VisualScriptSwitch` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSwitch" } } impl std :: ops :: Deref for VisualScriptSwitch { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSwitch { } impl Instanciable for VisualScriptSwitch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_switch::VisualScriptSwitch;
            
            pub mod visual_shader_node_vector_op {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_ATAN2 : i64 = 9i64 ; pub const OP_CROSS : i64 = 8i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_REFLECT : i64 = 10i64 ; pub const OP_STEP : i64 = 11i64 ; pub const OP_SUB : i64 = 1i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_vector_op :: Operator (ret) } } # [doc = "The operator to be used. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorOp { } unsafe impl GodotObject for VisualShaderNodeVectorOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorOp" } } impl std :: ops :: Deref for VisualShaderNodeVectorOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorOp { } impl Instanciable for VisualShaderNodeVectorOp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_op::VisualShaderNodeVectorOp;
            
            pub mod audio_effect_capture {
                use super::*;
                # [doc = "`core class AudioEffectCapture` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_buffer (& self , frames : i64) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallptr_vec2arr_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , buffer_length_seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCapture { } unsafe impl GodotObject for AudioEffectCapture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCapture" } } impl std :: ops :: Deref for AudioEffectCapture { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCapture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectCapture { } impl Instanciable for AudioEffectCapture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\u{0}" . as_ptr () as * const c_char) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\u{0}" . as_ptr () as * const c_char) ; table . get_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_discarded_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_discarded_frames\u{0}" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\u{0}" . as_ptr () as * const c_char) ; table . get_pushed_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_pushed_frames\u{0}" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_capture::AudioEffectCapture;
            
            pub mod astar {
                use super::*;
                # [doc = "`core class AStar` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 algorithm prefers points with lower `weight_scale` to form a path. The `id` must be 0 or larger, and the `weight_scale` must be 1 or larger.\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 :: icallptr_void_i64_vec3_f64 (method_bind , self . this . sys () . as_ptr () , id , position , weight_scale) ; } } # [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 :: icallptr_bool_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , to_id , bidirectional) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , to_id , bidirectional) ; } } # [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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , to_id , bidirectional) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_vec3_bool (method_bind , self . this . sys () . as_ptr () , to_position , include_disabled) ; ret as _ } } # [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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_position) ; mem :: transmute (ret) } } # [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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_id_path ; let ret = crate :: icalls :: icallptr_i32arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_connections ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , id) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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."] # [doc = ""] # [inline] pub fn get_point_path (& self , from_id : i64 , to_id : i64) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_path ; let ret = crate :: icalls :: icallptr_vec3arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Vector3Array :: from_sys (ret) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , num_nodes) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , id , disabled) ; } } # [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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , id , position) ; } } # [doc = "Sets the `weight_scale` for the point with the given `id`."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , id , weight_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AStar { } unsafe impl GodotObject for AStar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AStar" } } impl std :: ops :: Deref for AStar { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AStar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AStar { } unsafe impl SubClass < crate :: generated :: object :: Object > for AStar { } impl Instanciable for AStar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\u{0}" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\u{0}" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\u{0}" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\u{0}" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\u{0}" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\u{0}" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::astar::AStar;
            
            pub mod web_rtc_peer_connection_gdnative {
                use super::*;
                # [doc = "`core class WebRTCPeerConnectionGDNative` inherits `WebRTCPeerConnection` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCPeerConnectionGDNative" } } impl std :: ops :: Deref for WebRTCPeerConnectionGDNative { type Target = crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection ; # [inline] fn deref (& self) -> & crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCPeerConnectionGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCPeerConnectionGDNative { } impl Instanciable for WebRTCPeerConnectionGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::web_rtc_peer_connection_gdnative::WebRTCPeerConnectionGDNative;
            
            pub mod audio_effect_band_limit_filter {
                use super::*;
                # [doc = "`core class AudioEffectBandLimitFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectBandLimitFilter" } } impl std :: ops :: Deref for AudioEffectBandLimitFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectBandLimitFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectBandLimitFilter { } impl Instanciable for AudioEffectBandLimitFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_band_limit_filter::AudioEffectBandLimitFilter;
            
            pub mod cube_mesh {
                use super::*;
                # [doc = "`core class CubeMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , divisions) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , divisions) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , subdivide) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMesh { } unsafe impl GodotObject for CubeMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMesh" } } impl std :: ops :: Deref for CubeMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CubeMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CubeMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CubeMesh { } impl Instanciable for CubeMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cube_mesh::CubeMesh;
            
            pub mod editor_resource_preview {
                use super::*;
                # [doc = "`tools class EditorResourcePreview` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorResourcePreview { # [doc = "Create an own, custom preview generator."] # [doc = ""] # [inline] pub fn add_preview_generator (& self , generator : impl AsArg < crate :: generated :: editor_resource_preview_generator :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . add_preview_generator ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything."] # [doc = ""] # [inline] pub fn queue_edited_resource_preview (& self , resource : impl AsArg < crate :: generated :: resource :: Resource > , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_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 for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything."] # [doc = ""] # [inline] pub fn queue_resource_preview (& self , path : impl Into < GodotString > , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_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 :: editor_resource_preview_generator :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . remove_preview_generator ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorResourcePreview { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreview { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorResourcePreview { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . check_for_invalidation = (gd_api . godot_method_bind_get_method) (class_name , "check_for_invalidation\u{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\u{0}" . as_ptr () as * const c_char) ; table . queue_resource_preview = (gd_api . godot_method_bind_get_method) (class_name , "queue_resource_preview\u{0}" . as_ptr () as * const c_char) ; table . remove_preview_generator = (gd_api . godot_method_bind_get_method) (class_name , "remove_preview_generator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_resource_preview::EditorResourcePreview;
            
            pub mod listener {
                use super::*;
                # [doc = "`core class Listener` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the listener's global orthonormalized [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the listener was made current using [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Listener { } unsafe impl GodotObject for Listener { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Listener { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Listener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Listener { } unsafe impl SubClass < crate :: generated :: node :: Node > for Listener { } unsafe impl SubClass < crate :: generated :: object :: Object > for Listener { } impl Instanciable for Listener { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_listener_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_listener_transform\u{0}" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\u{0}" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::listener::Listener;
            
            pub mod vsplit_container {
                use super::*;
                # [doc = "`core class VSplitContainer` inherits `SplitContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VSplitContainer { type Target = crate :: generated :: split_container :: SplitContainer ; # [inline] fn deref (& self) -> & crate :: generated :: split_container :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: split_container :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: split_container :: SplitContainer > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: container :: Container > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for VSplitContainer { } impl Instanciable for VSplitContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::vsplit_container::VSplitContainer;
            
            pub mod label {
                use super::*;
                # [doc = "`core class Label` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Label { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const VALIGN_BOTTOM : i64 = 2i64 ; pub const VALIGN_CENTER : i64 = 1i64 ; pub const VALIGN_FILL : i64 = 3i64 ; pub const VALIGN_TOP : i64 = 0i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: label :: Align (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 percent_visible (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_percent_visible ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: label :: VAlign (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of lines shown. Useful if the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 has_autowrap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . has_autowrap ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , lines_skipped) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , lines_visible) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , percent_visible) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , valign) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Label { } unsafe impl GodotObject for Label { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Label { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Label { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Label { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Label { } unsafe impl SubClass < crate :: generated :: node :: Node > for Label { } unsafe impl SubClass < crate :: generated :: object :: Object > for Label { } impl Instanciable for Label { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\u{0}" . as_ptr () as * const c_char) ; table . get_line_height = (gd_api . godot_method_bind_get_method) (class_name , "get_line_height\u{0}" . as_ptr () as * const c_char) ; table . get_lines_skipped = (gd_api . godot_method_bind_get_method) (class_name , "get_lines_skipped\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_valign = (gd_api . godot_method_bind_get_method) (class_name , "get_valign\u{0}" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "has_autowrap\u{0}" . as_ptr () as * const c_char) ; table . is_clipping_text = (gd_api . godot_method_bind_get_method) (class_name , "is_clipping_text\u{0}" . as_ptr () as * const c_char) ; table . is_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "is_uppercase\u{0}" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\u{0}" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\u{0}" . as_ptr () as * const c_char) ; table . set_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_text\u{0}" . as_ptr () as * const c_char) ; table . set_lines_skipped = (gd_api . godot_method_bind_get_method) (class_name , "set_lines_skipped\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "set_uppercase\u{0}" . as_ptr () as * const c_char) ; table . set_valign = (gd_api . godot_method_bind_get_method) (class_name , "set_valign\u{0}" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::label::Label;
            
            pub mod gi_probe {
                use super::*;
                # [doc = "`core class GIProbe` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GIProbe { pub const SUBDIV_128 : i64 = 1i64 ; pub const SUBDIV_256 : i64 = 2i64 ; pub const SUBDIV_512 : i64 = 3i64 ; pub const SUBDIV_64 : i64 = 0i64 ; 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 , thread_access :: 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]s marked with [member GeometryInstance.use_in_baked_light] and [Light]s marked with either [constant Light.BAKE_INDIRECT] or [constant Light.BAKE_ALL]. If `create_visual_debug` is `true`, after baking the light, this will generate a [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]'s data and debug any issues that may be occurring.\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 :: Node > , create_visual_debug : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallptr_void_obj_bool (method_bind , self . this . sys () . as_ptr () , from_node . as_arg_ptr () , create_visual_debug) ; } } # [doc = "Calls [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Offsets the lookup of the light contribution from the [GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum brightness that the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Energy multiplier. Makes the lighting contribution from the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Offsets the lookup into the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [GIProbeData] resource that holds the data for this [GIProbe]."] # [doc = ""] # [inline] pub fn probe_data (& self) -> Option < Ref < crate :: generated :: gi_probe_data :: GIProbeData , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_probe_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gi_probe_data :: GIProbeData , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of times to subdivide the grid that the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: gi_probe :: Subdiv (ret) } } # [doc = "If `true`, the data for this [GIProbe] will be compressed. Compression saves space, but results in far worse visual quality."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Offsets the lookup of the light contribution from the [GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "If `true`, the data for this [GIProbe] will be compressed. Compression saves space, but results in far worse visual quality."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The maximum brightness that the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "Energy multiplier. Makes the lighting contribution from the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member 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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Offsets the lookup into the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "The [GIProbeData] resource that holds the data for this [GIProbe]."] # [doc = ""] # [inline] pub fn set_probe_data (& self , data : impl AsArg < crate :: generated :: gi_probe_data :: GIProbeData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_probe_data ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "Number of times to subdivide the grid that the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , subdiv) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GIProbe { } unsafe impl GodotObject for GIProbe { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GIProbe { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GIProbe { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for GIProbe { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for GIProbe { } unsafe impl SubClass < crate :: generated :: node :: Node > for GIProbe { } unsafe impl SubClass < crate :: generated :: object :: Object > for GIProbe { } impl Instanciable for GIProbe { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . debug_bake = (gd_api . godot_method_bind_get_method) (class_name , "debug_bake\u{0}" . as_ptr () as * const c_char) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\u{0}" . as_ptr () as * const c_char) ; table . get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_range\u{0}" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\u{0}" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\u{0}" . as_ptr () as * const c_char) ; table . get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_bias\u{0}" . as_ptr () as * const c_char) ; table . get_probe_data = (gd_api . godot_method_bind_get_method) (class_name , "get_probe_data\u{0}" . as_ptr () as * const c_char) ; table . get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_propagation\u{0}" . as_ptr () as * const c_char) ; table . get_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_subdiv\u{0}" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\u{0}" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\u{0}" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\u{0}" . as_ptr () as * const c_char) ; table . set_compress = (gd_api . godot_method_bind_get_method) (class_name , "set_compress\u{0}" . as_ptr () as * const c_char) ; table . set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_range\u{0}" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\u{0}" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\u{0}" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\u{0}" . as_ptr () as * const c_char) ; table . set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_bias\u{0}" . as_ptr () as * const c_char) ; table . set_probe_data = (gd_api . godot_method_bind_get_method) (class_name , "set_probe_data\u{0}" . as_ptr () as * const c_char) ; table . set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_propagation\u{0}" . as_ptr () as * const c_char) ; table . set_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_subdiv\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gi_probe::GIProbe;
            
            pub mod visual_shader_node_output {
                use super::*;
                # [doc = "`core class VisualShaderNodeOutput` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl VisualShaderNodeOutput { } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeOutput { } unsafe impl GodotObject for VisualShaderNodeOutput { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOutput" } } impl std :: ops :: Deref for VisualShaderNodeOutput { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOutput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeOutput { }
            }
            pub use crate::generated::visual_shader_node_output::VisualShaderNodeOutput;
            
            pub mod baked_lightmap {
                use super::*;
                # [doc = "`core class BakedLightmap` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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) ; } 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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BakedLightmap { pub const BAKE_ERROR_CANT_CREATE_IMAGE : i64 = 3i64 ; pub const BAKE_ERROR_INVALID_MESH : i64 = 5i64 ; pub const BAKE_ERROR_LIGHTMAP_SIZE : i64 = 4i64 ; pub const BAKE_ERROR_NO_LIGHTMAPPER : i64 = 7i64 ; pub const BAKE_ERROR_NO_MESHES : i64 = 2i64 ; pub const BAKE_ERROR_NO_SAVE_PATH : i64 = 1i64 ; pub const BAKE_ERROR_OK : i64 = 0i64 ; pub const BAKE_ERROR_USER_ABORTED : i64 = 6i64 ; pub const BAKE_QUALITY_HIGH : i64 = 2i64 ; pub const BAKE_QUALITY_LOW : i64 = 0i64 ; pub const BAKE_QUALITY_MEDIUM : i64 = 1i64 ; pub const BAKE_QUALITY_ULTRA : i64 = 3i64 ; pub const ENVIRONMENT_MODE_CUSTOM_COLOR : i64 = 3i64 ; pub const ENVIRONMENT_MODE_CUSTOM_SKY : i64 = 2i64 ; pub const ENVIRONMENT_MODE_DISABLED : i64 = 0i64 ; pub const ENVIRONMENT_MODE_SCENE : i64 = 1i64 ; } 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 , thread_access :: 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 lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed.\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 :: 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 :: icallptr_i64_obj_str (method_bind , self . this . sys () . as_ptr () , from_node . as_arg_ptr () , data_save_path . into ()) ; crate :: generated :: baked_lightmap :: BakeError (ret) } } # [doc = "Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: BakeQuality (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: BakeQuality (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_custom_sky (& self) -> Option < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_sky ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: EnvironmentMode (ret) } } # [doc = "The size of the affected area."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The location where lightmaps will 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The calculated light data."] # [doc = ""] # [inline] pub fn light_data (& self) -> Option < Ref < crate :: generated :: baked_lightmap_data :: BakedLightmapData , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_light_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: baked_lightmap_data :: BakedLightmapData , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bounces) ; } } # [doc = "Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , capture_cell_size) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , propagation) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , capture_quality) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texels) ; } } # [doc = ""] # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_custom_sky (& self , sky : impl AsArg < crate :: generated :: sky :: Sky >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_sky ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , sky . as_arg_ptr ()) ; } } # [doc = ""] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , rotation) ; } } # [doc = ""] # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , min_light) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The size of the affected area."] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The location where lightmaps will 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 :: icallptr_void_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 :: baked_lightmap_data :: BakedLightmapData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_light_data ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_atlas_size) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmap { } unsafe impl GodotObject for BakedLightmap { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BakedLightmap { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: node :: Node > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: object :: Object > for BakedLightmap { } impl Instanciable for BakedLightmap { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_quality\u{0}" . as_ptr () as * const c_char) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\u{0}" . as_ptr () as * const c_char) ; table . get_bounces = (gd_api . godot_method_bind_get_method) (class_name , "get_bounces\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_enabled\u{0}" . as_ptr () as * const c_char) ; table . get_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_propagation\u{0}" . as_ptr () as * const c_char) ; table . get_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_quality\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_mode\u{0}" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\u{0}" . as_ptr () as * const c_char) ; table . get_image_path = (gd_api . godot_method_bind_get_method) (class_name , "get_image_path\u{0}" . as_ptr () as * const c_char) ; table . get_light_data = (gd_api . godot_method_bind_get_method) (class_name , "get_light_data\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_using_color = (gd_api . godot_method_bind_get_method) (class_name , "is_using_color\u{0}" . as_ptr () as * const c_char) ; table . is_using_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "is_using_denoiser\u{0}" . as_ptr () as * const c_char) ; table . is_using_hdr = (gd_api . godot_method_bind_get_method) (class_name , "is_using_hdr\u{0}" . as_ptr () as * const c_char) ; table . set_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_quality\u{0}" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\u{0}" . as_ptr () as * const c_char) ; table . set_bounces = (gd_api . godot_method_bind_get_method) (class_name , "set_bounces\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_propagation\u{0}" . as_ptr () as * const c_char) ; table . set_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_quality\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_mode\u{0}" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\u{0}" . as_ptr () as * const c_char) ; table . set_generate_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_atlas\u{0}" . as_ptr () as * const c_char) ; table . set_image_path = (gd_api . godot_method_bind_get_method) (class_name , "set_image_path\u{0}" . as_ptr () as * const c_char) ; table . set_light_data = (gd_api . godot_method_bind_get_method) (class_name , "set_light_data\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_color = (gd_api . godot_method_bind_get_method) (class_name , "set_use_color\u{0}" . as_ptr () as * const c_char) ; table . set_use_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "set_use_denoiser\u{0}" . as_ptr () as * const c_char) ; table . set_use_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_hdr\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::baked_lightmap::BakedLightmap;
            
            pub mod animation_tree {
                use super::*;
                # [doc = "`core class AnimationTree` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationTree { pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_MANUAL : i64 = 2i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; } } # [doc = "The path to the [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The process mode of this [AnimationTree]. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_tree :: AnimationProcessMode (ret) } } # [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 [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place."] # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation."] # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The root animation node of this [AnimationTree]. See [AnimationNode]."] # [doc = ""] # [inline] pub fn tree_root (& self) -> Option < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_tree_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , new_name . into ()) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "The path to the [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , root . into ()) ; } } # [doc = "The process mode of this [AnimationTree]. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place."] # [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The root animation node of this [AnimationTree]. See [AnimationNode]."] # [doc = ""] # [inline] pub fn set_tree_root (& self , root : impl AsArg < crate :: generated :: animation_node :: AnimationNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_tree_root ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimationTree { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimationTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationTree { } impl Instanciable for AnimationTree { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_animation_player = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_player\u{0}" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tree_root = (gd_api . godot_method_bind_get_method) (class_name , "get_tree_root\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{0}" . as_ptr () as * const c_char) ; table . rename_parameter = (gd_api . godot_method_bind_get_method) (class_name , "rename_parameter\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{0}" . as_ptr () as * const c_char) ; table . set_animation_player = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_player\u{0}" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tree_root = (gd_api . godot_method_bind_get_method) (class_name , "set_tree_root\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_tree::AnimationTree;
            
            pub mod resource_format_saver {
                use super::*;
                # [doc = "`core class ResourceFormatSaver` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceFormatSaver" } } impl std :: ops :: Deref for ResourceFormatSaver { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceFormatSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ResourceFormatSaver { } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourceFormatSaver { } impl Instanciable for ResourceFormatSaver { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::resource_format_saver::ResourceFormatSaver;
            
            pub mod astar_2d {
                use super::*;
                # [doc = "`core class AStar2D` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 algorithm prefers points with lower `weight_scale` to form a path. The `id` must be 0 or larger, and the `weight_scale` must be 1 or larger.\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 :: icallptr_void_i64_vec2_f64 (method_bind , self . this . sys () . as_ptr () , id , position , weight_scale) ; } } # [doc = "Returns whether there is a connection/segment between the given points."] # [doc = ""] # [inline] pub fn are_points_connected (& self , id : i64 , to_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . are_points_connected ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , to_id) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , to_id , bidirectional) ; } } # [doc = "Deletes the segment between the given points."] # [doc = ""] # [inline] pub fn disconnect_points (& self , id : i64 , to_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . disconnect_points ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , to_id) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_vec2_bool (method_bind , self . this . sys () . as_ptr () , to_position , include_disabled) ; ret as _ } } # [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; mem :: transmute (ret) } } # [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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_id_path ; let ret = crate :: icalls :: icallptr_i32arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_connections ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , id) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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."] # [doc = ""] # [inline] pub fn get_point_path (& self , from_id : i64 , to_id : i64) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_path ; let ret = crate :: icalls :: icallptr_vec2arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , num_nodes) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , id , disabled) ; } } # [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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , position) ; } } # [doc = "Sets the `weight_scale` for the point with the given `id`."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , id , weight_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AStar2D { } unsafe impl GodotObject for AStar2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AStar2D" } } impl std :: ops :: Deref for AStar2D { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AStar2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AStar2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AStar2D { } impl Instanciable for AStar2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\u{0}" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\u{0}" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\u{0}" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\u{0}" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\u{0}" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\u{0}" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::astar_2d::AStar2D;
            
            pub mod geometry_instance {
                use super::*;
                # [doc = "`core class GeometryInstance` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GeometryInstance { pub const FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const LIGHTMAP_SCALE_1X : i64 = 0i64 ; pub const LIGHTMAP_SCALE_2X : i64 = 1i64 ; pub const LIGHTMAP_SCALE_4X : i64 = 2i64 ; pub const LIGHTMAP_SCALE_8X : i64 = 3i64 ; pub const LIGHTMAP_SCALE_MAX : i64 = 4i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; } impl GeometryInstance { # [doc = "The selected shadow casting flag. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: geometry_instance :: ShadowCastingSetting (ret) } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap]."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: geometry_instance :: LightmapScale (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The selected shadow casting flag. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shadow_casting_setting) ; } } # [doc = "Overrides the bounding box of this node with a custom one. To remove it, set an [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 :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap]."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_material_override ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GeometryInstance { } unsafe impl GodotObject for GeometryInstance { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GeometryInstance { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GeometryInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\u{0}" . as_ptr () as * const c_char) ; table . get_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_generate_lightmap\u{0}" . as_ptr () as * const c_char) ; table . get_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_scale\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_material_override\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\u{0}" . as_ptr () as * const c_char) ; table . set_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_lightmap\u{0}" . as_ptr () as * const c_char) ; table . set_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_scale\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_material_override\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::geometry_instance::GeometryInstance;
            
            pub mod point_mesh {
                use super::*;
                # [doc = "`core class PointMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PointMesh" } } impl std :: ops :: Deref for PointMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PointMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for PointMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PointMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PointMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PointMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for PointMesh { } impl Instanciable for PointMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::point_mesh::PointMesh;
            
            pub mod web_socket_multiplayer_peer {
                use super::*;
                # [doc = "`core class WebSocketMultiplayerPeer` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl WebSocketMultiplayerPeer { # [doc = ""] # [doc = ""] # [inline] pub fn get_peer (& self , peer_id : i64) -> Option < Ref < crate :: generated :: web_socket_peer :: WebSocketPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketMultiplayerPeerMethodTable :: get (get_api ()) . get_peer ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: web_socket_peer :: WebSocketPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , input_buffer_size_kb , input_max_packets , output_buffer_size_kb , output_max_packets) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketMultiplayerPeer { } unsafe impl GodotObject for WebSocketMultiplayerPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketMultiplayerPeer" } } impl std :: ops :: Deref for WebSocketMultiplayerPeer { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketMultiplayerPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_buffers = (gd_api . godot_method_bind_get_method) (class_name , "set_buffers\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_socket_multiplayer_peer::WebSocketMultiplayerPeer;
            
            pub mod gdscript_function_state {
                use super::*;
                # [doc = "`core class GDScriptFunctionState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_bool_bool (method_bind , self . this . sys () . as_ptr () , extended_check) ; ret as _ } } # [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 :: icallptr_var_var (method_bind , self . this . sys () . as_ptr () , arg . owned_to_variant ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GDScriptFunctionState { } unsafe impl GodotObject for GDScriptFunctionState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScriptFunctionState" } } impl std :: ops :: Deref for GDScriptFunctionState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDScriptFunctionState { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gdscript_function_state::GDScriptFunctionState;
            
            pub mod visual_script_node {
                use super::*;
                # [doc = "`core class VisualScriptNode` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , port_idx) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_visual_script (& self) -> Option < Ref < crate :: generated :: visual_script :: VisualScript , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . get_visual_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_script :: VisualScript , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void (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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , port_idx , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptNode { } unsafe impl GodotObject for VisualScriptNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptNode" } } impl std :: ops :: Deref for VisualScriptNode { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_visual_script = (gd_api . godot_method_bind_get_method) (class_name , "get_visual_script\u{0}" . as_ptr () as * const c_char) ; table . ports_changed_notify = (gd_api . godot_method_bind_get_method) (class_name , "ports_changed_notify\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_node::VisualScriptNode;
            
            pub mod visual_shader_node_scalar_op {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_ATAN2 : i64 = 8i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_STEP : i64 = 9i64 ; pub const OP_SUB : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_scalar_op :: Operator (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarOp { } unsafe impl GodotObject for VisualShaderNodeScalarOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarOp" } } impl std :: ops :: Deref for VisualShaderNodeScalarOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarOp { } impl Instanciable for VisualShaderNodeScalarOp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_op::VisualShaderNodeScalarOp;
            
            pub mod line_edit {
                use super::*;
                # [doc = "`core class LineEdit` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LineEdit { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const MENU_CUT : i64 = 0i64 ; pub const MENU_MAX : i64 = 7i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; } 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 , thread_access :: 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 [member 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Erases the [LineEdit]'s [member 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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , blink_speed) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes a section of the [member 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_column , to_column) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_edit :: Align (ret) } } # [doc = "The cursor's position inside the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Opacity of the [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn right_icon (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_right_icon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 secret_character (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_secret_character ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, every character is replaced with the secret character (see [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Executes a given action as defined in the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , option) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSelects characters inside [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; } } # [doc = "Selects the whole [String]."] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The cursor's position inside the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , chars) ; } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Opacity of the [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , alpha) ; } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn set_right_icon (& self , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_right_icon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "If `true`, every character is replaced with the secret character (see [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal 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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineEdit { } unsafe impl GodotObject for LineEdit { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LineEdit { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for LineEdit { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LineEdit { } unsafe impl SubClass < crate :: generated :: node :: Node > for LineEdit { } unsafe impl SubClass < crate :: generated :: object :: Object > for LineEdit { } impl Instanciable for LineEdit { # [inline] fn construct () -> Ref < Self , thread_access :: 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_text : * 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_editable : * 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_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_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_text : 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_editable : 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . delete_text = (gd_api . godot_method_bind_get_method) (class_name , "delete_text\u{0}" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\u{0}" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\u{0}" . as_ptr () as * const c_char) ; table . get_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_max_length\u{0}" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\u{0}" . as_ptr () as * const c_char) ; table . get_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder\u{0}" . as_ptr () as * const c_char) ; table . get_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder_alpha\u{0}" . as_ptr () as * const c_char) ; table . get_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_right_icon\u{0}" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\u{0}" . as_ptr () as * const c_char) ; table . get_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "get_secret_character\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\u{0}" . as_ptr () as * const c_char) ; table . is_secret = (gd_api . godot_method_bind_get_method) (class_name , "is_secret\u{0}" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\u{0}" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\u{0}" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\u{0}" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "set_cursor_position\u{0}" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_max_length\u{0}" . as_ptr () as * const c_char) ; table . set_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder\u{0}" . as_ptr () as * const c_char) ; table . set_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder_alpha\u{0}" . as_ptr () as * const c_char) ; table . set_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_right_icon\u{0}" . as_ptr () as * const c_char) ; table . set_secret = (gd_api . godot_method_bind_get_method) (class_name , "set_secret\u{0}" . as_ptr () as * const c_char) ; table . set_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "set_secret_character\u{0}" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::line_edit::LineEdit;
            
            pub mod networked_multiplayer_enet {
                use super::*;
                # [doc = "`core class NetworkedMultiplayerENet` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NetworkedMultiplayerENet { pub const COMPRESS_FASTLZ : i64 = 2i64 ; pub const COMPRESS_NONE : i64 = 0i64 ; pub const COMPRESS_RANGE_CODER : i64 = 1i64 ; 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 , thread_access :: 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , wait_usec) ; } } # [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 :: icallptr_i64_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , address . into () , port , in_bandwidth , out_bandwidth , client_port) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , port , max_clients , in_bandwidth , out_bandwidth) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , id , now) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: networked_multiplayer_enet :: CompressionMode (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ordered) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channels) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_certificate (& self , certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_certificate ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_key (& self , key : impl AsArg < crate :: generated :: crypto_key :: CryptoKey >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_key ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , timeout_limit , timeout_min , timeout_max) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerENet { } unsafe impl GodotObject for NetworkedMultiplayerENet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerENet" } } impl std :: ops :: Deref for NetworkedMultiplayerENet { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerENet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: object :: Object > for NetworkedMultiplayerENet { } impl Instanciable for NetworkedMultiplayerENet { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_client = (gd_api . godot_method_bind_get_method) (class_name , "create_client\u{0}" . as_ptr () as * const c_char) ; table . create_server = (gd_api . godot_method_bind_get_method) (class_name , "create_server\u{0}" . as_ptr () as * const c_char) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\u{0}" . as_ptr () as * const c_char) ; table . get_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "get_channel_count\u{0}" . as_ptr () as * const c_char) ; table . get_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_compression_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_packet_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_channel\u{0}" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\u{0}" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\u{0}" . as_ptr () as * const c_char) ; table . get_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_channel\u{0}" . as_ptr () as * const c_char) ; table . is_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_always_ordered\u{0}" . as_ptr () as * const c_char) ; table . is_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dtls_enabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "set_always_ordered\u{0}" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\u{0}" . as_ptr () as * const c_char) ; table . set_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "set_channel_count\u{0}" . as_ptr () as * const c_char) ; table . set_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compression_mode\u{0}" . as_ptr () as * const c_char) ; table . set_dtls_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_certificate\u{0}" . as_ptr () as * const c_char) ; table . set_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_dtls_key = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_key\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_peer_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_peer_timeout\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_channel\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::networked_multiplayer_enet::NetworkedMultiplayerENet;
            
            pub mod editor_settings {
                use super::*;
                # [doc = "`tools class EditorSettings` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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] (the name of the property)\n- `type`: [int] (see [enum Variant.Type])\n- optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String]\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 :: icallptr_void_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 :: icallptr_void_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) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_favorites ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns project-specific metadata for the `section` and `key` specified. If the metadata doesn't exist, `default` will be returned instead. See also [method 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 :: icallptr_var_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the list of recently visited folders in the file dialog for this project."] # [doc = ""] # [inline] pub fn get_recent_dirs (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_recent_dirs ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the value of the setting specified by `name`. This is equivalent to using [method 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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Sets the list of favorite files and directories for this project."] # [doc = ""] # [inline] pub fn set_favorites (& self , dirs : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_favorites ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant () , update_current) ; } } # [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 [method 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 :: icallptr_void_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 : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_recent_dirs ; let ret = crate :: icalls :: icallptr_void_strarr (method_bind , self . this . sys () . as_ptr () , dirs) ; } } # [doc = "Sets the `value` of the setting specified by `name`. This is equivalent to using [method 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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSettings" } } impl std :: ops :: Deref for EditorSettings { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for EditorSettings { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSettings { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . erase = (gd_api . godot_method_bind_get_method) (class_name , "erase\u{0}" . as_ptr () as * const c_char) ; table . get_favorites = (gd_api . godot_method_bind_get_method) (class_name , "get_favorites\u{0}" . as_ptr () as * const c_char) ; table . get_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_project_metadata\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "get_recent_dirs\u{0}" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\u{0}" . as_ptr () as * const c_char) ; table . get_settings_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_settings_dir\u{0}" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\u{0}" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\u{0}" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\u{0}" . as_ptr () as * const c_char) ; table . set_favorites = (gd_api . godot_method_bind_get_method) (class_name , "set_favorites\u{0}" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\u{0}" . as_ptr () as * const c_char) ; table . set_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_project_metadata\u{0}" . as_ptr () as * const c_char) ; table . set_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "set_recent_dirs\u{0}" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_settings::EditorSettings;
            
            pub mod visual_shader_node_face_forward {
                use super::*;
                # [doc = "`core class VisualShaderNodeFaceForward` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeFaceForward" } } impl std :: ops :: Deref for VisualShaderNodeFaceForward { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeFaceForward { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeFaceForward { } impl Instanciable for VisualShaderNodeFaceForward { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_face_forward::VisualShaderNodeFaceForward;
            
            pub mod physics_direct_space_state {
                use super::*;
                # [doc = "`core class PhysicsDirectSpaceState` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl PhysicsDirectSpaceState { # [doc = "Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of `motion`. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be `[1, 1]`.\nIf the shape can not move, the returned array will be `[0, 0]` under Bullet, and empty under GodotPhysics."] # [doc = ""] # [inline] pub fn cast_motion (& self , shape : impl AsArg < crate :: generated :: physics_shape_query_parameters :: 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] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method 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 :: physics_shape_query_parameters :: 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [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]. If the object is an [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].\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 :: physics_shape_query_parameters :: PhysicsShapeQueryParameters >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . get_rest_info ; let ret = crate :: icalls :: icallptr_dict_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; Dictionary :: from_sys (ret) } } # [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].\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]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]s or [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 :: icallptr_dict_vec3_vec3_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , from , to , exclude , collision_mask , collide_with_bodies , collide_with_areas) ; Dictionary :: from_sys (ret) } } # [doc = "Checks the intersections of a shape, given through a [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].\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 :: physics_shape_query_parameters :: 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsDirectSpaceState { } unsafe impl GodotObject for PhysicsDirectSpaceState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsDirectSpaceState" } } impl std :: ops :: Deref for PhysicsDirectSpaceState { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsDirectSpaceState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\u{0}" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\u{0}" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\u{0}" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_direct_space_state::PhysicsDirectSpaceState;
            
            pub mod quad_mesh {
                use super::*;
                # [doc = "`core class QuadMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for QuadMesh { } unsafe impl GodotObject for QuadMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "QuadMesh" } } impl std :: ops :: Deref for QuadMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for QuadMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for QuadMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for QuadMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for QuadMesh { } impl Instanciable for QuadMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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_size : * 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_size : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::quad_mesh::QuadMesh;
            
            pub mod audio_effect_low_shelf_filter {
                use super::*;
                # [doc = "`core class AudioEffectLowShelfFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowShelfFilter" } } impl std :: ops :: Deref for AudioEffectLowShelfFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLowShelfFilter { } impl Instanciable for AudioEffectLowShelfFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_low_shelf_filter::AudioEffectLowShelfFilter;
            
            pub mod audio_stream_ogg_vorbis {
                use super::*;
                # [doc = "`core class AudioStreamOGGVorbis` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamOGGVorbis { } unsafe impl GodotObject for AudioStreamOGGVorbis { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamOGGVorbis" } } impl std :: ops :: Deref for AudioStreamOGGVorbis { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamOGGVorbis { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamOGGVorbis { } impl Instanciable for AudioStreamOGGVorbis { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\u{0}" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\u{0}" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\u{0}" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\u{0}" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_ogg_vorbis::AudioStreamOGGVorbis;
            
            pub mod spin_box {
                use super::*;
                # [doc = "`core class SpinBox` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]."] # [doc = ""] # [inline] pub fn apply (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . apply ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the text alignment of the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_edit :: Align (ret) } } # [doc = "Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Adds the specified `prefix` string before the numerical value of the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Adds the specified `suffix` string after the numerical value of the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the text alignment of the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editable) ; } } # [doc = "Adds the specified `prefix` string before the numerical value of the [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , prefix . into ()) ; } } # [doc = "Adds the specified `suffix` string after the numerical value of the [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpinBox { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpinBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for SpinBox { } unsafe impl SubClass < crate :: generated :: control :: Control > for SpinBox { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for SpinBox { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpinBox { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpinBox { } impl Instanciable for SpinBox { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\u{0}" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\u{0}" . as_ptr () as * const c_char) ; table . get_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_prefix\u{0}" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\u{0}" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\u{0}" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\u{0}" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\u{0}" . as_ptr () as * const c_char) ; table . set_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_prefix\u{0}" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::spin_box::SpinBox;
            
            pub mod noise_texture {
                use super::*;
                # [doc = "`core class NoiseTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn noise (& self) -> Option < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_noise ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , as_normalmap) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bump_strength) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_noise (& self , noise : impl AsArg < crate :: generated :: open_simplex_noise :: OpenSimplexNoise >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_noise ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , noise . as_arg_ptr ()) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , seamless) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NoiseTexture { } unsafe impl GodotObject for NoiseTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NoiseTexture" } } impl std :: ops :: Deref for NoiseTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NoiseTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for NoiseTexture { } impl Instanciable for NoiseTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_noise = (gd_api . godot_method_bind_get_method) (class_name , "get_noise\u{0}" . as_ptr () as * const c_char) ; table . get_seamless = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless\u{0}" . as_ptr () as * const c_char) ; table . is_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "is_normalmap\u{0}" . as_ptr () as * const c_char) ; table . set_as_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_as_normalmap\u{0}" . as_ptr () as * const c_char) ; table . set_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_bump_strength\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_noise = (gd_api . godot_method_bind_get_method) (class_name , "set_noise\u{0}" . as_ptr () as * const c_char) ; table . set_seamless = (gd_api . godot_method_bind_get_method) (class_name , "set_seamless\u{0}" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::noise_texture::NoiseTexture;
            
            pub mod animation_node_blend_space_1d {
                use super::*;
                # [doc = "`core class AnimationNodeBlendSpace1D` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: animation_root_node :: 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 :: icallptr_void_obj_f64_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos , at_index) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = "The blend space's axis's upper limit for the points' position. See [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The blend space's axis's lower limit for the points' position. See [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Changes the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , point , 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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , point , pos) ; } } # [doc = "The blend space's axis's upper limit for the points' position. See [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max_space) ; } } # [doc = "The blend space's axis's lower limit for the points' position. See [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min_space) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , snap) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace1D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace1D { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace1D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendSpace1D { } impl Instanciable for AnimationNodeBlendSpace1D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\u{0}" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\u{0}" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\u{0}" . as_ptr () as * const c_char) ; table . get_value_label = (gd_api . godot_method_bind_get_method) (class_name , "get_value_label\u{0}" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\u{0}" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\u{0}" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\u{0}" . as_ptr () as * const c_char) ; table . set_value_label = (gd_api . godot_method_bind_get_method) (class_name , "set_value_label\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_blend_space_1d::AnimationNodeBlendSpace1D;
            
            pub mod audio_effect_low_pass_filter {
                use super::*;
                # [doc = "`core class AudioEffectLowPassFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowPassFilter" } } impl std :: ops :: Deref for AudioEffectLowPassFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLowPassFilter { } impl Instanciable for AudioEffectLowPassFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_low_pass_filter::AudioEffectLowPassFilter;
            
            pub mod visual_shader_node_vector_decompose {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorDecompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDecompose" } } impl std :: ops :: Deref for VisualShaderNodeVectorDecompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDecompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorDecompose { } impl Instanciable for VisualShaderNodeVectorDecompose { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_decompose::VisualShaderNodeVectorDecompose;
            
            pub mod open_simplex_noise {
                use super::*;
                # [doc = "`core class OpenSimplexNoise` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_image ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , x) ; ret as _ } } # [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 :: icallptr_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [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 :: icallptr_f64_vec2 (method_bind , self . this . sys () . as_ptr () , pos) ; ret as _ } } # [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 :: icallptr_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; ret as _ } } # [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 :: icallptr_f64_vec3 (method_bind , self . this . sys () . as_ptr () , pos) ; ret as _ } } # [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 :: icallptr_f64_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , x , y , z , w) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_seamless_image (& self , size : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_seamless_image ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , size) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , lacunarity) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , octave_count) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , period) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , persistence) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , seed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OpenSimplexNoise { } unsafe impl GodotObject for OpenSimplexNoise { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OpenSimplexNoise" } } impl std :: ops :: Deref for OpenSimplexNoise { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OpenSimplexNoise { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for OpenSimplexNoise { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for OpenSimplexNoise { } unsafe impl SubClass < crate :: generated :: object :: Object > for OpenSimplexNoise { } impl Instanciable for OpenSimplexNoise { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_lacunarity = (gd_api . godot_method_bind_get_method) (class_name , "get_lacunarity\u{0}" . as_ptr () as * const c_char) ; table . get_noise_1d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_1d\u{0}" . as_ptr () as * const c_char) ; table . get_noise_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_2d\u{0}" . as_ptr () as * const c_char) ; table . get_noise_2dv = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_2dv\u{0}" . as_ptr () as * const c_char) ; table . get_noise_3d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_3d\u{0}" . as_ptr () as * const c_char) ; table . get_noise_3dv = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_3dv\u{0}" . as_ptr () as * const c_char) ; table . get_noise_4d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_4d\u{0}" . as_ptr () as * const c_char) ; table . get_octaves = (gd_api . godot_method_bind_get_method) (class_name , "get_octaves\u{0}" . as_ptr () as * const c_char) ; table . get_period = (gd_api . godot_method_bind_get_method) (class_name , "get_period\u{0}" . as_ptr () as * const c_char) ; table . get_persistence = (gd_api . godot_method_bind_get_method) (class_name , "get_persistence\u{0}" . as_ptr () as * const c_char) ; table . get_seamless_image = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless_image\u{0}" . as_ptr () as * const c_char) ; table . get_seed = (gd_api . godot_method_bind_get_method) (class_name , "get_seed\u{0}" . as_ptr () as * const c_char) ; table . set_lacunarity = (gd_api . godot_method_bind_get_method) (class_name , "set_lacunarity\u{0}" . as_ptr () as * const c_char) ; table . set_octaves = (gd_api . godot_method_bind_get_method) (class_name , "set_octaves\u{0}" . as_ptr () as * const c_char) ; table . set_period = (gd_api . godot_method_bind_get_method) (class_name , "set_period\u{0}" . as_ptr () as * const c_char) ; table . set_persistence = (gd_api . godot_method_bind_get_method) (class_name , "set_persistence\u{0}" . as_ptr () as * const c_char) ; table . set_seed = (gd_api . godot_method_bind_get_method) (class_name , "set_seed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::open_simplex_noise::OpenSimplexNoise;
            
            pub mod concave_polygon_shape {
                use super::*;
                # [doc = "`core class ConcavePolygonShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Sets the faces (an array of triangles)."] # [doc = ""] # [inline] pub fn set_faces (& self , faces : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . set_faces ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConcavePolygonShape { } unsafe impl GodotObject for ConcavePolygonShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConcavePolygonShape" } } impl std :: ops :: Deref for ConcavePolygonShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConcavePolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConcavePolygonShape { } impl Instanciable for ConcavePolygonShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_faces\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::concave_polygon_shape::ConcavePolygonShape;
            
            pub mod reference {
                use super::*;
                # [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/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } # [doc = "Initializes the internal reference counter. Use this only if you really know what you are doing.\nReturns whether the initialization was successful."] # [doc = ""] # [inline] pub fn init_ref (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceMethodTable :: get (get_api ()) . init_ref ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for Reference { } unsafe impl GodotObject for Reference { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Reference" } } impl std :: ops :: Deref for Reference { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Reference { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Reference { } impl Instanciable for Reference { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Reference :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ReferenceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub init_ref : * mut sys :: godot_method_bind } impl ReferenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ReferenceMethodTable = ReferenceMethodTable { class_constructor : None , init_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . init_ref = (gd_api . godot_method_bind_get_method) (class_name , "init_ref\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::reference::Reference;
            
            pub mod visual_shader_node_color_op {
                use super::*;
                # [doc = "`core class VisualShaderNodeColorOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeColorOp { pub const OP_BURN : i64 = 6i64 ; pub const OP_DARKEN : i64 = 2i64 ; pub const OP_DIFFERENCE : i64 = 1i64 ; pub const OP_DODGE : i64 = 5i64 ; pub const OP_HARD_LIGHT : i64 = 8i64 ; pub const OP_LIGHTEN : i64 = 3i64 ; pub const OP_OVERLAY : i64 = 4i64 ; pub const OP_SCREEN : i64 = 0i64 ; pub const OP_SOFT_LIGHT : i64 = 7i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_color_op :: Operator (ret) } } # [doc = "An operator to be applied to the inputs. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorOp { } unsafe impl GodotObject for VisualShaderNodeColorOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorOp" } } impl std :: ops :: Deref for VisualShaderNodeColorOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorOp { } impl Instanciable for VisualShaderNodeColorOp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_color_op::VisualShaderNodeColorOp;
            
            pub mod physics_shape_query_parameters {
                use super::*;
                # [doc = "`core class PhysicsShapeQueryParameters` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The list of objects or object [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The queried shape's [RID]. See also [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the query will take [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the query will take [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "The list of objects or object [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "Sets the [Shape] that will be used for collision/intersection queries."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "The queried shape's [RID]. See also [method set_shape]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsShapeQueryParameters { } unsafe impl GodotObject for PhysicsShapeQueryParameters { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsShapeQueryParameters" } } impl std :: ops :: Deref for PhysicsShapeQueryParameters { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsShapeQueryParameters { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PhysicsShapeQueryParameters { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicsShapeQueryParameters { } impl Instanciable for PhysicsShapeQueryParameters { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_exclude = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_rid\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{0}" . as_ptr () as * const c_char) ; table . set_exclude = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; table . set_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_rid\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_shape_query_parameters::PhysicsShapeQueryParameters;
            
            pub mod physics_2d_shape_query_parameters {
                use super::*;
                # [doc = "`core class Physics2DShapeQueryParameters` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The list of objects or object [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The queried shape's [RID]. See also [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the query will take [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the query will take [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "The list of objects or object [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , motion) ; } } # [doc = "Sets the [Shape2D] that will be used for collision/intersection queries."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "The queried shape's [RID]. See also [method set_shape]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DShapeQueryParameters { } unsafe impl GodotObject for Physics2DShapeQueryParameters { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DShapeQueryParameters" } } impl std :: ops :: Deref for Physics2DShapeQueryParameters { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DShapeQueryParameters { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DShapeQueryParameters { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DShapeQueryParameters { } impl Instanciable for Physics2DShapeQueryParameters { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_exclude = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\u{0}" . as_ptr () as * const c_char) ; table . get_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_rid\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{0}" . as_ptr () as * const c_char) ; table . set_exclude = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_motion = (gd_api . godot_method_bind_get_method) (class_name , "set_motion\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; table . set_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_rid\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_shape_query_parameters::Physics2DShapeQueryParameters;
            
            pub mod visual_server {
                use super::*;
                # [doc = "`core singleton class VisualServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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_DEFAULT : ArrayFormat = ArrayFormat (97280i64) ; 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) ; } 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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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) ; } 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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightParam (pub i64) ; impl LightParam { pub const ENERGY : LightParam = LightParam (0i64) ; pub const SPECULAR : LightParam = LightParam (2i64) ; pub const RANGE : LightParam = LightParam (3i64) ; pub const ATTENUATION : LightParam = LightParam (4i64) ; pub const SPOT_ANGLE : LightParam = LightParam (5i64) ; pub const SPOT_ATTENUATION : LightParam = LightParam (6i64) ; pub const CONTACT_SHADOW_SIZE : LightParam = LightParam (7i64) ; pub const SHADOW_MAX_DISTANCE : LightParam = LightParam (8i64) ; pub const SHADOW_SPLIT_1_OFFSET : LightParam = LightParam (9i64) ; pub const SHADOW_SPLIT_2_OFFSET : LightParam = LightParam (10i64) ; pub const SHADOW_SPLIT_3_OFFSET : LightParam = LightParam (11i64) ; pub const SHADOW_NORMAL_BIAS : LightParam = LightParam (12i64) ; pub const SHADOW_BIAS : LightParam = LightParam (13i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : LightParam = LightParam (14i64) ; pub const MAX : LightParam = LightParam (15i64) ; } 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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 USAGE_VIDEO_MEM_TOTAL : RenderInfo = RenderInfo (8i64) ; pub const VIDEO_MEM_USED : RenderInfo = RenderInfo (9i64) ; pub const TEXTURE_MEM_USED : RenderInfo = RenderInfo (10i64) ; pub const VERTEX_MEM_USED : RenderInfo = RenderInfo (11i64) ; } 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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualServer { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 97280i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const CANVAS_ITEM_Z_MAX : i64 = 4096i64 ; pub const CANVAS_ITEM_Z_MIN : i64 = - 4096i64 ; pub const CANVAS_LIGHT_FILTER_NONE : i64 = 0i64 ; pub const CANVAS_LIGHT_FILTER_PCF13 : i64 = 5i64 ; pub const CANVAS_LIGHT_FILTER_PCF3 : i64 = 1i64 ; pub const CANVAS_LIGHT_FILTER_PCF5 : i64 = 2i64 ; pub const CANVAS_LIGHT_FILTER_PCF7 : i64 = 3i64 ; pub const CANVAS_LIGHT_FILTER_PCF9 : i64 = 4i64 ; pub const CANVAS_LIGHT_MODE_ADD : i64 = 0i64 ; pub const CANVAS_LIGHT_MODE_MASK : i64 = 3i64 ; pub const CANVAS_LIGHT_MODE_MIX : i64 = 2i64 ; pub const CANVAS_LIGHT_MODE_SUB : i64 = 1i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE : i64 = 1i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE : i64 = 2i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_DISABLED : i64 = 0i64 ; pub const CUBEMAP_BACK : i64 = 5i64 ; pub const CUBEMAP_BOTTOM : i64 = 2i64 ; pub const CUBEMAP_FRONT : i64 = 4i64 ; pub const CUBEMAP_LEFT : i64 = 0i64 ; pub const CUBEMAP_RIGHT : i64 = 1i64 ; pub const CUBEMAP_TOP : i64 = 3i64 ; pub const ENV_BG_CANVAS : i64 = 4i64 ; pub const ENV_BG_CLEAR_COLOR : i64 = 0i64 ; pub const ENV_BG_COLOR : i64 = 1i64 ; pub const ENV_BG_COLOR_SKY : i64 = 3i64 ; pub const ENV_BG_KEEP : i64 = 5i64 ; pub const ENV_BG_MAX : i64 = 7i64 ; pub const ENV_BG_SKY : i64 = 2i64 ; pub const ENV_DOF_BLUR_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_DOF_BLUR_QUALITY_LOW : i64 = 0i64 ; pub const ENV_DOF_BLUR_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_SSAO_BLUR_1x1 : i64 = 1i64 ; pub const ENV_SSAO_BLUR_2x2 : i64 = 2i64 ; pub const ENV_SSAO_BLUR_3x3 : i64 = 3i64 ; pub const ENV_SSAO_BLUR_DISABLED : i64 = 0i64 ; pub const ENV_SSAO_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_SSAO_QUALITY_LOW : i64 = 0i64 ; pub const ENV_SSAO_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_TONE_MAPPER_ACES : i64 = 3i64 ; pub const ENV_TONE_MAPPER_FILMIC : i64 = 2i64 ; pub const ENV_TONE_MAPPER_LINEAR : i64 = 0i64 ; pub const ENV_TONE_MAPPER_REINHARD : i64 = 1i64 ; pub const FEATURE_MULTITHREADED : i64 = 1i64 ; pub const FEATURE_SHADERS : i64 = 0i64 ; pub const GLOW_BLEND_MODE_ADDITIVE : i64 = 0i64 ; pub const GLOW_BLEND_MODE_REPLACE : i64 = 3i64 ; pub const GLOW_BLEND_MODE_SCREEN : i64 = 1i64 ; pub const GLOW_BLEND_MODE_SOFTLIGHT : i64 = 2i64 ; pub const INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const INFO_TEXTURE_MEM_USED : i64 = 10i64 ; pub const INFO_USAGE_VIDEO_MEM_TOTAL : i64 = 8i64 ; pub const INFO_VERTEX_MEM_USED : i64 = 11i64 ; pub const INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const INFO_VIDEO_MEM_USED : i64 = 9i64 ; pub const INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const INSTANCE_FLAG_MAX : i64 = 2i64 ; pub const INSTANCE_FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const INSTANCE_GEOMETRY_MASK : i64 = 30i64 ; pub const INSTANCE_GI_PROBE : i64 = 7i64 ; pub const INSTANCE_IMMEDIATE : i64 = 3i64 ; pub const INSTANCE_LIGHT : i64 = 5i64 ; pub const INSTANCE_LIGHTMAP_CAPTURE : i64 = 8i64 ; pub const INSTANCE_MAX : i64 = 9i64 ; pub const INSTANCE_MESH : i64 = 1i64 ; pub const INSTANCE_MULTIMESH : i64 = 2i64 ; pub const INSTANCE_NONE : i64 = 0i64 ; pub const INSTANCE_PARTICLES : i64 = 4i64 ; pub const INSTANCE_REFLECTION_PROBE : i64 = 6i64 ; pub const LIGHT_BAKE_ALL : i64 = 2i64 ; pub const LIGHT_BAKE_DISABLED : i64 = 0i64 ; pub const LIGHT_BAKE_INDIRECT : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS : i64 = 2i64 ; 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_OMNI_SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const LIGHT_OMNI_SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; pub const LIGHT_PARAM_ATTENUATION : i64 = 4i64 ; pub const LIGHT_PARAM_CONTACT_SHADOW_SIZE : i64 = 7i64 ; pub const LIGHT_PARAM_ENERGY : i64 = 0i64 ; pub const LIGHT_PARAM_MAX : i64 = 15i64 ; pub const LIGHT_PARAM_RANGE : i64 = 3i64 ; pub const LIGHT_PARAM_SHADOW_BIAS : i64 = 13i64 ; pub const LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 14i64 ; pub const LIGHT_PARAM_SHADOW_MAX_DISTANCE : i64 = 8i64 ; pub const LIGHT_PARAM_SHADOW_NORMAL_BIAS : i64 = 12i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 9i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 10i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 11i64 ; pub const LIGHT_PARAM_SPECULAR : i64 = 2i64 ; pub const LIGHT_PARAM_SPOT_ANGLE : i64 = 5i64 ; pub const LIGHT_PARAM_SPOT_ATTENUATION : i64 = 6i64 ; pub const LIGHT_SPOT : i64 = 2i64 ; pub const MATERIAL_RENDER_PRIORITY_MAX : i64 = 127i64 ; pub const MATERIAL_RENDER_PRIORITY_MIN : i64 = - 128i64 ; pub const MAX_CURSORS : i64 = 8i64 ; pub const MAX_GLOW_LEVELS : i64 = 7i64 ; pub const MULTIMESH_COLOR_8BIT : i64 = 1i64 ; pub const MULTIMESH_COLOR_FLOAT : i64 = 2i64 ; pub const MULTIMESH_COLOR_NONE : i64 = 0i64 ; pub const MULTIMESH_CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const MULTIMESH_CUSTOM_DATA_FLOAT : i64 = 2i64 ; pub const MULTIMESH_CUSTOM_DATA_NONE : i64 = 0i64 ; pub const MULTIMESH_TRANSFORM_2D : i64 = 0i64 ; pub const MULTIMESH_TRANSFORM_3D : i64 = 1i64 ; pub const NINE_PATCH_STRETCH : i64 = 0i64 ; pub const NINE_PATCH_TILE : i64 = 1i64 ; pub const NINE_PATCH_TILE_FIT : i64 = 2i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; pub const PARTICLES_DRAW_ORDER_INDEX : i64 = 0i64 ; pub const PARTICLES_DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const PARTICLES_DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const PRIMITIVE_MAX : i64 = 7i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; pub const REFLECTION_PROBE_UPDATE_ALWAYS : i64 = 1i64 ; pub const REFLECTION_PROBE_UPDATE_ONCE : i64 = 0i64 ; pub const SCENARIO_DEBUG_DISABLED : i64 = 0i64 ; pub const SCENARIO_DEBUG_OVERDRAW : i64 = 2i64 ; pub const SCENARIO_DEBUG_SHADELESS : i64 = 3i64 ; pub const SCENARIO_DEBUG_WIREFRAME : i64 = 1i64 ; pub const SHADER_CANVAS_ITEM : i64 = 1i64 ; pub const SHADER_MAX : i64 = 3i64 ; pub const SHADER_PARTICLES : i64 = 2i64 ; pub const SHADER_SPATIAL : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; pub const TEXTURE_FLAGS_DEFAULT : i64 = 7i64 ; pub const TEXTURE_FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const TEXTURE_FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const TEXTURE_FLAG_FILTER : i64 = 4i64 ; pub const TEXTURE_FLAG_MIPMAPS : i64 = 1i64 ; pub const TEXTURE_FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const TEXTURE_FLAG_REPEAT : i64 = 2i64 ; pub const TEXTURE_FLAG_USED_FOR_STREAMING : i64 = 2048i64 ; pub const TEXTURE_TYPE_2D : i64 = 0i64 ; pub const TEXTURE_TYPE_2D_ARRAY : i64 = 3i64 ; pub const TEXTURE_TYPE_3D : i64 = 4i64 ; pub const TEXTURE_TYPE_CUBEMAP : i64 = 2i64 ; pub const VIEWPORT_CLEAR_ALWAYS : i64 = 0i64 ; pub const VIEWPORT_CLEAR_NEVER : i64 = 1i64 ; pub const VIEWPORT_CLEAR_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const VIEWPORT_DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const VIEWPORT_DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const VIEWPORT_DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const VIEWPORT_DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const VIEWPORT_MSAA_16X : i64 = 4i64 ; pub const VIEWPORT_MSAA_2X : i64 = 1i64 ; pub const VIEWPORT_MSAA_4X : i64 = 2i64 ; pub const VIEWPORT_MSAA_8X : i64 = 3i64 ; pub const VIEWPORT_MSAA_DISABLED : i64 = 0i64 ; pub const VIEWPORT_MSAA_EXT_2X : i64 = 5i64 ; pub const VIEWPORT_MSAA_EXT_4X : i64 = 6i64 ; pub const VIEWPORT_RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const VIEWPORT_RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const VIEWPORT_RENDER_INFO_MAX : i64 = 8i64 ; pub const VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const VIEWPORT_UPDATE_ALWAYS : i64 = 3i64 ; pub const VIEWPORT_UPDATE_DISABLED : i64 = 0i64 ; pub const VIEWPORT_UPDATE_ONCE : i64 = 1i64 ; pub const VIEWPORT_UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const VIEWPORT_USAGE_2D : i64 = 0i64 ; pub const VIEWPORT_USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const VIEWPORT_USAGE_3D : i64 = 2i64 ; pub const VIEWPORT_USAGE_3D_NO_EFFECTS : i64 = 3i64 ; } 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\u{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 = ""] # [inline] pub 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 :: icallptr_void_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 [method 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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , left , top , right , bottom) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera.cull_mask]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , camera , layers) ; } } # [doc = "Sets the environment used by this camera. Equivalent to [member Camera.environment]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_f64_vec2_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size , offset , z_near , z_far) ; } } # [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 = ""] # [inline] pub 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 :: icallptr_void_rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size , z_near , z_far) ; } } # [doc = "Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , fovy_degrees , z_near , z_far) ; } } # [doc = "Sets [Transform] of camera."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , camera , transform) ; } } # [doc = "If `true`, preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If `false`, preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , camera , enable) ; } } # [doc = "Creates a canvas and returns the assigned [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Adds a circle command to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec2_f64_color (method_bind , self . this . sys () . as_ptr () , item , pos , radius , color) ; } } # [doc = "If ignore is `true`, the VisualServer does not perform clipping."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , ignore) ; } } # [doc = "Adds a line command to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec2_vec2_color_f64_bool (method_bind , self . this . sys () . as_ptr () , item , from , to , color , width , antialiased) ; } } # [doc = "Adds a mesh command to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans2D_color_rid_rid (method_bind , self . this . sys () . as_ptr () , item , mesh , transform , modulate , texture , normal_map) ; } } # [doc = "Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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]'s draw commands.\nSee [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 = ""] # [inline] pub 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 :: icallptr_void_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 , y_axis_mode , draw_center , modulate , normal_map) ; } } # [doc = "Adds a particle system to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , item , particles , texture , normal_map) ; } } # [doc = "Adds a polygon to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_polygon (& self , item : Rid , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , 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 :: icallptr_void_rid_vec2arr_colorarr_vec2arr_rid_rid_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , normal_map , antialiased) ; } } # [doc = "Adds a polyline, which is a line from multiple points with a width, to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_polyline (& self , item : Rid , points : Vector2Array , colors : ColorArray , 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 :: icallptr_void_rid_vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , width , antialiased) ; } } # [doc = "Adds a primitive to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`"] # [doc = ""] # [inline] pub fn canvas_item_add_primitive (& self , item : Rid , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , 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 :: icallptr_void_rid_vec2arr_colorarr_vec2arr_rid_f64_rid (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , width , normal_map) ; } } # [doc = "Adds a rectangle to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rect2_color (method_bind , self . this . sys () . as_ptr () , item , rect , color) ; } } # [doc = "Adds a [Transform2D] command to the [CanvasItem]'s draw commands.\nThis sets the extra_matrix uniform when executed. This affects the later commands of the canvas item."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Adds a textured rect to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `tile` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rect2_rid_bool_color_bool_rid (method_bind , self . this . sys () . as_ptr () , item , rect , texture , tile , modulate , transpose , normal_map) ; } } # [doc = "Adds a texture rect with region setting to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `clip_uv` - `true`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rect2_rid_rect2_color_bool_rid_bool (method_bind , self . this . sys () . as_ptr () , item , rect , texture , src_rect , modulate , transpose , normal_map , clip_uv) ; } } # [doc = "Adds a triangle array to the [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 = ""] # [inline] pub fn canvas_item_add_triangle_array (& self , item : Rid , indices : Int32Array , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , bones : Int32Array , weights : Float32Array , 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 :: icallptr_void_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 , normal_map , antialiased , antialiasing_use_indices) ; } } # [doc = "Clears the [CanvasItem] and removes all commands in it."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , item) ; } } # [doc = "Creates a new [CanvasItem] and returns its [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets clipping for the [CanvasItem]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , clip) ; } } # [doc = "Sets the [CanvasItem] to copy a rect to the backbuffer."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , enabled , rect) ; } } # [doc = "Defines a custom drawing rectangle for the [CanvasItem].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , use_custom_rect , rect) ; } } # [doc = "Enables the use of distance fields for GUI elements that are rendering distance field based fonts."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets [CanvasItem] to be drawn behind its parent."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the index for the [CanvasItem]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , index) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , mask) ; } } # [doc = "Sets a new material to the [CanvasItem]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , item , material) ; } } # [doc = "Sets the color that modulates the [CanvasItem] and its children."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , item , parent) ; } } # [doc = "Sets the color that modulates the [CanvasItem] without children."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets if [CanvasItem]'s children should be sorted by y-position."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the [CanvasItem]'s [Transform2D]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Sets if the [CanvasItem] uses its parent's material."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets if the canvas item (including its children) is visible."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , visible) ; } } # [doc = "If this is enabled, the Z index of the parent will be added to the children's Z index."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , z_index) ; } } # [doc = "Attaches the canvas light to the canvas. Removes it from its previous canvas."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Attaches a light occluder to the canvas. Removes it from its previous canvas."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Enables or disables light occluder."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , occluder , enabled) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder , mask) ; } } # [doc = "Sets a light occluder's polygon."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , occluder , polygon) ; } } # [doc = "Sets a light occluder's [Transform2D]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , occluder , transform) ; } } # [doc = "Sets the color for a light."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables a canvas light."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets a canvas light's energy."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , energy) ; } } # [doc = "Sets a canvas light's height."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , height) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "The layer range that gets rendered with this light."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_layer , max_layer) ; } } # [doc = "The mode of the light, see [enum CanvasLightMode] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [doc = "Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , scale) ; } } # [doc = "Sets the width of the shadow buffer, size gets scaled to the next power of two for this."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , size) ; } } # [doc = "Sets the color of the canvas light's shadow."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables the canvas light's shadow."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , filter) ; } } # [doc = "Sets the length of the shadow's gradient."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , length) ; } } # [doc = "Smoothens the shadow. The lower, the smoother."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , smooth) ; } } # [doc = "Sets texture to be used by light. Equivalent to [member Light2D.texture]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , light , texture) ; } } # [doc = "Sets the offset of the light's texture. Equivalent to [member Light2D.offset]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , light , offset) ; } } # [doc = "Sets the canvas light's [Transform2D]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member Light2D.range_z_min] and [member Light2D.range_z_max]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_z , max_z) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder_polygon , mode) ; } } # [doc = "Sets the shape of the occluder polygon."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_set_shape (& self , occluder_polygon : Rid , shape : Vector2Array , closed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr_bool (method_bind , self . this . sys () . as_ptr () , occluder_polygon , shape , closed) ; } } # [doc = "Sets the shape of the occluder polygon as lines."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_set_shape_as_lines (& self , occluder_polygon : Rid , shape : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape_as_lines ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_vec2 (method_bind , self . this . sys () . as_ptr () , canvas , item , mirroring) ; } } # [doc = "Modulates all colors in the given canvas."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method free_rid] static method.\nTo place in a scene, attach this directional light to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Draws a frame. [i]This method is deprecated[/i], please use [method 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 :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers , frame_step) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the values to be used with the \"Adjustment\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64_rid (method_bind , self . this . sys () . as_ptr () , env , enable , brightness , contrast , saturation , ramp) ; } } # [doc = "Sets the ambient light parameters. See [Environment] for more details.\n# Default Arguments\n* `energy` - `1.0`\n* `sky_contibution` - `0.0`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , color , energy , sky_contibution) ; } } # [doc = "Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , env , bg) ; } } # [doc = "Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , env , color) ; } } # [doc = "Sets the intensity of the background color."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , env , energy) ; } } # [doc = "Sets the maximum layer to use if using Canvas background mode."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , env , max_layer) ; } } # [doc = "Sets the values to be used with the \"DoF Far Blur\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable , distance , transition , far_amount , quality) ; } } # [doc = "Sets the values to be used with the \"DoF Near Blur\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable , distance , transition , far_amount , quality) ; } } # [doc = "Sets the variables to be used with the scene fog. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_color_color_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , color , sun_color , sun_amount) ; } } # [doc = "Sets the variables to be used with the fog depth effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64_bool_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , depth_begin , depth_end , depth_curve , transmit , transmit_curve) ; } } # [doc = "Sets the variables to be used with the fog height effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , min_height , max_height , height_curve) ; } } # [doc = "Sets the variables to be used with the \"glow\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_glow ; let ret = crate :: icalls :: icallptr_void_rid_bool_i64_f64_f64_f64_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , env , enable , level_flags , intensity , strength , bloom_threshold , blend_mode , hdr_bleed_threshold , hdr_bleed_scale , hdr_luminance_cap , bicubic_upscale) ; } } # [doc = "Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , env , sky) ; } } # [doc = "Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , env , scale) ; } } # [doc = "Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_f64_f64_f64_f64_f64_f64_f64_color_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , radius , intensity , radius2 , intensity2 , bias , light_affect , ao_channel_affect , color , quality , blur , bilateral_sharpness) ; } } # [doc = "Sets the variables to be used with the \"screen space reflections\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , env , enable , max_steps , fade_in , fade_out , depth_tolerance , roughness) ; } } # [doc = "Sets the variables to be used with the \"tonemap\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64_f64_bool_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , tone_mapper , exposure , white , auto_exposure , min_luminance , max_luminance , auto_exp_speed , auto_exp_grey) ; } } # [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 :: icallptr_void (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]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 :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers , frame_step) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries to free an object in the VisualServer."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns a certain information, see [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , info) ; ret as _ } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 [method free_rid] static method.\nTo place in a scene, attach this GI probe to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the axis-aligned bounding box that covers the full extent of the GI probe."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , probe) ; mem :: transmute (ret) } } # [doc = "Returns the cell size set by [method gi_probe_set_cell_size]."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the data used by the GI probe."] # [doc = ""] # [inline] pub fn gi_probe_get_dynamic_data (& self , probe : Rid) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_dynamic_data ; let ret = crate :: icalls :: icallptr_i32arr_rid (method_bind , self . this . sys () . as_ptr () , probe) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the Transform set by [method gi_probe_set_to_cell_xform]."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid (method_bind , self . this . sys () . as_ptr () , probe) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns `true` if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias) ; } } # [doc = "Sets the axis-aligned bounding box that covers the extent of the GI probe."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , probe , bounds) ; } } # [doc = "Sets the size of individual cells within the GI probe."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , range) ; } } # [doc = "Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself."] # [doc = ""] # [inline] pub fn gi_probe_set_dynamic_data (& self , probe : Rid , data : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_dynamic_data ; let ret = crate :: icalls :: icallptr_void_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 [member GIProbe.dynamic_range]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , range) ; } } # [doc = "Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy) ; } } # [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 [member GIProbe.interior]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [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 [member GIProbe.normal_bias]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias) ; } } # [doc = "Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , propagation) ; } } # [doc = "Sets the to cell [Transform] for this GI probe."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , probe , xform) ; } } # [doc = "Returns `true` if changes have been made to the VisualServer's data. [method draw] is usually called if this happens."] # [doc = ""] # [inline] pub fn has_changed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_changed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , feature) ; ret as _ } } # [doc = "Returns `true` if the OS supports a certain feature. Features might be `s3tc`, `etc`, `etc2` and `pvrtc`."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , feature . into ()) ; ret as _ } } # [doc = "Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , immediate , primitive , texture) ; } } # [doc = "Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method free_rid] static method.\nTo place in a scene, attach this immediate geometry to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Returns the material assigned to the [ImmediateGeometry]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; Rid :: from_sys (ret) } } # [doc = "Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , immediate , normal) ; } } # [doc = "Sets the material to be used to draw the [ImmediateGeometry]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , immediate , material) ; } } # [doc = "Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_plane (method_bind , self . this . sys () . as_ptr () , immediate , tangent) ; } } # [doc = "Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , tex_uv) ; } } # [doc = "Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method ImmediateGeometry.add_vertex]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void (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 [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , id) ; } } # [doc = "Attaches a skeleton to an instance. Removes the previous skeleton from the instance."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method 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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 [method free_rid] static method."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , base , scenario) ; Rid :: from_sys (ret) } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , as_lod_of_instance) ; } } # [doc = "Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , shadow_casting_setting) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , instance , min , max , min_margin , max_margin) ; } } # [doc = "Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , instance , flag , enabled) ; } } # [doc = "Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , instance , shape , weight) ; } } # [doc = "Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , instance , aabb) ; } } # [doc = "Function not implemented in Godot 3.x."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , instance , enabled) ; } } # [doc = "Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , instance , margin) ; } } # [doc = "Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , mask) ; } } # [doc = "Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , scenario) ; } } # [doc = "Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , instance , surface , material) ; } } # [doc = "Sets the world space transform of the instance. Equivalent to [member Spatial.transform]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Sets the lightmap to use with this instance."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_rid_i64_rect2 (method_bind , self . this . sys () . as_ptr () , instance , lightmap_instance , lightmap , lightmap_slice , lightmap_uv_rect) ; } } # [doc = "Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , instance , visible) ; } } # [doc = "Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [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 = ""] # [inline] pub 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] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [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 = ""] # [inline] pub 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] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [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 = ""] # [inline] pub 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable) ; } } # [doc = "Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , range_mode) ; } } # [doc = "Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [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 [member OmniLight.omni_shadow_detail]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , detail) ; } } # [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 [member OmniLight.omni_shadow_mode]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , bake_mode) ; } } # [doc = "Sets the color of the light. Equivalent to [member Light.light_color]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member Light.light_cull_mask]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "If `true`, light will subtract light instead of adding light. Equivalent to [member Light.light_negative]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable) ; } } # [doc = "Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , light , param , value) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "If `true`, light will cast shadows. Equivalent to [member Light.shadow_enabled]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Sets whether GI probes capture light information from this light."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [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 [method free_rid] static method.\nTo place in a scene, attach this lightmap capture to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the size of the lightmap capture area."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , capture) ; mem :: transmute (ret) } } # [doc = "Returns the energy multiplier used by the lightmap capture."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Returns the octree used by the lightmap capture."] # [doc = ""] # [inline] pub fn lightmap_capture_get_octree (& self , capture : Rid) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree ; let ret = crate :: icalls :: icallptr_bytearr_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the cell subdivision amount used by this lightmap capture's octree."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Returns the cell transform for this lightmap capture's octree."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid (method_bind , self . this . sys () . as_ptr () , capture) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , capture , bounds) ; } } # [doc = "Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , capture , energy) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , capture , interior) ; } } # [doc = "Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_octree (& self , capture : Rid , octree : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree ; let ret = crate :: icalls :: icallptr_void_rid_bytearr (method_bind , self . this . sys () . as_ptr () , capture , octree) ; } } # [doc = "Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , capture , subdiv) ; } } # [doc = "Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_rid_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , latitudes , longitudes , radius) ; Rid :: from_sys (ret) } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a certain material's parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the default value for the param if available. Otherwise returns an empty [Variant]."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , shader_material) ; Rid :: from_sys (ret) } } # [doc = "Sets a material's line width."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , material , width) ; } } # [doc = "Sets an object's next material."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , material , next_material) ; } } # [doc = "Sets a material's parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , material , priority) ; } } # [doc = "Sets a shader material's shader."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , shader_material , shader) ; } } # [doc = "Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types.\n# Default Arguments\n* `blend_shapes` - `[  ]`\n* `compress_format` - `97280`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , mesh , primitive , arrays , blend_shapes , compress_format) ; } } # [doc = "Removes all surfaces from a mesh."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method free_rid] static method.\nTo place in a scene, attach this mesh to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns a mesh's blend shape count."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; ret as _ } } # [doc = "Returns a mesh's blend shape mode."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; crate :: generated :: visual_server :: BlendShapeMode (ret) } } # [doc = "Returns a mesh's custom aabb."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; mem :: transmute (ret) } } # [doc = "Returns a mesh's number of surfaces."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; ret as _ } } # [doc = "Removes a mesh's surface."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , index) ; } } # [doc = "Sets a mesh's blend shape count."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , amount) ; } } # [doc = "Sets a mesh's blend shape mode."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , mode) ; } } # [doc = "Sets a mesh's custom aabb."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , mesh , aabb) ; } } # [doc = "Returns a mesh's surface's aabb."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; mem :: transmute (ret) } } # [doc = "Returns a mesh's surface's vertex buffer."] # [doc = ""] # [inline] pub fn mesh_surface_get_array (& self , mesh : Rid , surface : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array ; let ret = crate :: icalls :: icallptr_bytearr_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ByteArray :: from_sys (ret) } } # [doc = "Returns a mesh's surface's amount of indices."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [doc = "Returns a mesh's surface's amount of vertices."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [doc = "Returns a mesh's surface's buffer arrays."] # [doc = ""] # [inline] pub 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's arrays for blend shapes."] # [doc = ""] # [inline] pub 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the format of a mesh's surface."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [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 :: icallptr_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format , vertex_len , index_len , array_index) ; ret as _ } } # [doc = "Function is unused in Godot 3.x."] # [doc = ""] # [inline] pub fn mesh_surface_get_format_stride (& self , format : i64 , vertex_len : i64 , index_len : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format_stride ; let ret = crate :: icalls :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format , vertex_len , index_len) ; ret as _ } } # [doc = "Returns a mesh's surface's index buffer."] # [doc = ""] # [inline] pub fn mesh_surface_get_index_array (& self , mesh : Rid , surface : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_index_array ; let ret = crate :: icalls :: icallptr_bytearr_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ByteArray :: from_sys (ret) } } # [doc = "Returns a mesh's surface's material."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; Rid :: from_sys (ret) } } # [doc = "Returns the primitive type of a mesh's surface."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; crate :: generated :: visual_server :: PrimitiveType (ret) } } # [doc = "Returns the aabb of a mesh's surface's skeleton."] # [doc = ""] # [inline] pub 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a mesh's surface's material."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh , surface , 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 = ""] # [inline] pub fn mesh_surface_update_region (& self , mesh : Rid , surface : i64 , offset : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_update_region ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , mesh , surface , offset , data) ; } } # [doc = "Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count].\n# Default Arguments\n* `custom_data_format` - `0`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , instances , transform_format , color_format , custom_data_format) ; } } # [doc = "Creates a new multimesh on the VisualServer and returns an [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 [method free_rid] static method.\nTo place in a scene, attach this multimesh to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; mem :: transmute (ret) } } # [doc = "Returns the number of instances allocated for this multimesh."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; ret as _ } } # [doc = "Returns the RID of the mesh that will be used in drawing this multimesh."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of visible instances for this multimesh."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; ret as _ } } # [doc = "Returns the color by which the specified instance will be modulated."] # [doc = ""] # [inline] pub 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 :: icallptr_color_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the custom data associated with the specified instance."] # [doc = ""] # [inline] pub 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 :: icallptr_color_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform] of the specified instance."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms."] # [doc = ""] # [inline] pub 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 :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index , color) ; } } # [doc = "Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a `vec4` in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index , custom_data) ; } } # [doc = "Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , multimesh , index , transform) ; } } # [doc = "Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , multimesh , index , 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] is stored as 12 floats, [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 multimesh_set_as_bulk_array (& self , multimesh : Rid , array : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_as_bulk_array ; let ret = crate :: icalls :: icallptr_void_rid_f32arr (method_bind , self . this . sys () . as_ptr () , multimesh , array) ; } } # [doc = "Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member MultiMesh.visible_instance_count]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , visible) ; } } # [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 [method free_rid] static method.\nTo place in a scene, attach this omni light to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 [method free_rid] static method.\nTo place in a scene, attach these particles to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]."] # [doc = ""] # [inline] pub 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 :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , particles) ; mem :: transmute (ret) } } # [doc = "Returns `true` if particles are currently set to emitting."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , particles) ; ret as _ } } # [doc = "Returns `true` if particles are not emitting and particles are set to inactive."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , particles) ; ret as _ } } # [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 [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , particles) ; } } # [doc = "Reset the particles on the next update. Equivalent to [method Particles.restart]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member Particles.amount]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , amount) ; } } # [doc = "Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , order) ; } } # [doc = "Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , particles , pass , mesh) ; } } # [doc = "Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , count) ; } } # [doc = "Sets the [Transform] that will be used by the particles when they first emit."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member Particles.emitting]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , emitting) ; } } # [doc = "Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio) ; } } # [doc = "Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , fps) ; } } # [doc = "If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable) ; } } # [doc = "Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , lifetime) ; } } # [doc = "If `true`, particles will emit once and then stop. Equivalent to [member Particles.one_shot]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , one_shot) ; } } # [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 [member Particles.preprocess]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , time) ; } } # [doc = "Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member Particles.randomness]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio) ; } } # [doc = "Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , scale) ; } } # [doc = "If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to [member Particles.local_coords]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable) ; } } # [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 [method free_rid] static method.\nTo place in a scene, attach this reflection probe to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "If `true`, reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [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 [member ReflectionProbe.cull_mask]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , layers) ; } } # [doc = "If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member ReflectionProbe.intensity]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , intensity) ; } } # [doc = "Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member ReflectionProbe.interior_ambient_energy]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy) ; } } # [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 [member ReflectionProbe.interior_ambient_contrib]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , contrib) ; } } # [doc = "Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , distance) ; } } # [doc = "Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [enum ReflectionProbeUpdateMode] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , mode) ; } } # [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 :: 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 :: icallptr_void_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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , scenario , debug_mode) ; } } # [doc = "Sets the environment that will be used with this scenario."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , scenario , size , subdiv) ; } } # [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 :: 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 :: icallptr_void_obj_color_bool_bool (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , color , scale , use_filter) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , generate) ; } } # [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 :: icallptr_void_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 [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns a shader's code."] # [doc = ""] # [inline] pub 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 :: icallptr_str_rid (method_bind , self . this . sys () . as_ptr () , shader) ; GodotString :: from_sys (ret) } } # [doc = "Returns a default texture from a shader searched by name."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_str (method_bind , self . this . sys () . as_ptr () , shader , name . into ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the parameters of a shader."] # [doc = ""] # [inline] pub 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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , skeleton , bones , is_2d_skeleton) ; } } # [doc = "Returns the [Transform] set for a specific bone of this skeleton."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] set for a specific bone of this skeleton."] # [doc = ""] # [inline] pub 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 :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone) ; mem :: transmute (ret) } } # [doc = "Sets the [Transform] for a specific bone of this skeleton."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , skeleton , bone , transform) ; } } # [doc = "Sets the [Transform2D] for a specific bone of this skeleton."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , skeleton , bone , 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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of bones allocated for this skeleton."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , skeleton) ; ret as _ } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets a sky's texture."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , sky , cube_map , radiance_size) ; } } # [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 [method free_rid] static method.\nTo place in a scene, attach this spot light to an instance using [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Allocates the GPU memory for the texture.\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width , height , depth_3d , format , _type , flags) ; } } # [doc = "Binds the texture to a texture slot."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , number) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: 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 :: icallptr_rid_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags) ; Rid :: from_sys (ret) } } # [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] of the image at one of the cubes sides.\n# Default Arguments\n* `cube_side` - `0`"] # [doc = ""] # [inline] pub fn texture_get_data (& self , texture : Rid , cube_side : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_data ; let ret = crate :: icalls :: icallptr_obj_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , cube_side) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the depth of the texture."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the flags of a texture."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the format of the texture's image."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; crate :: generated :: image :: Format (ret) } } # [doc = "Returns the texture's height."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the texture's path."] # [doc = ""] # [inline] pub 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 :: icallptr_str_rid (method_bind , self . this . sys () . as_ptr () , texture) ; GodotString :: from_sys (ret) } } # [doc = "Returns the opengl id of the texture's image."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the type of the texture, can be any of the [enum TextureType]."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; crate :: generated :: visual_server :: TextureType (ret) } } # [doc = "Returns the texture's width."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [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 = ""] # [inline] pub fn texture_set_data (& self , texture : Rid , image : impl AsArg < crate :: generated :: image :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_data ; let ret = crate :: icalls :: icallptr_void_rid_obj_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , layer) ; } } # [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 = ""] # [inline] pub fn texture_set_data_partial (& self , texture : Rid , image : impl AsArg < crate :: generated :: image :: 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 :: icallptr_void_rid_obj_i64_i64_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , src_x , src_y , src_w , src_h , dst_x , dst_y , dst_mip , layer) ; } } # [doc = "Sets the texture's flags. See [enum TextureFlags] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , flags) ; } } # [doc = "Sets the texture's path."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_str (method_bind , self . this . sys () . as_ptr () , texture , path . into ()) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , shrink) ; } } # [doc = "Resizes the texture to the specified dimensions."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width , height , depth) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets a viewport's camera."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , camera) ; } } # [doc = "Sets a viewport's canvas."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [member 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 a further optimization see, [method viewport_set_render_direct_to_screen].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`\n* `screen` - `0`"] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rect2_i64 (method_bind , self . this . sys () . as_ptr () , viewport , rect , screen) ; } } # [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 [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Detaches the viewport from the screen."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , viewport) ; } } # [doc = "Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , info) ; ret as _ } } # [doc = "Returns the viewport's last rendered frame."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport) ; Rid :: from_sys (ret) } } # [doc = "Detaches a viewport from a canvas and vice versa."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , canvas) ; } } # [doc = "If `true`, sets the viewport active, else sets it inactive."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , active) ; } } # [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 = ""] # [inline] pub 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 :: icallptr_void_rid_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , canvas , layer , sublayer) ; } } # [doc = "Sets the transformation of a viewport's canvas."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , canvas , offset) ; } } # [doc = "Sets the clear mode of a viewport. See [enum ViewportClearMode] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , clear_mode) ; } } # [doc = "Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , draw) ; } } # [doc = "If `true`, a viewport's 3D rendering is disabled."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled) ; } } # [doc = "If `true`, rendering of a viewport's environment is disabled."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled) ; } } # [doc = "Sets the viewport's global transformation matrix."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , transform) ; } } # [doc = "If `true`, the viewport renders to hdr."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "If `true`, the viewport's canvas is not rendered."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden) ; } } # [doc = "Currently unimplemented in Godot 3.x."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden) ; } } # [doc = "Sets the anti-aliasing mode. See [enum ViewportMSAA] for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , msaa) ; } } # [doc = "Sets the viewport's parent to another viewport."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "Sets a viewport's scenario.\nThe scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , scenario) ; } } # [doc = "Sets the shadow atlas quadrant's subdivision."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , quadrant , subdivision) ; } } # [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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , size) ; } } # [doc = "Sets the viewport's width and height."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , width , height) ; } } # [doc = "If `true`, the viewport renders its background as transparent."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , update_mode) ; } } # [doc = "Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , usage) ; } } # [doc = "If `true`, the viewport uses augmented or virtual reality technologies. See [ARVRInterface]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , use_arvr) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , debanding) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , fxaa) ; } } # [doc = "If `true`, the viewport's rendering is flipped vertically."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualServer { } unsafe impl GodotObject for VisualServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualServer" } } impl std :: ops :: Deref for VisualServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_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_time_scale : * 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_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_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_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_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_time_scale : 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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . camera_create = (gd_api . godot_method_bind_get_method) (class_name , "camera_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . camera_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_environment\u{0}" . as_ptr () as * const c_char) ; table . camera_set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_frustum\u{0}" . as_ptr () as * const c_char) ; table . camera_set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_orthogonal\u{0}" . as_ptr () as * const c_char) ; table . camera_set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_perspective\u{0}" . as_ptr () as * const c_char) ; table . camera_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . canvas_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . canvas_item_clear = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_clear\u{0}" . as_ptr () as * const c_char) ; table . canvas_item_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . canvas_light_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . canvas_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_set_modulate\u{0}" . as_ptr () as * const c_char) ; table . directional_light_create = (gd_api . godot_method_bind_get_method) (class_name , "directional_light_create\u{0}" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\u{0}" . as_ptr () as * const c_char) ; table . environment_create = (gd_api . godot_method_bind_get_method) (class_name , "environment_create\u{0}" . as_ptr () as * const c_char) ; table . environment_set_adjustment = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_adjustment\u{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\u{0}" . as_ptr () as * const c_char) ; table . environment_set_background = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_background\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . environment_set_fog = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . environment_set_glow = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_glow\u{0}" . as_ptr () as * const c_char) ; table . environment_set_sky = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . environment_set_ssao = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssao\u{0}" . as_ptr () as * const c_char) ; table . environment_set_ssr = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssr\u{0}" . as_ptr () as * const c_char) ; table . environment_set_tonemap = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_tonemap\u{0}" . as_ptr () as * const c_char) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\u{0}" . as_ptr () as * const c_char) ; table . force_draw = (gd_api . godot_method_bind_get_method) (class_name , "force_draw\u{0}" . as_ptr () as * const c_char) ; table . force_sync = (gd_api . godot_method_bind_get_method) (class_name , "force_sync\u{0}" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\u{0}" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\u{0}" . as_ptr () as * const c_char) ; table . get_test_cube = (gd_api . godot_method_bind_get_method) (class_name , "get_test_cube\u{0}" . as_ptr () as * const c_char) ; table . get_test_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_test_texture\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_white_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_white_texture\u{0}" . as_ptr () as * const c_char) ; table . gi_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_changed = (gd_api . godot_method_bind_get_method) (class_name , "has_changed\u{0}" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\u{0}" . as_ptr () as * const c_char) ; table . has_os_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_os_feature\u{0}" . as_ptr () as * const c_char) ; table . immediate_begin = (gd_api . godot_method_bind_get_method) (class_name , "immediate_begin\u{0}" . as_ptr () as * const c_char) ; table . immediate_clear = (gd_api . godot_method_bind_get_method) (class_name , "immediate_clear\u{0}" . as_ptr () as * const c_char) ; table . immediate_color = (gd_api . godot_method_bind_get_method) (class_name , "immediate_color\u{0}" . as_ptr () as * const c_char) ; table . immediate_create = (gd_api . godot_method_bind_get_method) (class_name , "immediate_create\u{0}" . as_ptr () as * const c_char) ; table . immediate_end = (gd_api . godot_method_bind_get_method) (class_name , "immediate_end\u{0}" . as_ptr () as * const c_char) ; table . immediate_get_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_get_material\u{0}" . as_ptr () as * const c_char) ; table . immediate_normal = (gd_api . godot_method_bind_get_method) (class_name , "immediate_normal\u{0}" . as_ptr () as * const c_char) ; table . immediate_set_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_set_material\u{0}" . as_ptr () as * const c_char) ; table . immediate_tangent = (gd_api . godot_method_bind_get_method) (class_name , "immediate_tangent\u{0}" . as_ptr () as * const c_char) ; table . immediate_uv = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv\u{0}" . as_ptr () as * const c_char) ; table . immediate_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv2\u{0}" . as_ptr () as * const c_char) ; table . immediate_vertex = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex\u{0}" . as_ptr () as * const c_char) ; table . immediate_vertex_2d = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex_2d\u{0}" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_attach_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "instance_attach_skeleton\u{0}" . as_ptr () as * const c_char) ; table . instance_create = (gd_api . godot_method_bind_get_method) (class_name , "instance_create\u{0}" . as_ptr () as * const c_char) ; table . instance_create2 = (gd_api . godot_method_bind_get_method) (class_name , "instance_create2\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_set_base = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_base\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_set_exterior = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_exterior\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_scenario\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . instance_set_visible = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_visible\u{0}" . as_ptr () as * const c_char) ; table . instances_cull_aabb = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_aabb\u{0}" . as_ptr () as * const c_char) ; table . instances_cull_convex = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_convex\u{0}" . as_ptr () as * const c_char) ; table . instances_cull_ray = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_ray\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . light_set_color = (gd_api . godot_method_bind_get_method) (class_name , "light_set_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . light_set_negative = (gd_api . godot_method_bind_get_method) (class_name , "light_set_negative\u{0}" . as_ptr () as * const c_char) ; table . light_set_param = (gd_api . godot_method_bind_get_method) (class_name , "light_set_param\u{0}" . as_ptr () as * const c_char) ; table . light_set_projector = (gd_api . godot_method_bind_get_method) (class_name , "light_set_projector\u{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\u{0}" . as_ptr () as * const c_char) ; table . light_set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "light_set_shadow\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . lightmap_capture_create = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . make_sphere_mesh = (gd_api . godot_method_bind_get_method) (class_name , "make_sphere_mesh\u{0}" . as_ptr () as * const c_char) ; table . material_create = (gd_api . godot_method_bind_get_method) (class_name , "material_create\u{0}" . as_ptr () as * const c_char) ; table . material_get_param = (gd_api . godot_method_bind_get_method) (class_name , "material_get_param\u{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\u{0}" . as_ptr () as * const c_char) ; table . material_get_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_get_shader\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . material_set_param = (gd_api . godot_method_bind_get_method) (class_name , "material_set_param\u{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\u{0}" . as_ptr () as * const c_char) ; table . material_set_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_set_shader\u{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\u{0}" . as_ptr () as * const c_char) ; table . mesh_clear = (gd_api . godot_method_bind_get_method) (class_name , "mesh_clear\u{0}" . as_ptr () as * const c_char) ; table . mesh_create = (gd_api . godot_method_bind_get_method) (class_name , "mesh_create\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . mesh_remove_surface = (gd_api . godot_method_bind_get_method) (class_name , "mesh_remove_surface\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . multimesh_allocate = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_allocate\u{0}" . as_ptr () as * const c_char) ; table . multimesh_create = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_create\u{0}" . as_ptr () as * const c_char) ; table . multimesh_get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_aabb\u{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\u{0}" . as_ptr () as * const c_char) ; table . multimesh_get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_mesh\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . multimesh_set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_mesh\u{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\u{0}" . as_ptr () as * const c_char) ; table . omni_light_create = (gd_api . godot_method_bind_get_method) (class_name , "omni_light_create\u{0}" . as_ptr () as * const c_char) ; table . particles_create = (gd_api . godot_method_bind_get_method) (class_name , "particles_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . particles_get_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_get_emitting\u{0}" . as_ptr () as * const c_char) ; table . particles_is_inactive = (gd_api . godot_method_bind_get_method) (class_name , "particles_is_inactive\u{0}" . as_ptr () as * const c_char) ; table . particles_request_process = (gd_api . godot_method_bind_get_method) (class_name , "particles_request_process\u{0}" . as_ptr () as * const c_char) ; table . particles_restart = (gd_api . godot_method_bind_get_method) (class_name , "particles_restart\u{0}" . as_ptr () as * const c_char) ; table . particles_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_amount\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . particles_set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_emitting\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . particles_set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_lifetime\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . reflection_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_create\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . scenario_create = (gd_api . godot_method_bind_get_method) (class_name , "scenario_create\u{0}" . as_ptr () as * const c_char) ; table . scenario_set_debug = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_debug\u{0}" . as_ptr () as * const c_char) ; table . scenario_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_environment\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_boot_image = (gd_api . godot_method_bind_get_method) (class_name , "set_boot_image\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . shader_create = (gd_api . godot_method_bind_get_method) (class_name , "shader_create\u{0}" . as_ptr () as * const c_char) ; table . shader_get_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_code\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . shader_set_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_set_code\u{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\u{0}" . as_ptr () as * const c_char) ; table . skeleton_allocate = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_allocate\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . skeleton_create = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . sky_create = (gd_api . godot_method_bind_get_method) (class_name , "sky_create\u{0}" . as_ptr () as * const c_char) ; table . sky_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "sky_set_texture\u{0}" . as_ptr () as * const c_char) ; table . spot_light_create = (gd_api . godot_method_bind_get_method) (class_name , "spot_light_create\u{0}" . as_ptr () as * const c_char) ; table . sync = (gd_api . godot_method_bind_get_method) (class_name , "sync\u{0}" . as_ptr () as * const c_char) ; table . texture_allocate = (gd_api . godot_method_bind_get_method) (class_name , "texture_allocate\u{0}" . as_ptr () as * const c_char) ; table . texture_bind = (gd_api . godot_method_bind_get_method) (class_name , "texture_bind\u{0}" . as_ptr () as * const c_char) ; table . texture_create = (gd_api . godot_method_bind_get_method) (class_name , "texture_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . texture_debug_usage = (gd_api . godot_method_bind_get_method) (class_name , "texture_debug_usage\u{0}" . as_ptr () as * const c_char) ; table . texture_get_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_data\u{0}" . as_ptr () as * const c_char) ; table . texture_get_depth = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_depth\u{0}" . as_ptr () as * const c_char) ; table . texture_get_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_flags\u{0}" . as_ptr () as * const c_char) ; table . texture_get_format = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_format\u{0}" . as_ptr () as * const c_char) ; table . texture_get_height = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_height\u{0}" . as_ptr () as * const c_char) ; table . texture_get_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_path\u{0}" . as_ptr () as * const c_char) ; table . texture_get_texid = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_texid\u{0}" . as_ptr () as * const c_char) ; table . texture_get_type = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_type\u{0}" . as_ptr () as * const c_char) ; table . texture_get_width = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_width\u{0}" . as_ptr () as * const c_char) ; table . texture_set_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_data\u{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\u{0}" . as_ptr () as * const c_char) ; table . texture_set_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_flags\u{0}" . as_ptr () as * const c_char) ; table . texture_set_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_path\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . textures_keep_original = (gd_api . godot_method_bind_get_method) (class_name , "textures_keep_original\u{0}" . as_ptr () as * const c_char) ; table . viewport_attach_camera = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_camera\u{0}" . as_ptr () as * const c_char) ; table . viewport_attach_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_canvas\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_create = (gd_api . godot_method_bind_get_method) (class_name , "viewport_create\u{0}" . as_ptr () as * const c_char) ; table . viewport_detach = (gd_api . godot_method_bind_get_method) (class_name , "viewport_detach\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_get_texture = (gd_api . godot_method_bind_get_method) (class_name , "viewport_get_texture\u{0}" . as_ptr () as * const c_char) ; table . viewport_remove_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_remove_canvas\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_active = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_active\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hdr\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_msaa\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_scenario\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_size = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_size\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_usage = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_usage\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . viewport_set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_vflip\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_server::VisualServer;
            
            pub mod audio_effect_compressor {
                use super::*;
                # [doc = "`core class AudioEffectCompressor` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 release_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_release_ms ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , attack_us) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gain) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mix) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , release_ms) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCompressor { } unsafe impl GodotObject for AudioEffectCompressor { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCompressor" } } impl std :: ops :: Deref for AudioEffectCompressor { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCompressor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectCompressor { } impl Instanciable for AudioEffectCompressor { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\u{0}" . as_ptr () as * const c_char) ; table . get_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_mix\u{0}" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_release_ms\u{0}" . as_ptr () as * const c_char) ; table . get_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "get_sidechain\u{0}" . as_ptr () as * const c_char) ; table . get_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold\u{0}" . as_ptr () as * const c_char) ; table . set_attack_us = (gd_api . godot_method_bind_get_method) (class_name , "set_attack_us\u{0}" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\u{0}" . as_ptr () as * const c_char) ; table . set_mix = (gd_api . godot_method_bind_get_method) (class_name , "set_mix\u{0}" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_release_ms\u{0}" . as_ptr () as * const c_char) ; table . set_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "set_sidechain\u{0}" . as_ptr () as * const c_char) ; table . set_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_compressor::AudioEffectCompressor;
            
            pub mod visual_shader_node_vector_refract {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorRefract` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorRefract" } } impl std :: ops :: Deref for VisualShaderNodeVectorRefract { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorRefract { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorRefract { } impl Instanciable for VisualShaderNodeVectorRefract { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_refract::VisualShaderNodeVectorRefract;
            
            pub mod visual_script_index_set {
                use super::*;
                # [doc = "`core class VisualScriptIndexSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexSet" } } impl std :: ops :: Deref for VisualScriptIndexSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIndexSet { } impl Instanciable for VisualScriptIndexSet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_index_set::VisualScriptIndexSet;
            
            pub mod audio_stream_microphone {
                use super::*;
                # [doc = "`core class AudioStreamMicrophone` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMicrophone" } } impl std :: ops :: Deref for AudioStreamMicrophone { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMicrophone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMicrophone { } impl Instanciable for AudioStreamMicrophone { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_stream_microphone::AudioStreamMicrophone;
            
            pub mod audio_effect_eq10 {
                use super::*;
                # [doc = "`core class AudioEffectEQ10` inherits `AudioEffectEQ` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ10" } } impl std :: ops :: Deref for AudioEffectEQ10 { type Target = crate :: generated :: audio_effect_eq :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ10 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_eq :: AudioEffectEQ > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ10 { } impl Instanciable for AudioEffectEQ10 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_eq10::AudioEffectEQ10;
            
            pub mod upnp_device {
                use super::*;
                # [doc = "`core class UPNPDevice` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNPDevice { pub const IGD_STATUS_DISCONNECTED : i64 = 5i64 ; pub const IGD_STATUS_HTTP_EMPTY : i64 = 2i64 ; pub const IGD_STATUS_HTTP_ERROR : i64 = 1i64 ; pub const IGD_STATUS_INVALID_CONTROL : i64 = 7i64 ; pub const IGD_STATUS_MALLOC_ERROR : i64 = 8i64 ; pub const IGD_STATUS_NO_IGD : i64 = 4i64 ; pub const IGD_STATUS_NO_URLS : i64 = 3i64 ; pub const IGD_STATUS_OK : i64 = 0i64 ; pub const IGD_STATUS_UNKNOWN_DEVICE : i64 = 6i64 ; 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 , thread_access :: 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 :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [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 :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: upnp_device :: IgdStatus (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , status) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNPDevice" } } impl std :: ops :: Deref for UPNPDevice { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNPDevice { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNPDevice { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNPDevice { } impl Instanciable for UPNPDevice { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\u{0}" . as_ptr () as * const c_char) ; table . get_description_url = (gd_api . godot_method_bind_get_method) (class_name , "get_description_url\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_status\u{0}" . as_ptr () as * const c_char) ; table . get_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_service_type\u{0}" . as_ptr () as * const c_char) ; table . is_valid_gateway = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_gateway\u{0}" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\u{0}" . as_ptr () as * const c_char) ; table . set_description_url = (gd_api . godot_method_bind_get_method) (class_name , "set_description_url\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_status\u{0}" . as_ptr () as * const c_char) ; table . set_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_service_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::upnp_device::UPNPDevice;
            
            pub mod visual_shader_node_dot_product {
                use super::*;
                # [doc = "`core class VisualShaderNodeDotProduct` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeDotProduct" } } impl std :: ops :: Deref for VisualShaderNodeDotProduct { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeDotProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeDotProduct { } impl Instanciable for VisualShaderNodeDotProduct { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_dot_product::VisualShaderNodeDotProduct;
            
            pub mod crypto_key {
                use super::*;
                # [doc = "`core class CryptoKey` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "Loads a key from `path` (\"*.key\" file)."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves a key to the given `path` (should be a \"*.key\" file)."] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for CryptoKey { } unsafe impl GodotObject for CryptoKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CryptoKey" } } impl std :: ops :: Deref for CryptoKey { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CryptoKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CryptoKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CryptoKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for CryptoKey { } impl Instanciable for CryptoKey { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CryptoKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub load : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind } impl CryptoKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoKeyMethodTable = CryptoKeyMethodTable { 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::crypto_key::CryptoKey;
            
            pub mod capsule_mesh {
                use super::*;
                # [doc = "`core class CapsuleMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 capsule mesh from the center point."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Height of the capsule mesh from the center point."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mid_height) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleMesh { } unsafe impl GodotObject for CapsuleMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleMesh" } } impl std :: ops :: Deref for CapsuleMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleMesh { } impl Instanciable for CapsuleMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\u{0}" . as_ptr () as * const c_char) ; table . set_mid_height = (gd_api . godot_method_bind_get_method) (class_name , "set_mid_height\u{0}" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::capsule_mesh::CapsuleMesh;
            
            pub mod audio_effect_chorus {
                use super::*;
                # [doc = "`core class AudioEffectChorus` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , voices) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , cutoff_hz) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , delay_ms) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , depth_ms) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , level_db) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , pan) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , rate_hz) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectChorus { } unsafe impl GodotObject for AudioEffectChorus { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectChorus" } } impl std :: ops :: Deref for AudioEffectChorus { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectChorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectChorus { } impl Instanciable for AudioEffectChorus { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_count\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_pan\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_wet = (gd_api . godot_method_bind_get_method) (class_name , "get_wet\u{0}" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\u{0}" . as_ptr () as * const c_char) ; table . set_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_count\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_pan\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_wet = (gd_api . godot_method_bind_get_method) (class_name , "set_wet\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_chorus::AudioEffectChorus;
            
            pub mod file_system_dock {
                use super::*;
                # [doc = "`tools class FileSystemDock` inherits `VBoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl FileSystemDock { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , arg0 : Vector2 , arg1 : impl OwnedToVariant , arg2 : impl AsArg < crate :: generated :: control :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallptr_bool_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , arg0 , arg1 . owned_to_variant () , arg2 . as_arg_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , arg0 : Vector2 , arg1 : impl OwnedToVariant , arg2 : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallptr_void_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , arg0 , arg1 . owned_to_variant () , arg2 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , arg0 : Vector2 , arg1 : impl AsArg < crate :: generated :: control :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallptr_var_vec2_obj (method_bind , self . this . sys () . as_ptr () , arg0 , arg1 . as_arg_ptr ()) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn navigate_to_path (& self , arg0 : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . navigate_to_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , arg0 . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FileSystemDock { } unsafe impl GodotObject for FileSystemDock { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for FileSystemDock { type Target = crate :: generated :: vbox_container :: VBoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: vbox_container :: VBoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FileSystemDock { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: vbox_container :: VBoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: vbox_container :: VBoxContainer > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: container :: Container > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: control :: Control > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: node :: Node > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\u{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\u{0}" . as_ptr () as * const c_char) ; table . navigate_to_path = (gd_api . godot_method_bind_get_method) (class_name , "navigate_to_path\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::file_system_dock::FileSystemDock;
            
            pub mod ysort {
                use super::*;
                # [doc = "`core class YSort` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for YSort { } unsafe impl GodotObject for YSort { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for YSort { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for YSort { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for YSort { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for YSort { } unsafe impl SubClass < crate :: generated :: node :: Node > for YSort { } unsafe impl SubClass < crate :: generated :: object :: Object > for YSort { } impl Instanciable for YSort { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sort_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_sort_enabled\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ysort::YSort;
            
            pub mod soft_body {
                use super::*;
                # [doc = "`core class SoftBody` inherits `MeshInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[NodePath] to a [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [SoftBody] will respond to [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , areaAngular_stiffness) ; } } # [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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , damping_coefficient) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , drag_coefficient) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_stiffness) ; } } # [doc = "[NodePath] to a [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , parent_collision_ignore . 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pose_matching_coefficient) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pressure_coefficient) ; } } # [doc = "If `true`, the [SoftBody] will respond to [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ray_pickable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , simulation_precision) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_stiffness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SoftBody { } unsafe impl GodotObject for SoftBody { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SoftBody { type Target = crate :: generated :: mesh_instance :: MeshInstance ; # [inline] fn deref (& self) -> & crate :: generated :: mesh_instance :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SoftBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh_instance :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh_instance :: MeshInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SoftBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for SoftBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for SoftBody { } impl Instanciable for SoftBody { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_areaAngular_stiffness\u{0}" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_coefficient\u{0}" . as_ptr () as * const c_char) ; table . get_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_coefficient\u{0}" . as_ptr () as * const c_char) ; table . get_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_stiffness\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure_coefficient\u{0}" . as_ptr () as * const c_char) ; table . get_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_simulation_precision\u{0}" . as_ptr () as * const c_char) ; table . get_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_total_mass\u{0}" . as_ptr () as * const c_char) ; table . get_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_stiffness\u{0}" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_areaAngular_stiffness\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_coefficient\u{0}" . as_ptr () as * const c_char) ; table . set_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_coefficient\u{0}" . as_ptr () as * const c_char) ; table . set_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_stiffness\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure_coefficient\u{0}" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\u{0}" . as_ptr () as * const c_char) ; table . set_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_simulation_precision\u{0}" . as_ptr () as * const c_char) ; table . set_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_total_mass\u{0}" . as_ptr () as * const c_char) ; table . set_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_stiffness\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::soft_body::SoftBody;
            
            pub mod visual_script_editor {
                use super::*;
                # [doc = "`tools singleton class VisualScriptEditor` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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 :: Script >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . add_custom_node ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualScriptEditor" } } impl std :: ops :: Deref for VisualScriptEditor { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_node\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_editor::VisualScriptEditor;
            
            pub mod java_script {
                use super::*;
                # [doc = "`core singleton class JavaScript` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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 = "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 :: icallptr_var_str_bool (method_bind , self . this . sys () . as_ptr () , code . into () , use_global_execution_context) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaScript { } unsafe impl GodotObject for JavaScript { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JavaScript" } } impl std :: ops :: Deref for JavaScript { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 eval : * mut sys :: godot_method_bind } impl JavaScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JavaScriptMethodTable = JavaScriptMethodTable { class_constructor : None , eval : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . eval = (gd_api . godot_method_bind_get_method) (class_name , "eval\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::java_script::JavaScript;
            
            pub mod visual_shader_node_vector_derivative_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorDerivativeFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_vector_derivative_func :: Function (ret) } } # [doc = "A derivative type. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDerivativeFunc { } unsafe impl GodotObject for VisualShaderNodeVectorDerivativeFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDerivativeFunc" } } impl std :: ops :: Deref for VisualShaderNodeVectorDerivativeFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDerivativeFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorDerivativeFunc { } impl Instanciable for VisualShaderNodeVectorDerivativeFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_derivative_func::VisualShaderNodeVectorDerivativeFunc;
            
            pub mod packed_data_container {
                use super::*;
                # [doc = "`core class PackedDataContainer` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainer { } unsafe impl GodotObject for PackedDataContainer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainer" } } impl std :: ops :: Deref for PackedDataContainer { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PackedDataContainer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PackedDataContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for PackedDataContainer { } impl Instanciable for PackedDataContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . size = (gd_api . godot_method_bind_get_method) (class_name , "size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packed_data_container::PackedDataContainer;
            
            pub mod vscroll_bar {
                use super::*;
                # [doc = "`core class VScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for VScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for VScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for VScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for VScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VScrollBar { } impl Instanciable for VScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::vscroll_bar::VScrollBar;
            
            pub mod visual_shader_node_transform_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformUniform { } unsafe impl GodotObject for VisualShaderNodeTransformUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformUniform" } } impl std :: ops :: Deref for VisualShaderNodeTransformUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformUniform { } impl Instanciable for VisualShaderNodeTransformUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTransformUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformUniformMethodTable = VisualShaderNodeTransformUniformMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_uniform::VisualShaderNodeTransformUniform;
            
            pub mod visual_shader_node_transform_decompose {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformDecompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformDecompose" } } impl std :: ops :: Deref for VisualShaderNodeTransformDecompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformDecompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformDecompose { } impl Instanciable for VisualShaderNodeTransformDecompose { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_decompose::VisualShaderNodeTransformDecompose;
            
            pub mod stream_peer_tcp {
                use super::*;
                # [doc = "`core class StreamPeerTCP` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StreamPeerTCP { pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_CONNECTING : i64 = 1i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_NONE : i64 = 0i64 ; } 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 , thread_access :: 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 [constant OK] on success or [constant 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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the status of the connection, see [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: stream_peer_tcp :: Status (ret) } } # [doc = "Returns `true` if this peer is currently connected 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Disables Nagle's algorithm to improve latency for small packets.\n**Note:** For applications that send large packets or need to transfer a lot of data, 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerTCP { } unsafe impl GodotObject for StreamPeerTCP { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerTCP" } } impl std :: ops :: Deref for StreamPeerTCP { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerTCP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerTCP { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerTCP { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerTCP { } impl Instanciable for StreamPeerTCP { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . disconnect_from_host = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_host\u{0}" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\u{0}" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\u{0}" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::stream_peer_tcp::StreamPeerTCP;
            
            pub mod capsule_shape {
                use super::*;
                # [doc = "`core class CapsuleShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape { } unsafe impl GodotObject for CapsuleShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape" } } impl std :: ops :: Deref for CapsuleShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleShape { } impl Instanciable for CapsuleShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::capsule_shape::CapsuleShape;
            
            pub mod visibility_enabler {
                use super::*;
                # [doc = "`core class VisibilityEnabler` inherits `VisibilityNotifier` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler { pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_MAX : i64 = 2i64 ; pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; } 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 , thread_access :: 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 = "If `true`, [AnimationPlayer] nodes will be paused."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , enabler) ; ret as _ } } # [doc = "If `true`, [AnimationPlayer] nodes will be paused."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , enabler , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler { } unsafe impl GodotObject for VisibilityEnabler { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityEnabler { type Target = crate :: generated :: visibility_notifier :: VisibilityNotifier ; # [inline] fn deref (& self) -> & crate :: generated :: visibility_notifier :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visibility_notifier :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visibility_notifier :: VisibilityNotifier > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityEnabler { } impl Instanciable for VisibilityEnabler { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visibility_enabler::VisibilityEnabler;
            
            pub mod visual_script_sequence {
                use super::*;
                # [doc = "`core class VisualScriptSequence` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , steps) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSequence { } unsafe impl GodotObject for VisualScriptSequence { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSequence" } } impl std :: ops :: Deref for VisualScriptSequence { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSequence { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSequence { } impl Instanciable for VisualScriptSequence { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_steps = (gd_api . godot_method_bind_get_method) (class_name , "set_steps\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_sequence::VisualScriptSequence;
            
            pub mod video_stream_theora {
                use super::*;
                # [doc = "`core class VideoStreamTheora` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamTheora" } } impl std :: ops :: Deref for VideoStreamTheora { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamTheora { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamTheora { } impl Instanciable for VideoStreamTheora { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::video_stream_theora::VideoStreamTheora;
            
            pub mod input_event_mouse_button {
                use super::*;
                # [doc = "`core class InputEventMouseButton` inherits `InputEventMouse` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The mouse button identifier, one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , doubleclick) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , factor) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseButton { } unsafe impl GodotObject for InputEventMouseButton { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseButton" } } impl std :: ops :: Deref for InputEventMouseButton { type Target = crate :: generated :: input_event_mouse :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_mouse :: InputEventMouse > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouseButton { } impl Instanciable for InputEventMouseButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\u{0}" . as_ptr () as * const c_char) ; table . is_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "is_doubleclick\u{0}" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\u{0}" . as_ptr () as * const c_char) ; table . set_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "set_doubleclick\u{0}" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_mouse_button::InputEventMouseButton;
            
            pub mod bullet_physics_direct_body_state {
                use super::*;
                # [doc = "`core class BulletPhysicsDirectBodyState` inherits `PhysicsDirectBodyState` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_bulletphysicsdirectbodystate.html) 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\nBulletPhysicsDirectBodyState inherits methods from:\n - [PhysicsDirectBodyState](struct.PhysicsDirectBodyState.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BulletPhysicsDirectBodyState { this : RawObject < Self > , } impl BulletPhysicsDirectBodyState { } impl gdnative_core :: private :: godot_object :: Sealed for BulletPhysicsDirectBodyState { } unsafe impl GodotObject for BulletPhysicsDirectBodyState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BulletPhysicsDirectBodyState" } } impl std :: ops :: Deref for BulletPhysicsDirectBodyState { type Target = crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState ; # [inline] fn deref (& self) -> & crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BulletPhysicsDirectBodyState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState > for BulletPhysicsDirectBodyState { } unsafe impl SubClass < crate :: generated :: object :: Object > for BulletPhysicsDirectBodyState { }
            }
            pub use crate::generated::bullet_physics_direct_body_state::BulletPhysicsDirectBodyState;
            
            pub mod visual_shader_node_fresnel {
                use super::*;
                # [doc = "`core class VisualShaderNodeFresnel` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeFresnel" } } impl std :: ops :: Deref for VisualShaderNodeFresnel { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeFresnel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeFresnel { } impl Instanciable for VisualShaderNodeFresnel { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_fresnel::VisualShaderNodeFresnel;
            
            pub mod animation_node_add_2 {
                use super::*;
                # [doc = "`core class AnimationNodeAdd2` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd2 { } unsafe impl GodotObject for AnimationNodeAdd2 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd2" } } impl std :: ops :: Deref for AnimationNodeAdd2 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAdd2 { } impl Instanciable for AnimationNodeAdd2 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_add_2::AnimationNodeAdd2;
            
            pub mod light_2d {
                use super::*;
                # [doc = "`core class Light2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light2D { pub const MODE_ADD : i64 = 0i64 ; pub const MODE_MASK : i64 = 3i64 ; pub const MODE_MIX : i64 = 2i64 ; pub const MODE_SUB : i64 = 1i64 ; pub const SHADOW_FILTER_NONE : i64 = 0i64 ; pub const SHADOW_FILTER_PCF13 : i64 = 5i64 ; pub const SHADOW_FILTER_PCF3 : i64 = 1i64 ; pub const SHADOW_FILTER_PCF5 : i64 = 2i64 ; pub const SHADOW_FILTER_PCF7 : i64 = 3i64 ; pub const SHADOW_FILTER_PCF9 : i64 = 4i64 ; } 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 , thread_access :: 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]."] # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The shadow mask. Used with [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Light2D's mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light_2d :: Mode (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Shadow filter type. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light_2d :: ShadowFilter (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Light2D's [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editor_only) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , item_cull_mask) ; } } # [doc = "The shadow mask. Used with [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , item_shadow_cull_mask) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "The Light2D's mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "[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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Shadow filter type. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , filter) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , multiplier) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , smooth) ; } } # [doc = "[Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light2D { } unsafe impl GodotObject for Light2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Light2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Light2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Light2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Light2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Light2D { } impl Instanciable for Light2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_filter\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_smooth\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\u{0}" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\u{0}" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shadow_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\u{0}" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_filter\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_smooth\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\u{0}" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::light_2d::Light2D;
            
            pub mod visual_script_constructor {
                use super::*;
                # [doc = "`core class VisualScriptConstructor` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptConstructor { } unsafe impl GodotObject for VisualScriptConstructor { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptConstructor" } } impl std :: ops :: Deref for VisualScriptConstructor { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptConstructor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptConstructor { } impl Instanciable for VisualScriptConstructor { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "get_constructor_type\u{0}" . as_ptr () as * const c_char) ; table . set_constructor = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor\u{0}" . as_ptr () as * const c_char) ; table . set_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_constructor::VisualScriptConstructor;
            
            pub mod dtls_server {
                use super::*;
                # [doc = "`core class DTLSServer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: crypto_key :: CryptoKey > , certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate > , chain : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallptr_i64_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 (ret as _) } } # [doc = "Try to initiate the DTLS handshake with the given `udp_peer` which must be already connected (see [method PacketPeerUDP.connect_to_host]).\n**Note**: You must check that the state of the return PacketPeerUDP is [constant 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 :: packet_peer_udp :: PacketPeerUDP >) -> Option < Ref < crate :: generated :: packet_peer_dtls :: PacketPeerDTLS , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , udp_peer . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packet_peer_dtls :: PacketPeerDTLS , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for DTLSServer { } unsafe impl GodotObject for DTLSServer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DTLSServer" } } impl std :: ops :: Deref for DTLSServer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DTLSServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for DTLSServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for DTLSServer { } impl Instanciable for DTLSServer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::dtls_server::DTLSServer;
            
            pub mod ray_cast {
                use super::*;
                # [doc = "`core class RayCast` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the collision information for the ray.\nUse 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 :: icallptr_void (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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; } } # [doc = "If `true`, collision with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, collision with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mask) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayCast { } unsafe impl GodotObject for RayCast { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RayCast { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RayCast { } unsafe impl SubClass < crate :: generated :: node :: Node > for RayCast { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayCast { } impl Instanciable for RayCast { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\u{0}" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\u{0}" . as_ptr () as * const c_char) ; table . force_raycast_update = (gd_api . godot_method_bind_get_method) (class_name , "force_raycast_update\u{0}" . as_ptr () as * const c_char) ; table . get_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_to\u{0}" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\u{0}" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\u{0}" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_colliding = (gd_api . godot_method_bind_get_method) (class_name , "is_colliding\u{0}" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\u{0}" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\u{0}" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\u{0}" . as_ptr () as * const c_char) ; table . set_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_to\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ray_cast::RayCast;
            
            pub mod area_2d {
                use super::*;
                # [doc = "`core class Area2D` inherits `CollisionObject2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area2D { pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; 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 , thread_access :: 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. Values range from `0` (no damping) to `1` (full 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. 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 also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the collision mask. Describes whether this area will collide with others on the given layer."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of intersecting [Area2D]s. For 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]s. For 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: area_2d :: SpaceOverride (ret) } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the given area 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."] # [doc = ""] # [inline] pub fn overlaps_area (& self , area : impl AsArg < crate :: generated :: node :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; ret as _ } } # [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] or a [TileMap] instance (while TileMaps 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 :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; ret as _ } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. 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 also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = Area2DMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = Area2DMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "Set/clear 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 = Area2DMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance_scale) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member 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 :: icallptr_void_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. Values range from `0` (no damping) to `1` (full 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , space_override_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area2D { } unsafe impl GodotObject for Area2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Area2D { type Target = crate :: generated :: collision_object_2d :: CollisionObject2D ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for Area2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Area2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Area2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Area2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Area2D { } impl Instanciable for Area2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\u{0}" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\u{0}" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\u{0}" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\u{0}" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\u{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\u{0}" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\u{0}" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\u{0}" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\u{0}" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\u{0}" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\u{0}" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::area_2d::Area2D;
            
            pub mod visual_script_self {
                use super::*;
                # [doc = "`core class VisualScriptSelf` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSelf" } } impl std :: ops :: Deref for VisualScriptSelf { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSelf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSelf { } impl Instanciable for VisualScriptSelf { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_self::VisualScriptSelf;
            
            pub mod animation_node_time_scale {
                use super::*;
                # [doc = "`core class AnimationNodeTimeScale` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTimeScale" } } impl std :: ops :: Deref for AnimationNodeTimeScale { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTimeScale { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeTimeScale { } impl Instanciable for AnimationNodeTimeScale { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::animation_node_time_scale::AnimationNodeTimeScale;
            
            pub mod visual_script_variable_set {
                use super::*;
                # [doc = "`core class VisualScriptVariableSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptVariableSet" } } impl std :: ops :: Deref for VisualScriptVariableSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptVariableSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptVariableSet { } impl Instanciable for VisualScriptVariableSet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_variable = (gd_api . godot_method_bind_get_method) (class_name , "set_variable\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_variable_set::VisualScriptVariableSet;
            
            pub mod visual_script_custom_node {
                use super::*;
                # [doc = "`core class VisualScriptCustomNode` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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_EXIT_FUNCTION_BIT : i64 = 134217728i64 ; pub const STEP_GO_BACK_BIT : i64 = 33554432i64 ; pub const STEP_NO_ADVANCE_BIT : i64 = 67108864i64 ; pub const STEP_PUSH_STACK_BIT : i64 = 16777216i64 ; 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCustomNode" } } impl std :: ops :: Deref for VisualScriptCustomNode { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCustomNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptCustomNode { } impl Instanciable for VisualScriptCustomNode { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_custom_node::VisualScriptCustomNode;
            
            pub mod tile_map {
                use super::*;
                # [doc = "`core class TileMap` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TileMap { pub const HALF_OFFSET_DISABLED : i64 = 2i64 ; pub const HALF_OFFSET_NEGATIVE_X : i64 = 3i64 ; pub const HALF_OFFSET_NEGATIVE_Y : i64 = 4i64 ; pub const HALF_OFFSET_X : i64 = 0i64 ; pub const HALF_OFFSET_Y : i64 = 1i64 ; pub const INVALID_CELL : i64 = - 1i64 ; pub const MODE_CUSTOM : i64 = 2i64 ; pub const MODE_ISOMETRIC : i64 = 1i64 ; pub const MODE_SQUARE : i64 = 0i64 ; pub const TILE_ORIGIN_BOTTOM_LEFT : i64 = 2i64 ; pub const TILE_ORIGIN_CENTER : i64 = 1i64 ; pub const TILE_ORIGIN_TOP_LEFT : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the tile index of the given cell. If no tile exists in the cell, returns [constant 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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant 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 :: icallptr_i64_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The custom [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Amount to offset alternating tiles. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: HalfOffset (ret) } } # [doc = "The TileMap orientation mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: Mode (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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Position for tile origin. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: TileOrigin (ret) } } # [doc = "The assigned [TileSet]."] # [doc = ""] # [inline] pub fn tileset (& self) -> Option < Ref < crate :: generated :: tile_set :: TileSet , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_tileset ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tile_set :: TileSet , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a [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) ; < 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [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, [member compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member centered_textures] option, because displacing textures with the [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the TileMap's 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the global position corresponding to the given tilemap (grid-based) coordinates.\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 :: icallptr_vec2_vec2_bool (method_bind , self . this . sys () . as_ptr () , map_position , ignore_half_ofs) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets 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 [method 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 :: icallptr_void_i64_i64_i64_bool_bool_bool_vec2 (method_bind , self . this . sys () . as_ptr () , x , y , tile , flip_x , flip_y , transpose , 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the tile index for the given cell.\nAn index of `-1` clears the cell.\nOptionally, the tile can also be flipped or transposed.\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 [method update_dirty_quadrants].\n# Default Arguments\n* `flip_x` - `false`\n* `flip_y` - `false`\n* `transpose` - `false`"] # [doc = ""] # [inline] pub fn set_cellv (& self , position : Vector2 , tile : i64 , flip_x : bool , flip_y : bool , transpose : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cellv ; let ret = crate :: icalls :: icallptr_void_vec2_i64_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , position , tile , flip_x , flip_y , transpose) ; } } # [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, [member compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_kinematic) ; } } # [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]."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_parent) ; } } # [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 [member centered_textures] option, because displacing textures with the [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The custom [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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , custom_transform) ; } } # [doc = "Amount to offset alternating tiles. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , half_offset) ; } } # [doc = "The TileMap orientation mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Position for tile origin. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , origin) ; } } # [doc = "The assigned [TileSet]."] # [doc = ""] # [inline] pub fn set_tileset (& self , tileset : impl AsArg < crate :: generated :: tile_set :: TileSet >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_tileset ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , tileset . as_arg_ptr ()) ; } } # [doc = "If `true`, the TileMap's 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the tilemap (grid-based) coordinates corresponding to the given local position."] # [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , world_position) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for TileMap { } unsafe impl GodotObject for TileMap { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TileMap { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TileMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for TileMap { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TileMap { } unsafe impl SubClass < crate :: generated :: node :: Node > for TileMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for TileMap { } impl Instanciable for TileMap { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . fix_invalid_tiles = (gd_api . godot_method_bind_get_method) (class_name , "fix_invalid_tiles\u{0}" . as_ptr () as * const c_char) ; table . get_cell = (gd_api . godot_method_bind_get_method) (class_name , "get_cell\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\u{0}" . as_ptr () as * const c_char) ; table . get_cellv = (gd_api . godot_method_bind_get_method) (class_name , "get_cellv\u{0}" . as_ptr () as * const c_char) ; table . get_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_uv\u{0}" . as_ptr () as * const c_char) ; table . get_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_bounce\u{0}" . as_ptr () as * const c_char) ; table . get_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_friction\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_transform\u{0}" . as_ptr () as * const c_char) ; table . get_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_half_offset\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_quadrant_size\u{0}" . as_ptr () as * const c_char) ; table . get_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "get_tile_origin\u{0}" . as_ptr () as * const c_char) ; table . get_tileset = (gd_api . godot_method_bind_get_method) (class_name , "get_tileset\u{0}" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\u{0}" . as_ptr () as * const c_char) ; table . is_cell_transposed = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_transposed\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\u{0}" . as_ptr () as * const c_char) ; table . set_cell = (gd_api . godot_method_bind_get_method) (class_name , "set_cell\u{0}" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\u{0}" . as_ptr () as * const c_char) ; table . set_cellv = (gd_api . godot_method_bind_get_method) (class_name , "set_cellv\u{0}" . as_ptr () as * const c_char) ; table . set_centered_textures = (gd_api . godot_method_bind_get_method) (class_name , "set_centered_textures\u{0}" . as_ptr () as * const c_char) ; table . set_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_uv\u{0}" . as_ptr () as * const c_char) ; table . set_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_bounce\u{0}" . as_ptr () as * const c_char) ; table . set_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_friction\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_compatibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compatibility_mode\u{0}" . as_ptr () as * const c_char) ; table . set_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_transform\u{0}" . as_ptr () as * const c_char) ; table . set_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_half_offset\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_quadrant_size\u{0}" . as_ptr () as * const c_char) ; table . set_show_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_show_collision\u{0}" . as_ptr () as * const c_char) ; table . set_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "set_tile_origin\u{0}" . as_ptr () as * const c_char) ; table . set_tileset = (gd_api . godot_method_bind_get_method) (class_name , "set_tileset\u{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\u{0}" . as_ptr () as * const c_char) ; table . update_bitmask_area = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_area\u{0}" . as_ptr () as * const c_char) ; table . update_bitmask_region = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_region\u{0}" . as_ptr () as * const c_char) ; table . update_dirty_quadrants = (gd_api . godot_method_bind_get_method) (class_name , "update_dirty_quadrants\u{0}" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tile_map::TileMap;
            
            pub mod animation_root_node {
                use super::*;
                # [doc = "`core class AnimationRootNode` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationRootNode" } } impl std :: ops :: Deref for AnimationRootNode { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationRootNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationRootNode { } impl Instanciable for AnimationRootNode { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::animation_root_node::AnimationRootNode;
            
            pub mod phash_translation {
                use super::*;
                # [doc = "`core class PHashTranslation` inherits `Translation` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] resource."] # [doc = ""] # [inline] pub fn generate (& self , from : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PHashTranslationMethodTable :: get (get_api ()) . generate ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PHashTranslation" } } impl std :: ops :: Deref for PHashTranslation { type Target = crate :: generated :: translation :: Translation ; # [inline] fn deref (& self) -> & crate :: generated :: translation :: Translation { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PHashTranslation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: translation :: Translation { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: translation :: Translation > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: object :: Object > for PHashTranslation { } impl Instanciable for PHashTranslation { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::phash_translation::PHashTranslation;
            
            pub mod visual_shader_node_vector_len {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorLen` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorLen" } } impl std :: ops :: Deref for VisualShaderNodeVectorLen { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorLen { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorLen { } impl Instanciable for VisualShaderNodeVectorLen { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_len::VisualShaderNodeVectorLen;
            
            pub mod animation_node_one_shot {
                use super::*;
                # [doc = "`core class AnimationNodeOneShot` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeOneShot { pub const MIX_MODE_ADD : i64 = 1i64 ; pub const MIX_MODE_BLEND : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If [member autorestart] is `true`, a random additional delay (in seconds) between 0 and this value will be added to [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_node_one_shot :: MixMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If [member autorestart] is `true`, a random additional delay (in seconds) between 0 and this value will be added to [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeOneShot { } unsafe impl GodotObject for AnimationNodeOneShot { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeOneShot" } } impl std :: ops :: Deref for AnimationNodeOneShot { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeOneShot { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeOneShot { } impl Instanciable for AnimationNodeOneShot { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "get_fadein_time\u{0}" . as_ptr () as * const c_char) ; table . get_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "get_fadeout_time\u{0}" . as_ptr () as * const c_char) ; table . get_mix_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_mode\u{0}" . as_ptr () as * const c_char) ; table . has_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "has_autorestart\u{0}" . as_ptr () as * const c_char) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\u{0}" . as_ptr () as * const c_char) ; table . set_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "set_autorestart\u{0}" . as_ptr () as * const c_char) ; table . set_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_autorestart_delay\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "set_fadein_time\u{0}" . as_ptr () as * const c_char) ; table . set_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "set_fadeout_time\u{0}" . as_ptr () as * const c_char) ; table . set_mix_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_mode\u{0}" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_one_shot::AnimationNodeOneShot;
            
            pub mod animation_node_output {
                use super::*;
                # [doc = "`core class AnimationNodeOutput` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeOutput" } } impl std :: ops :: Deref for AnimationNodeOutput { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeOutput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeOutput { } impl Instanciable for AnimationNodeOutput { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::animation_node_output::AnimationNodeOutput;
            
            pub mod video_stream_webm {
                use super::*;
                # [doc = "`core class VideoStreamWebm` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamWebm" } } impl std :: ops :: Deref for VideoStreamWebm { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamWebm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamWebm { } impl Instanciable for VideoStreamWebm { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::video_stream_webm::VideoStreamWebm;
            
            pub mod visual_shader_node_vec3_constant {
                use super::*;
                # [doc = "`core class VisualShaderNodeVec3Constant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVec3Constant { } unsafe impl GodotObject for VisualShaderNodeVec3Constant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVec3Constant" } } impl std :: ops :: Deref for VisualShaderNodeVec3Constant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVec3Constant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVec3Constant { } impl Instanciable for VisualShaderNodeVec3Constant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_vec3_constant::VisualShaderNodeVec3Constant;
            
            pub mod immediate_geometry {
                use super::*;
                # [doc = "`core class ImmediateGeometry` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_i64_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , lats , lons , radius , add_uv) ; } } # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Begin drawing (and optionally pass a texture override). When done call [method 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . begin ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , primitive , 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ImmediateGeometry { } unsafe impl GodotObject for ImmediateGeometry { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ImmediateGeometry { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ImmediateGeometry { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: node :: Node > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: object :: Object > for ImmediateGeometry { } impl Instanciable for ImmediateGeometry { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\u{0}" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . end = (gd_api . godot_method_bind_get_method) (class_name , "end\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_normal\u{0}" . as_ptr () as * const c_char) ; table . set_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_tangent\u{0}" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\u{0}" . as_ptr () as * const c_char) ; table . set_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::immediate_geometry::ImmediateGeometry;
            
            pub mod csg_sphere {
                use super::*;
                # [doc = "`core class CSGSphere` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radial_segments) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGSphere { } unsafe impl GodotObject for CSGSphere { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGSphere { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGSphere { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGSphere { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGSphere { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGSphere { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGSphere { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGSphere { } impl Instanciable for CSGSphere { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\u{0}" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\u{0}" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_sphere::CSGSphere;
            
            pub mod os {
                use super::*;
                # [doc = "`core singleton class OS` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OS { pub const APPLICATION_HANDLE : i64 = 0i64 ; pub const DAY_FRIDAY : i64 = 5i64 ; pub const DAY_MONDAY : i64 = 1i64 ; pub const DAY_SATURDAY : i64 = 6i64 ; pub const DAY_SUNDAY : i64 = 0i64 ; pub const DAY_THURSDAY : i64 = 4i64 ; pub const DAY_TUESDAY : i64 = 2i64 ; pub const DAY_WEDNESDAY : i64 = 3i64 ; pub const DISPLAY_HANDLE : i64 = 1i64 ; pub const MONTH_APRIL : i64 = 4i64 ; pub const MONTH_AUGUST : i64 = 8i64 ; pub const MONTH_DECEMBER : i64 = 12i64 ; pub const MONTH_FEBRUARY : i64 = 2i64 ; pub const MONTH_JANUARY : i64 = 1i64 ; pub const MONTH_JULY : i64 = 7i64 ; pub const MONTH_JUNE : i64 = 6i64 ; pub const MONTH_MARCH : i64 = 3i64 ; pub const MONTH_MAY : i64 = 5i64 ; pub const MONTH_NOVEMBER : i64 = 11i64 ; pub const MONTH_OCTOBER : i64 = 10i64 ; pub const MONTH_SEPTEMBER : i64 = 9i64 ; pub const OPENGL_CONTEXT : i64 = 4i64 ; pub const POWERSTATE_CHARGED : i64 = 4i64 ; pub const POWERSTATE_CHARGING : i64 = 3i64 ; pub const POWERSTATE_NO_BATTERY : i64 = 2i64 ; pub const POWERSTATE_ON_BATTERY : i64 = 1i64 ; pub const POWERSTATE_UNKNOWN : i64 = 0i64 ; pub const SCREEN_ORIENTATION_LANDSCAPE : i64 = 0i64 ; pub const SCREEN_ORIENTATION_PORTRAIT : i64 = 1i64 ; pub const SCREEN_ORIENTATION_REVERSE_LANDSCAPE : i64 = 2i64 ; pub const SCREEN_ORIENTATION_REVERSE_PORTRAIT : i64 = 3i64 ; pub const SCREEN_ORIENTATION_SENSOR : i64 = 6i64 ; pub const SCREEN_ORIENTATION_SENSOR_LANDSCAPE : i64 = 4i64 ; pub const SCREEN_ORIENTATION_SENSOR_PORTRAIT : i64 = 5i64 ; pub const SYSTEM_DIR_DCIM : i64 = 1i64 ; pub const SYSTEM_DIR_DESKTOP : i64 = 0i64 ; pub const SYSTEM_DIR_DOCUMENTS : i64 = 2i64 ; pub const SYSTEM_DIR_DOWNLOADS : i64 = 3i64 ; pub const SYSTEM_DIR_MOVIES : i64 = 4i64 ; pub const SYSTEM_DIR_MUSIC : i64 = 5i64 ; pub const SYSTEM_DIR_PICTURES : i64 = 6i64 ; pub const SYSTEM_DIR_RINGTONES : i64 = 7i64 ; pub const VIDEO_DRIVER_GLES2 : i64 = 1i64 ; pub const VIDEO_DRIVER_GLES3 : i64 = 0i64 ; pub const WINDOW_HANDLE : i64 = 2i64 ; pub const WINDOW_VIEW : i64 = 3i64 ; } 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\u{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 :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Delay execution of the current thread by `msec` milliseconds."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , msec) ; } } # [doc = "Delay execution of the current thread by `usec` microseconds."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usec) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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.\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 [method 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# Default Arguments\n* `blocking` - `true`\n* `output` - `[  ]`\n* `read_stderr` - `false`"] # [doc = ""] # [inline] pub fn execute (& self , path : impl Into < GodotString > , arguments : StringArray , blocking : bool , output : VariantArray , read_stderr : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . execute ; let ret = crate :: icalls :: icallptr_i64_str_strarr_bool_arr_bool (method_bind , self . this . sys () . as_ptr () , path . into () , arguments , blocking , output , read_stderr) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , driver) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 [method get_environment] method.\nYou can set `editor/main_run_args` in the Project Settings 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].lstrip(\"--\")] = key_value[1]\n```"] # [doc = ""] # [inline] pub fn get_cmdline_args (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_cmdline_args ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 [method open_midi_inputs].\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_connected_midi_inputs (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_connected_midi_inputs ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current tablet drvier 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the currently used video driver, using one of the values from [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: VideoDriver (ret) } } # [doc = "Returns 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 :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [doc = "Returns 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 :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [doc = "Gets a dictionary of time values corresponding to the given UNIX epoch time (in seconds).\nThe returned Dictionary's values will be the same as [method 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 :: icallptr_dict_i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an environment variable."] # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (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 [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_granted_permissions ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.\n[constant 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the IME intermediate composition string.\n[constant 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the host OS locale."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The minimum 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 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , handle_type) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current state of the device regarding battery and power. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: PowerState (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of threads available on the host machine."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the given scancode as a string (e.g. Return values: `\"Escape\"`, `\"Shift+Escape\"`).\nSee also [member InputEventKey.scancode] and [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , code) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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.\nOn 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: ScreenOrientation (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; mem :: transmute (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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of static memory being used by the program in bytes."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir].\n**Note:** This method is implemented on Android, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_system_dir (& self , dir : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_dir ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , dir) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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 :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns a string that is unique to the device.\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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the current UNIX epoch timestamp."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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`.\nYou can pass the output from [method 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 :: icallptr_i64_dict (method_bind , self . this . sys () . as_ptr () , datetime) ; ret as _ } } # [doc = "Returns the absolute directory path where user data is written (`user://`).\nOn Linux, this is `~/.local/share/godot/app_userdata/[project_name]`, or `~/.local/share/[custom_name]` if `use_custom_user_dir` is set.\nOn macOS, this is `~/Library/Application Support/Godot/app_userdata/[project_name]`, or `~/Library/Application Support/[custom_name]` if `use_custom_user_dir` is set.\nOn Windows, this is `%APPDATA%\\Godot\\app_userdata\\[project_name]`, or `%APPDATA%\\[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://`."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the name of the video driver matching the given `driver` index. This index is a value from [enum VideoDriver], and you can use [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , driver) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window background is transparent and 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 **Project > Project Settings > Display > Window > Per-pixel transparency > Allowed** setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS and Windows."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 window_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , menu . into () , idx) ; } } # [doc = "Returns `true` if an environment variable exists."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; ret as _ } } # [doc = "Returns `true` if the feature for the given feature tag is supported in the currently running instance, depending on 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 [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , tag_name . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor.\nReturns `false` if the Godot binary used to run the project is a [i]release[/i] 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , code) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Kill (terminate) the process identified by the given process ID (`pid`), e.g. the one returned by [method execute] in non-blocking mode.\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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , pid) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if native video is playing.\n**Note:** This method is implemented on Android and 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pauses native video playback.\n**Note:** This method is implemented on Android and 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 :: icallptr_void (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 implemented on Android and iOS, and the current Android implementation does not support the `volume`, `audio_track` and `subtitle_track` options."] # [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 :: icallptr_i64_str_f64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , volume , audio_track . into () , subtitle_track . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Stops native video playback.\n**Note:** This method is implemented on Android and 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resumes native video playback.\n**Note:** This method is implemented on Android and 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void_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 :: icallptr_void (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 : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_resources_by_type ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , short) ; } } # [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 :: icallptr_void (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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application.\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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , borderless) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; } } # [doc = "The current tablet drvier 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , variable . into () , value . into ()) ; ret as _ } } # [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 [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , code) ; } } # [doc = "Sets the game's icon using an [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 :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallptr_void_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 [method get_ime_selection] and [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usec) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The minimum 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_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , orientation) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_window_mouse_passthrough (& self , region : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_mouse_passthrough ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , region) ; } } # [doc = "If `true`, the window background is transparent and 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 **Project > Project Settings > Display > Window > Per-pixel transparency > Allowed** setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS and Windows."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing `mailto:` Links[/url] for a list of fields that can be added.\nUse [method 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , uri . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Shows the virtual keyboard if the platform has one.\nThe `existing_text` parameter is useful for implementing your own [LineEdit] or [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].\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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , existing_text . into () , multiline) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OS { } unsafe impl GodotObject for OS { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OS" } } impl std :: ops :: Deref for OS { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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_clipboard : * mut sys :: godot_method_bind , pub get_cmdline_args : * 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_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_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_low_processor_usage_mode_sleep_usec : * 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_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_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_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_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_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_set_current_layout : * mut sys :: godot_method_bind , pub kill : * 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_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 , 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_clipboard : 0 as * mut sys :: godot_method_bind , get_cmdline_args : 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_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_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_low_processor_usage_mode_sleep_usec : 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_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_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_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_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_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_set_current_layout : 0 as * mut sys :: godot_method_bind , kill : 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . can_draw = (gd_api . godot_method_bind_get_method) (class_name , "can_draw\u{0}" . as_ptr () as * const c_char) ; table . can_use_threads = (gd_api . godot_method_bind_get_method) (class_name , "can_use_threads\u{0}" . as_ptr () as * const c_char) ; table . center_window = (gd_api . godot_method_bind_get_method) (class_name , "center_window\u{0}" . as_ptr () as * const c_char) ; table . close_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "close_midi_inputs\u{0}" . as_ptr () as * const c_char) ; table . delay_msec = (gd_api . godot_method_bind_get_method) (class_name , "delay_msec\u{0}" . as_ptr () as * const c_char) ; table . delay_usec = (gd_api . godot_method_bind_get_method) (class_name , "delay_usec\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . execute = (gd_api . godot_method_bind_get_method) (class_name , "execute\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "get_borderless_window\u{0}" . as_ptr () as * const c_char) ; table . get_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "get_clipboard\u{0}" . as_ptr () as * const c_char) ; table . get_cmdline_args = (gd_api . godot_method_bind_get_method) (class_name , "get_cmdline_args\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "get_current_screen\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_date = (gd_api . godot_method_bind_get_method) (class_name , "get_date\u{0}" . as_ptr () as * const c_char) ; table . get_datetime = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\u{0}" . as_ptr () as * const c_char) ; table . get_executable_path = (gd_api . godot_method_bind_get_method) (class_name , "get_executable_path\u{0}" . as_ptr () as * const c_char) ; table . get_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "get_exit_code\u{0}" . as_ptr () as * const c_char) ; table . get_granted_permissions = (gd_api . godot_method_bind_get_method) (class_name , "get_granted_permissions\u{0}" . as_ptr () as * const c_char) ; table . get_ime_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_selection\u{0}" . as_ptr () as * const c_char) ; table . get_ime_text = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_text\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_model_name = (gd_api . godot_method_bind_get_method) (class_name , "get_model_name\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_native_handle = (gd_api . godot_method_bind_get_method) (class_name , "get_native_handle\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_power_state = (gd_api . godot_method_bind_get_method) (class_name , "get_power_state\u{0}" . as_ptr () as * const c_char) ; table . get_process_id = (gd_api . godot_method_bind_get_method) (class_name , "get_process_id\u{0}" . as_ptr () as * const c_char) ; table . get_processor_count = (gd_api . godot_method_bind_get_method) (class_name , "get_processor_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_scancode_string = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_string\u{0}" . as_ptr () as * const c_char) ; table . get_screen_count = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_count\u{0}" . as_ptr () as * const c_char) ; table . get_screen_dpi = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_dpi\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_orientation\u{0}" . as_ptr () as * const c_char) ; table . get_screen_position = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_position\u{0}" . as_ptr () as * const c_char) ; table . get_screen_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_scale\u{0}" . as_ptr () as * const c_char) ; table . get_screen_size = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_size\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_system_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_system_dir\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_ticks_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_msec\u{0}" . as_ptr () as * const c_char) ; table . get_ticks_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_usec\u{0}" . as_ptr () as * const c_char) ; table . get_time = (gd_api . godot_method_bind_get_method) (class_name , "get_time\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\u{0}" . as_ptr () as * const c_char) ; table . get_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_window_position = (gd_api . godot_method_bind_get_method) (class_name , "get_window_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_window_size\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . global_menu_clear = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_clear\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_environment = (gd_api . godot_method_bind_get_method) (class_name , "has_environment\u{0}" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "has_virtual_keyboard\u{0}" . as_ptr () as * const c_char) ; table . hide_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "hide_virtual_keyboard\u{0}" . as_ptr () as * const c_char) ; table . is_debug_build = (gd_api . godot_method_bind_get_method) (class_name , "is_debug_build\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_scancode_unicode = (gd_api . godot_method_bind_get_method) (class_name , "is_scancode_unicode\u{0}" . as_ptr () as * const c_char) ; table . is_stdout_verbose = (gd_api . godot_method_bind_get_method) (class_name , "is_stdout_verbose\u{0}" . as_ptr () as * const c_char) ; table . is_userfs_persistent = (gd_api . godot_method_bind_get_method) (class_name , "is_userfs_persistent\u{0}" . as_ptr () as * const c_char) ; table . is_vsync_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_vsync_enabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_window_focused = (gd_api . godot_method_bind_get_method) (class_name , "is_window_focused\u{0}" . as_ptr () as * const c_char) ; table . is_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "is_window_fullscreen\u{0}" . as_ptr () as * const c_char) ; table . is_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_maximized\u{0}" . as_ptr () as * const c_char) ; table . is_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_minimized\u{0}" . as_ptr () as * const c_char) ; table . is_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_window_resizable\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . kill = (gd_api . godot_method_bind_get_method) (class_name , "kill\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . native_video_pause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_pause\u{0}" . as_ptr () as * const c_char) ; table . native_video_play = (gd_api . godot_method_bind_get_method) (class_name , "native_video_play\u{0}" . as_ptr () as * const c_char) ; table . native_video_stop = (gd_api . godot_method_bind_get_method) (class_name , "native_video_stop\u{0}" . as_ptr () as * const c_char) ; table . native_video_unpause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_unpause\u{0}" . as_ptr () as * const c_char) ; table . open_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "open_midi_inputs\u{0}" . as_ptr () as * const c_char) ; table . print_all_resources = (gd_api . godot_method_bind_get_method) (class_name , "print_all_resources\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . request_attention = (gd_api . godot_method_bind_get_method) (class_name , "request_attention\u{0}" . as_ptr () as * const c_char) ; table . request_permission = (gd_api . godot_method_bind_get_method) (class_name , "request_permission\u{0}" . as_ptr () as * const c_char) ; table . request_permissions = (gd_api . godot_method_bind_get_method) (class_name , "request_permissions\u{0}" . as_ptr () as * const c_char) ; table . set_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "set_borderless_window\u{0}" . as_ptr () as * const c_char) ; table . set_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "set_clipboard\u{0}" . as_ptr () as * const c_char) ; table . set_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "set_current_screen\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\u{0}" . as_ptr () as * const c_char) ; table . set_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "set_exit_code\u{0}" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\u{0}" . as_ptr () as * const c_char) ; table . set_ime_active = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_active\u{0}" . as_ptr () as * const c_char) ; table . set_ime_position = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_position\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_native_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_native_icon\u{0}" . as_ptr () as * const c_char) ; table . set_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_orientation\u{0}" . as_ptr () as * const c_char) ; table . set_thread_name = (gd_api . godot_method_bind_get_method) (class_name , "set_thread_name\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_vsync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_vsync\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "set_window_fullscreen\u{0}" . as_ptr () as * const c_char) ; table . set_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_maximized\u{0}" . as_ptr () as * const c_char) ; table . set_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_minimized\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_window_position = (gd_api . godot_method_bind_get_method) (class_name , "set_window_position\u{0}" . as_ptr () as * const c_char) ; table . set_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_window_resizable\u{0}" . as_ptr () as * const c_char) ; table . set_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_window_size\u{0}" . as_ptr () as * const c_char) ; table . set_window_title = (gd_api . godot_method_bind_get_method) (class_name , "set_window_title\u{0}" . as_ptr () as * const c_char) ; table . shell_open = (gd_api . godot_method_bind_get_method) (class_name , "shell_open\u{0}" . as_ptr () as * const c_char) ; table . show_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "show_virtual_keyboard\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::os::OS;
            
            pub mod gradient_texture {
                use super::*;
                # [doc = "`core class GradientTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] that will be used to fill the texture."] # [doc = ""] # [inline] pub fn gradient (& self) -> Option < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTextureMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Gradient] that will be used to fill the texture."] # [doc = ""] # [inline] pub fn set_gradient (& self , gradient : impl AsArg < crate :: generated :: gradient :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTextureMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallptr_void_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]."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GradientTexture { } unsafe impl GodotObject for GradientTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GradientTexture" } } impl std :: ops :: Deref for GradientTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GradientTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for GradientTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for GradientTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GradientTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for GradientTexture { } impl Instanciable for GradientTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\u{0}" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gradient_texture::GradientTexture;
            
            pub mod triangle_mesh {
                use super::*;
                # [doc = "`core class TriangleMesh` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TriangleMesh" } } impl std :: ops :: Deref for TriangleMesh { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TriangleMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TriangleMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for TriangleMesh { } impl Instanciable for TriangleMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::triangle_mesh::TriangleMesh;
            
            pub mod audio_stream_player_2d {
                use super::*;
                # [doc = "`core class AudioStreamPlayer2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "Areas in which this sound plays."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Bus on which this audio is playing."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position in the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , from_position) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "Areas in which this sound plays."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bus on which this audio is playing."] # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixels) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale) ; } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_db) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer2D { } unsafe impl GodotObject for AudioStreamPlayer2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AudioStreamPlayer2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayer2D { } impl Instanciable for AudioStreamPlayer2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation\u{0}" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\u{0}" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\u{0}" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\u{0}" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\u{0}" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\u{0}" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\u{0}" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\u{0}" . as_ptr () as * const c_char) ; table . set_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation\u{0}" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\u{0}" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\u{0}" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\u{0}" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\u{0}" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_player_2d::AudioStreamPlayer2D;
            
            pub mod camera_server {
                use super::*;
                # [doc = "`core singleton class CameraServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraServer { pub const FEED_CBCR_IMAGE : i64 = 1i64 ; pub const FEED_RGBA_IMAGE : i64 = 0i64 ; pub const FEED_YCBCR_IMAGE : i64 = 0i64 ; pub const FEED_Y_IMAGE : i64 = 0i64 ; } 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\u{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 camera feed to the camera server."] # [doc = ""] # [inline] pub fn add_feed (& self , feed : impl AsArg < crate :: generated :: camera_feed :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . add_feed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , feed . as_arg_ptr ()) ; } } # [doc = "Returns an array of [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] with this id."] # [doc = ""] # [inline] pub fn get_feed (& self , index : i64) -> Option < Ref < crate :: generated :: camera_feed :: CameraFeed , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . get_feed ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: camera_feed :: CameraFeed , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a [CameraFeed]."] # [doc = ""] # [inline] pub fn remove_feed (& self , feed : impl AsArg < crate :: generated :: camera_feed :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . remove_feed ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CameraServer" } } impl std :: ops :: Deref for CameraServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . feeds = (gd_api . godot_method_bind_get_method) (class_name , "feeds\u{0}" . as_ptr () as * const c_char) ; table . get_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_feed\u{0}" . as_ptr () as * const c_char) ; table . get_feed_count = (gd_api . godot_method_bind_get_method) (class_name , "get_feed_count\u{0}" . as_ptr () as * const c_char) ; table . remove_feed = (gd_api . godot_method_bind_get_method) (class_name , "remove_feed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::camera_server::CameraServer;
            
            pub mod visual_shader_node_compare {
                use super::*;
                # [doc = "`core class VisualShaderNodeCompare` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeCompare { pub const COND_ALL : i64 = 0i64 ; pub const COND_ANY : i64 = 1i64 ; pub const CTYPE_BOOLEAN : i64 = 2i64 ; pub const CTYPE_SCALAR : i64 = 0i64 ; pub const CTYPE_TRANSFORM : i64 = 3i64 ; pub const CTYPE_VECTOR : i64 = 1i64 ; pub const FUNC_EQUAL : i64 = 0i64 ; pub const FUNC_GREATER_THAN : i64 = 2i64 ; pub const FUNC_GREATER_THAN_EQUAL : i64 = 3i64 ; pub const FUNC_LESS_THAN : i64 = 4i64 ; pub const FUNC_LESS_THAN_EQUAL : i64 = 5i64 ; pub const FUNC_NOT_EQUAL : i64 = 1i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_compare :: ComparisonType (ret) } } # [doc = "Extra condition which is applied if [member type] is set to [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_compare :: Condition (ret) } } # [doc = "A comparison function. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_compare :: Function (ret) } } # [doc = "The type to be used in the comparison. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [doc = "Extra condition which is applied if [member type] is set to [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , condition) ; } } # [doc = "A comparison function. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCompare { } unsafe impl GodotObject for VisualShaderNodeCompare { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCompare" } } impl std :: ops :: Deref for VisualShaderNodeCompare { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCompare { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeCompare { } impl Instanciable for VisualShaderNodeCompare { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_condition = (gd_api . godot_method_bind_get_method) (class_name , "get_condition\u{0}" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\u{0}" . as_ptr () as * const c_char) ; table . set_comparison_type = (gd_api . godot_method_bind_get_method) (class_name , "set_comparison_type\u{0}" . as_ptr () as * const c_char) ; table . set_condition = (gd_api . godot_method_bind_get_method) (class_name , "set_condition\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_compare::VisualShaderNodeCompare;
            
            pub mod base_button {
                use super::*;
                # [doc = "`core class BaseButton` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BaseButton { pub const ACTION_MODE_BUTTON_PRESS : i64 = 0i64 ; pub const ACTION_MODE_BUTTON_RELEASE : i64 = 1i64 ; pub const DRAW_DISABLED : i64 = 3i64 ; pub const DRAW_HOVER : i64 = 2i64 ; pub const DRAW_HOVER_PRESSED : i64 = 4i64 ; pub const DRAW_NORMAL : i64 = 0i64 ; pub const DRAW_PRESSED : i64 = 1i64 ; } impl BaseButton { # [doc = "Determines when the button is considered clicked, one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: base_button :: ActionMode (ret) } } # [doc = "[ButtonGroup] associated to the button."] # [doc = ""] # [inline] pub fn button_group (& self) -> Option < Ref < crate :: generated :: button_group :: ButtonGroup , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_button_group ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: button_group :: ButtonGroup , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: base_button :: DrawMode (ret) } } # [doc = "Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled])."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: FocusMode (ret) } } # [doc = "[ShortCut] associated to the button."] # [doc = ""] # [inline] pub fn shortcut (& self) -> Option < Ref < crate :: generated :: short_cut :: ShortCut , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_shortcut ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: short_cut :: ShortCut , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active)."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Determines when the button is considered clicked, one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "[ButtonGroup] associated to the button."] # [doc = ""] # [inline] pub fn set_button_group (& self , button_group : impl AsArg < crate :: generated :: button_group :: ButtonGroup >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_button_group ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled])."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active)."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "[ShortCut] associated to the button."] # [doc = ""] # [inline] pub fn set_shortcut (& self , shortcut : impl AsArg < crate :: generated :: short_cut :: ShortCut >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_shortcut ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BaseButton { } unsafe impl GodotObject for BaseButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BaseButton { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BaseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for BaseButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for BaseButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for BaseButton { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_button_group = (gd_api . godot_method_bind_get_method) (class_name , "get_button_group\u{0}" . as_ptr () as * const c_char) ; table . get_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_button_mask\u{0}" . as_ptr () as * const c_char) ; table . get_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_shortcut\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{0}" . as_ptr () as * const c_char) ; table . is_hovered = (gd_api . godot_method_bind_get_method) (class_name , "is_hovered\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_toggle_mode\u{0}" . as_ptr () as * const c_char) ; table . set_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_action_mode\u{0}" . as_ptr () as * const c_char) ; table . set_button_group = (gd_api . godot_method_bind_get_method) (class_name , "set_button_group\u{0}" . as_ptr () as * const c_char) ; table . set_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_button_mask\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_toggle_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::base_button::BaseButton;
            
            pub mod visual_shader_node_transform_vec_mult {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformVecMult` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformVecMult { pub const OP_3x3_AxB : i64 = 2i64 ; pub const OP_3x3_BxA : i64 = 3i64 ; pub const OP_AxB : i64 = 0i64 ; pub const OP_BxA : i64 = 1i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_transform_vec_mult :: Operator (ret) } } # [doc = "The multiplication type to be performed. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformVecMult { } unsafe impl GodotObject for VisualShaderNodeTransformVecMult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformVecMult" } } impl std :: ops :: Deref for VisualShaderNodeTransformVecMult { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformVecMult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformVecMult { } impl Instanciable for VisualShaderNodeTransformVecMult { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_vec_mult::VisualShaderNodeTransformVecMult;
            
            pub mod audio_stream_sample {
                use super::*;
                # [doc = "`core class AudioStreamSample` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamSample { pub const FORMAT_16_BITS : i64 = 1i64 ; pub const FORMAT_8_BITS : i64 = 0i64 ; pub const FORMAT_IMA_ADPCM : i64 = 2i64 ; pub const LOOP_BACKWARD : i64 = 3i64 ; pub const LOOP_DISABLED : i64 = 0i64 ; pub const LOOP_FORWARD : i64 = 1i64 ; pub const LOOP_PING_PONG : i64 = 2i64 ; } 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 , thread_access :: 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) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Audio format. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_sample :: Format (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 loop_end (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_end ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_sample :: LoopMode (ret) } } # [doc = "The sample rate for mixing this audio."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Audio format. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_begin) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_end) ; } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_mode) ; } } # [doc = "The sample rate for mixing this audio."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mix_rate) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , stereo) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamSample { } unsafe impl GodotObject for AudioStreamSample { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamSample" } } impl std :: ops :: Deref for AudioStreamSample { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamSample { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamSample { } impl Instanciable for AudioStreamSample { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\u{0}" . as_ptr () as * const c_char) ; table . get_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_begin\u{0}" . as_ptr () as * const c_char) ; table . get_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_end\u{0}" . as_ptr () as * const c_char) ; table . get_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_mode\u{0}" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\u{0}" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\u{0}" . as_ptr () as * const c_char) ; table . save_to_wav = (gd_api . godot_method_bind_get_method) (class_name , "save_to_wav\u{0}" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\u{0}" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\u{0}" . as_ptr () as * const c_char) ; table . set_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_begin\u{0}" . as_ptr () as * const c_char) ; table . set_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_end\u{0}" . as_ptr () as * const c_char) ; table . set_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_mode\u{0}" . as_ptr () as * const c_char) ; table . set_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_rate\u{0}" . as_ptr () as * const c_char) ; table . set_stereo = (gd_api . godot_method_bind_get_method) (class_name , "set_stereo\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_sample::AudioStreamSample;
            
            pub mod visual_shader_node_if {
                use super::*;
                # [doc = "`core class VisualShaderNodeIf` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeIf" } } impl std :: ops :: Deref for VisualShaderNodeIf { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeIf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeIf { } impl Instanciable for VisualShaderNodeIf { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_if::VisualShaderNodeIf;
            
            pub mod animation_node_transition {
                use super::*;
                # [doc = "`core class AnimationNodeTransition` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , input) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , input) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , input , enable) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , input , caption . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTransition { } unsafe impl GodotObject for AnimationNodeTransition { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTransition" } } impl std :: ops :: Deref for AnimationNodeTransition { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTransition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeTransition { } impl Instanciable for AnimationNodeTransition { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_enabled_inputs\u{0}" . as_ptr () as * const c_char) ; table . get_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "get_input_caption\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled_inputs\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "set_input_caption\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_transition::AnimationNodeTransition;
            
            pub mod camera_2d {
                use super::*;
                # [doc = "`core class Camera2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Camera2D { pub const ANCHOR_MODE_DRAG_CENTER : i64 = 1i64 ; pub const ANCHOR_MODE_FIXED_TOP_LEFT : i64 = 0i64 ; pub const CAMERA2D_PROCESS_IDLE : i64 = 1i64 ; pub const CAMERA2D_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes any [Camera2D] from the ancestor [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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_2d :: AnchorMode (ret) } } # [doc = "Returns the camera position."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the location of the [Camera2D]'s screen-center, relative to the origin."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The custom [Viewport] node attached to the [Camera2D]. If `null` or not a [Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The camera's process callback. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_2d :: Camera2DProcessMode (ret) } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 zoom (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_zoom ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera smoothly moves towards the target at [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera smoothly stops when reaches its limits."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the camera's position immediately to its current smoothing destination.\nThis has no effect if smoothing is disabled."] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , anchor_mode) ; } } # [doc = "The custom [Viewport] node attached to the [Camera2D]. If `null` or not a [Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [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 (& 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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , drag_margin) ; } } # [doc = "If `true`, the camera smoothly moves towards the target at [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , follow_smoothing) ; } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , follow_smoothing) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , limit) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , limit_drawing_enabled) ; } } # [doc = "If `true`, the camera smoothly stops when reaches its limits."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , limit_smoothing_enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , margin_drawing_enabled) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The camera's process callback. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, the camera 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , rotating) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , screen_drawing_enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , zoom) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Camera2D { } unsafe impl GodotObject for Camera2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Camera2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Camera2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Camera2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Camera2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Camera2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Camera2D { } impl Instanciable for Camera2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\u{0}" . as_ptr () as * const c_char) ; table . force_update_scroll = (gd_api . godot_method_bind_get_method) (class_name , "force_update_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_mode\u{0}" . as_ptr () as * const c_char) ; table . get_camera_position = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\u{0}" . as_ptr () as * const c_char) ; table . get_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_margin\u{0}" . as_ptr () as * const c_char) ; table . get_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "get_follow_smoothing\u{0}" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\u{0}" . as_ptr () as * const c_char) ; table . get_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_limit\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\u{0}" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\u{0}" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\u{0}" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_rotating = (gd_api . godot_method_bind_get_method) (class_name , "is_rotating\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\u{0}" . as_ptr () as * const c_char) ; table . reset_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "reset_smoothing\u{0}" . as_ptr () as * const c_char) ; table . set_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_mode\u{0}" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\u{0}" . as_ptr () as * const c_char) ; table . set_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_margin\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_smoothing\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\u{0}" . as_ptr () as * const c_char) ; table . set_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_limit\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\u{0}" . as_ptr () as * const c_char) ; table . set_rotating = (gd_api . godot_method_bind_get_method) (class_name , "set_rotating\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\u{0}" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::camera_2d::Camera2D;
            
            pub mod editor_file_system {
                use super::*;
                # [doc = "`tools class EditorFileSystem` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorFileSystem { # [doc = "Gets the type of the file, given the full path."] # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the root directory object."] # [doc = ""] # [inline] pub fn get_filesystem (& self) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem_path ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` of 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystem { } unsafe impl GodotObject for EditorFileSystem { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorFileSystem { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorFileSystem { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem\u{0}" . as_ptr () as * const c_char) ; table . get_filesystem_path = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem_path\u{0}" . as_ptr () as * const c_char) ; table . get_scanning_progress = (gd_api . godot_method_bind_get_method) (class_name , "get_scanning_progress\u{0}" . as_ptr () as * const c_char) ; table . is_scanning = (gd_api . godot_method_bind_get_method) (class_name , "is_scanning\u{0}" . as_ptr () as * const c_char) ; table . scan = (gd_api . godot_method_bind_get_method) (class_name , "scan\u{0}" . as_ptr () as * const c_char) ; table . scan_sources = (gd_api . godot_method_bind_get_method) (class_name , "scan_sources\u{0}" . as_ptr () as * const c_char) ; table . update_file = (gd_api . godot_method_bind_get_method) (class_name , "update_file\u{0}" . as_ptr () as * const c_char) ; table . update_script_classes = (gd_api . godot_method_bind_get_method) (class_name , "update_script_classes\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_file_system::EditorFileSystem;
            
            pub mod hseparator {
                use super::*;
                # [doc = "`core class HSeparator` inherits `Separator` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HSeparator { type Target = crate :: generated :: separator :: Separator ; # [inline] fn deref (& self) -> & crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSeparator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: separator :: Separator > for HSeparator { } unsafe impl SubClass < crate :: generated :: control :: Control > for HSeparator { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HSeparator { } unsafe impl SubClass < crate :: generated :: node :: Node > for HSeparator { } unsafe impl SubClass < crate :: generated :: object :: Object > for HSeparator { } impl Instanciable for HSeparator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::hseparator::HSeparator;
            
            pub mod menu_button {
                use super::*;
                # [doc = "`core class MenuButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] contained in this button."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MenuButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, when the cursor hovers above another [MenuButton] within the same parent which also has `switch_on_hover` enabled, it will close the current [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "If `true`, when the cursor hovers above another [MenuButton] within the same parent which also has `switch_on_hover` enabled, it will close the current [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MenuButton { } unsafe impl GodotObject for MenuButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MenuButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MenuButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for MenuButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for MenuButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for MenuButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MenuButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for MenuButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for MenuButton { } impl Instanciable for MenuButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_disable_shortcuts = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_shortcuts\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::menu_button::MenuButton;
            
            pub mod stream_peer_ssl {
                use super::*;
                # [doc = "`core class StreamPeerSSL` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StreamPeerSSL { pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; } 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 , thread_access :: 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 :: stream_peer :: StreamPeer > , private_key : impl AsArg < crate :: generated :: crypto_key :: CryptoKey > , certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate > , chain : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . accept_stream ; let ret = crate :: icalls :: icallptr_i64_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 (ret as _) } } # [doc = "Connects to a peer using an underlying [StreamPeer] `stream`. If `validate_certs` is `true`, [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 :: stream_peer :: StreamPeer > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . connect_to_stream ; let ret = crate :: icalls :: icallptr_i64_obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr () , validate_certs , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: stream_peer_ssl :: Status (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Poll the connection to check for incoming bytes. Call this right before [method 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 :: icallptr_void (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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerSSL { } unsafe impl GodotObject for StreamPeerSSL { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerSSL" } } impl std :: ops :: Deref for StreamPeerSSL { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerSSL { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerSSL { } impl Instanciable for StreamPeerSSL { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . connect_to_stream = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_stream\u{0}" . as_ptr () as * const c_char) ; table . disconnect_from_stream = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_stream\u{0}" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\u{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\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::stream_peer_ssl::StreamPeerSSL;
            
            pub mod visual_script_emit_signal {
                use super::*;
                # [doc = "`core class VisualScriptEmitSignal` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptEmitSignal" } } impl std :: ops :: Deref for VisualScriptEmitSignal { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEmitSignal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEmitSignal { } impl Instanciable for VisualScriptEmitSignal { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_signal\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_emit_signal::VisualScriptEmitSignal;
            
            pub mod area {
                use super::*;
                # [doc = "`core class Area` inherits `CollisionObject` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area { pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; 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 , thread_access :: 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. Values range from `0` (no damping) to `1` (full 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. 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 also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the layer mask."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 = AreaMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of intersecting [Area]s. For 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]s. For 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 reverb_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_amount ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: area :: SpaceOverride (ret) } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; ret as _ } } # [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] or a [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 :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; ret as _ } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. 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 also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = AreaMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = AreaMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance_scale) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member 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 :: icallptr_void_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. Values range from `0` (no damping) to `1` (full 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area { } unsafe impl GodotObject for Area { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Area { type Target = crate :: generated :: collision_object :: CollisionObject ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for Area { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Area { } unsafe impl SubClass < crate :: generated :: node :: Node > for Area { } unsafe impl SubClass < crate :: generated :: object :: Object > for Area { } impl Instanciable for Area { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\u{0}" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\u{0}" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\u{0}" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\u{0}" . as_ptr () as * const c_char) ; table . get_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_amount\u{0}" . as_ptr () as * const c_char) ; table . get_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_bus\u{0}" . as_ptr () as * const c_char) ; table . get_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_uniformity\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\u{0}" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\u{0}" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\u{0}" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\u{0}" . as_ptr () as * const c_char) ; table . set_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\u{0}" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\u{0}" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\u{0}" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\u{0}" . as_ptr () as * const c_char) ; table . set_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_amount\u{0}" . as_ptr () as * const c_char) ; table . set_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_bus\u{0}" . as_ptr () as * const c_char) ; table . set_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_uniformity\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::area::Area;
            
            pub mod audio_stream {
                use super::*;
                # [doc = "`core class AudioStream` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStream { } unsafe impl GodotObject for AudioStream { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStream" } } impl std :: ops :: Deref for AudioStream { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStream { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStream { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream::AudioStream;
            
            pub mod hslider {
                use super::*;
                # [doc = "`core class HSlider` inherits `Slider` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HSlider { type Target = crate :: generated :: slider :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: slider :: Slider > for HSlider { } unsafe impl SubClass < crate :: generated :: range :: Range > for HSlider { } unsafe impl SubClass < crate :: generated :: control :: Control > for HSlider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HSlider { } unsafe impl SubClass < crate :: generated :: node :: Node > for HSlider { } unsafe impl SubClass < crate :: generated :: object :: Object > for HSlider { } impl Instanciable for HSlider { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::hslider::HSlider;
            
            pub mod visual_script_yield {
                use super::*;
                # [doc = "`core class VisualScriptYield` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_yield :: YieldMode (ret) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , sec) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptYield { } unsafe impl GodotObject for VisualScriptYield { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptYield" } } impl std :: ops :: Deref for VisualScriptYield { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptYield { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptYield { } impl Instanciable for VisualScriptYield { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_yield_mode\u{0}" . as_ptr () as * const c_char) ; table . set_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "set_wait_time\u{0}" . as_ptr () as * const c_char) ; table . set_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_yield_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_yield::VisualScriptYield;
            
            pub mod visual_shader {
                use super::*;
                # [doc = "`core class VisualShader` inherits `Shader` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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_FRAGMENT : i64 = 1i64 ; pub const TYPE_LIGHT : i64 = 2i64 ; pub const TYPE_MAX : i64 = 3i64 ; pub const TYPE_VERTEX : i64 = 0i64 ; } 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 , thread_access :: 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 :: visual_shader_node :: VisualShaderNode > , position : Vector2 , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_i64_obj_vec2_i64 (method_bind , self . this . sys () . as_ptr () , _type , node . as_arg_ptr () , position , id) ; } } # [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 :: icallptr_bool_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , from_node , from_port , to_node , to_port) ; ret as _ } } # [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 :: icallptr_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , from_node , from_port , to_node , to_port) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , from_node , from_port , to_node , to_port) ; } } # [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 :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , from_node , from_port , to_node , to_port) ; } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: visual_shader_node :: VisualShaderNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_shader_node :: VisualShaderNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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) ; < 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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node_list ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , id) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; ret as _ } } # [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 :: icallptr_bool_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , from_node , from_port , to_node , to_port) ; ret as _ } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , id) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , _type , id , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShader { } unsafe impl GodotObject for VisualShader { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShader" } } impl std :: ops :: Deref for VisualShader { type Target = crate :: generated :: shader :: Shader ; # [inline] fn deref (& self) -> & crate :: generated :: shader :: Shader { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shader :: Shader { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shader :: Shader > for VisualShader { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShader { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShader { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShader { } impl Instanciable for VisualShader { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . can_connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "can_connect_nodes\u{0}" . as_ptr () as * const c_char) ; table . connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes\u{0}" . as_ptr () as * const c_char) ; table . connect_nodes_forced = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes_forced\u{0}" . as_ptr () as * const c_char) ; table . disconnect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_nodes\u{0}" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\u{0}" . as_ptr () as * const c_char) ; table . get_node_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_node_connections\u{0}" . as_ptr () as * const c_char) ; table . get_node_list = (gd_api . godot_method_bind_get_method) (class_name , "get_node_list\u{0}" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_node_connection = (gd_api . godot_method_bind_get_method) (class_name , "is_node_connection\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{0}" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader::VisualShader;
            
            pub mod audio_effect_record {
                use super::*;
                # [doc = "`core class AudioEffectRecord` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_sample :: Format (ret) } } # [doc = "Returns the recorded sample."] # [doc = ""] # [inline] pub fn get_recording (& self) -> Option < Ref < crate :: generated :: audio_stream_sample :: AudioStreamSample , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . get_recording ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_sample :: AudioStreamSample , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , record) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectRecord { } unsafe impl GodotObject for AudioEffectRecord { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectRecord" } } impl std :: ops :: Deref for AudioEffectRecord { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectRecord { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectRecord { } impl Instanciable for AudioEffectRecord { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_recording = (gd_api . godot_method_bind_get_method) (class_name , "get_recording\u{0}" . as_ptr () as * const c_char) ; table . is_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "is_recording_active\u{0}" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\u{0}" . as_ptr () as * const c_char) ; table . set_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "set_recording_active\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_record::AudioEffectRecord;
            
            pub mod visual_shader_node_scalar_smooth_step {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarSmoothStep { } impl Instanciable for VisualShaderNodeScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_smooth_step::VisualShaderNodeScalarSmoothStep;
            
            pub mod scroll_container {
                use super::*;
                # [doc = "`core class ScrollContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]."] # [doc = ""] # [inline] pub fn get_h_scrollbar (& self) -> Option < Ref < crate :: generated :: hscroll_bar :: HScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_h_scrollbar ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: hscroll_bar :: HScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]."] # [doc = ""] # [inline] pub fn get_v_scrollbar (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_v_scrollbar ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , deadzone) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScrollContainer { } unsafe impl GodotObject for ScrollContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScrollContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScrollContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for ScrollContainer { } impl Instanciable for ScrollContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ScrollContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScrollContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , 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 , 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "get_deadzone\u{0}" . as_ptr () as * const c_char) ; table . get_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_h_scrollbar = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scrollbar\u{0}" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_v_scrollbar = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scrollbar\u{0}" . as_ptr () as * const c_char) ; table . is_following_focus = (gd_api . godot_method_bind_get_method) (class_name , "is_following_focus\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "set_deadzone\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_follow_focus = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_focus\u{0}" . as_ptr () as * const c_char) ; table . set_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_h_scroll\u{0}" . as_ptr () as * const c_char) ; table . set_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::scroll_container::ScrollContainer;
            
            pub mod visual_shader_node_texture_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeTextureUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTextureUniform { pub const COLOR_DEFAULT_BLACK : i64 = 1i64 ; pub const COLOR_DEFAULT_WHITE : i64 = 0i64 ; pub const TYPE_ANISO : i64 = 3i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture_uniform :: ColorDefault (ret) } } # [doc = "Defines the type of data provided by the source texture. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture_uniform :: TextureType (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [doc = "Defines the type of data provided by the source texture. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTextureUniform { } unsafe impl GodotObject for VisualShaderNodeTextureUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTextureUniform" } } impl std :: ops :: Deref for VisualShaderNodeTextureUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTextureUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTextureUniform { } impl Instanciable for VisualShaderNodeTextureUniform { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\u{0}" . as_ptr () as * const c_char) ; table . set_color_default = (gd_api . godot_method_bind_get_method) (class_name , "set_color_default\u{0}" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_texture_uniform::VisualShaderNodeTextureUniform;
            
            pub mod mutex {
                use super::*;
                # [doc = "`core class Mutex` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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], blocks until it is unlocked by the current owner."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Unlocks this [Mutex], leaving it to other threads."] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mutex { } unsafe impl GodotObject for Mutex { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mutex" } } impl std :: ops :: Deref for Mutex { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mutex { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Mutex { } unsafe impl SubClass < crate :: generated :: object :: Object > for Mutex { } impl Instanciable for Mutex { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . try_lock = (gd_api . godot_method_bind_get_method) (class_name , "try_lock\u{0}" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mutex::Mutex;
            
            pub mod bit_map {
                use super::*;
                # [doc = "`core class BitMap` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_void_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 :: Image > , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . create_from_image_alpha ; let ret = crate :: icalls :: icallptr_void_obj_f64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , threshold) ; } } # [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 :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied."] # [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 :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , pixels , 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [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 :: icallptr_void_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , bit) ; } } # [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 :: icallptr_void_rect2_bool (method_bind , self . this . sys () . as_ptr () , rect , bit) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BitMap { } unsafe impl GodotObject for BitMap { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BitMap" } } impl std :: ops :: Deref for BitMap { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BitMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BitMap { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BitMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for BitMap { } impl Instanciable for BitMap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BitMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BitMapMethodTable { pub class_constructor : sys :: godot_class_constructor , 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 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 , 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 , 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_bit\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . grow_mask = (gd_api . godot_method_bind_get_method) (class_name , "grow_mask\u{0}" . as_ptr () as * const c_char) ; table . opaque_to_polygons = (gd_api . godot_method_bind_get_method) (class_name , "opaque_to_polygons\u{0}" . as_ptr () as * const c_char) ; table . set_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_bit\u{0}" . as_ptr () as * const c_char) ; table . set_bit_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_bit_rect\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::bit_map::BitMap;
            
            pub mod spatial_material {
                use super::*;
                # [doc = "`core class SpatialMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 MAX : Flags = Flags (19i64) ; } 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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SpatialMaterial { pub const BILLBOARD_DISABLED : i64 = 0i64 ; pub const BILLBOARD_ENABLED : i64 = 1i64 ; pub const BILLBOARD_FIXED_Y : i64 = 2i64 ; pub const BILLBOARD_PARTICLES : i64 = 3i64 ; pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const CULL_BACK : i64 = 0i64 ; pub const CULL_DISABLED : i64 = 2i64 ; pub const CULL_FRONT : i64 = 1i64 ; pub const DEPTH_DRAW_ALPHA_OPAQUE_PREPASS : i64 = 3i64 ; pub const DEPTH_DRAW_ALWAYS : i64 = 1i64 ; pub const DEPTH_DRAW_DISABLED : i64 = 2i64 ; pub const DEPTH_DRAW_OPAQUE_ONLY : i64 = 0i64 ; pub const DETAIL_UV_1 : i64 = 0i64 ; pub const DETAIL_UV_2 : i64 = 1i64 ; pub const DIFFUSE_BURLEY : i64 = 0i64 ; pub const DIFFUSE_LAMBERT : i64 = 1i64 ; pub const DIFFUSE_LAMBERT_WRAP : i64 = 2i64 ; pub const DIFFUSE_OREN_NAYAR : i64 = 3i64 ; pub const DIFFUSE_TOON : i64 = 4i64 ; pub const DISTANCE_FADE_DISABLED : i64 = 0i64 ; pub const DISTANCE_FADE_OBJECT_DITHER : i64 = 3i64 ; pub const DISTANCE_FADE_PIXEL_ALPHA : i64 = 1i64 ; pub const DISTANCE_FADE_PIXEL_DITHER : i64 = 2i64 ; pub const EMISSION_OP_ADD : i64 = 0i64 ; pub const EMISSION_OP_MULTIPLY : i64 = 1i64 ; pub const FEATURE_AMBIENT_OCCLUSION : i64 = 6i64 ; pub const FEATURE_ANISOTROPY : i64 = 5i64 ; pub const FEATURE_CLEARCOAT : i64 = 4i64 ; pub const FEATURE_DEPTH_MAPPING : i64 = 7i64 ; pub const FEATURE_DETAIL : i64 = 11i64 ; pub const FEATURE_EMISSION : i64 = 1i64 ; pub const FEATURE_MAX : i64 = 12i64 ; pub const FEATURE_NORMAL_MAPPING : i64 = 2i64 ; pub const FEATURE_REFRACTION : i64 = 10i64 ; pub const FEATURE_RIM : i64 = 3i64 ; pub const FEATURE_SUBSURACE_SCATTERING : i64 = 8i64 ; pub const FEATURE_TRANSMISSION : i64 = 9i64 ; pub const FEATURE_TRANSPARENT : i64 = 0i64 ; pub const FLAG_ALBEDO_FROM_VERTEX_COLOR : i64 = 3i64 ; pub const FLAG_ALBEDO_TEXTURE_FORCE_SRGB : i64 = 14i64 ; pub const FLAG_AO_ON_UV2 : i64 = 11i64 ; pub const FLAG_BILLBOARD_KEEP_SCALE : i64 = 7i64 ; pub const FLAG_DISABLE_AMBIENT_LIGHT : i64 = 17i64 ; pub const FLAG_DISABLE_DEPTH_TEST : i64 = 2i64 ; pub const FLAG_DONT_RECEIVE_SHADOWS : i64 = 15i64 ; pub const FLAG_EMISSION_ON_UV2 : i64 = 12i64 ; pub const FLAG_ENSURE_CORRECT_NORMALS : i64 = 16i64 ; pub const FLAG_FIXED_SIZE : i64 = 6i64 ; pub const FLAG_MAX : i64 = 19i64 ; pub const FLAG_SRGB_VERTEX_COLOR : i64 = 4i64 ; pub const FLAG_TRIPLANAR_USE_WORLD : i64 = 10i64 ; pub const FLAG_UNSHADED : i64 = 0i64 ; pub const FLAG_USE_ALPHA_SCISSOR : i64 = 13i64 ; pub const FLAG_USE_POINT_SIZE : i64 = 5i64 ; pub const FLAG_USE_SHADOW_TO_OPACITY : i64 = 18i64 ; pub const FLAG_USE_VERTEX_LIGHTING : i64 = 1i64 ; pub const FLAG_UV1_USE_TRIPLANAR : i64 = 8i64 ; pub const FLAG_UV2_USE_TRIPLANAR : i64 = 9i64 ; pub const SPECULAR_BLINN : i64 = 1i64 ; pub const SPECULAR_DISABLED : i64 = 4i64 ; pub const SPECULAR_PHONG : i64 = 2i64 ; pub const SPECULAR_SCHLICK_GGX : i64 = 0i64 ; pub const SPECULAR_TOON : i64 = 3i64 ; pub const TEXTURE_ALBEDO : i64 = 0i64 ; pub const TEXTURE_AMBIENT_OCCLUSION : i64 = 8i64 ; pub const TEXTURE_CHANNEL_ALPHA : i64 = 3i64 ; pub const TEXTURE_CHANNEL_BLUE : i64 = 2i64 ; pub const TEXTURE_CHANNEL_GRAYSCALE : i64 = 4i64 ; pub const TEXTURE_CHANNEL_GREEN : i64 = 1i64 ; pub const TEXTURE_CHANNEL_RED : i64 = 0i64 ; pub const TEXTURE_CLEARCOAT : i64 = 6i64 ; pub const TEXTURE_DEPTH : i64 = 9i64 ; pub const TEXTURE_DETAIL_ALBEDO : i64 = 14i64 ; pub const TEXTURE_DETAIL_MASK : i64 = 13i64 ; pub const TEXTURE_DETAIL_NORMAL : i64 = 15i64 ; pub const TEXTURE_EMISSION : i64 = 3i64 ; pub const TEXTURE_FLOWMAP : i64 = 7i64 ; pub const TEXTURE_MAX : i64 = 16i64 ; pub const TEXTURE_METALLIC : i64 = 1i64 ; pub const TEXTURE_NORMAL : i64 = 4i64 ; pub const TEXTURE_REFRACTION : i64 = 12i64 ; pub const TEXTURE_RIM : i64 = 5i64 ; pub const TEXTURE_ROUGHNESS : i64 = 2i64 ; pub const TEXTURE_SUBSURFACE_SCATTERING : i64 = 10i64 ; pub const TEXTURE_TRANSMISSION : i64 = 11i64 ; } 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The strength of the anisotropy effect."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies the channel of the [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: TextureChannel (ret) } } # [doc = "Controls how the object faces the camera. See [enum BillboardMode]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: BillboardMode (ret) } } # [doc = "The material's blend mode.\n**Note:** Values other than `Mix` force the object into the transparent pipeline. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: BlendMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 clearcoat_gloss (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_clearcoat_gloss ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Which side of the object is not drawn when backfaces are rendered. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: CullMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of layers to use when using [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of layers to use when using [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: DepthDrawMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies how the [member detail_albedo] should blend with the current `ALBEDO`. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: BlendMode (ret) } } # [doc = "Specifies whether to use `UV` or `UV2` for the detail layer. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: DetailUv (ret) } } # [doc = "The algorithm used for diffuse light scattering. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: DiffuseMode (ret) } } # [doc = "Specifies which type of fade to use. Can be any of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: DistanceFadeMode (ret) } } # [doc = "Distance at which the object fades fully and is no longer visible."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Distance at which the object starts to fade. If the object is less than this distance away it will appear normal."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The emitted light's color. See [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The emitted light's strength. See [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: EmissionOperator (ret) } } # [doc = "If `true`, the transmission effect 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , feature) ; ret as _ } } # [doc = "If `true`, the vertex color is used as albedo color."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies the channel of the [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: TextureChannel (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The point size in pixels. See [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The strength of the refraction effect."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies the channel of the [member 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: TextureChannel (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 rim_tint (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_rim_tint ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies the channel of the [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: TextureChannel (ret) } } # [doc = "Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.\n**Note:** unlike [member metallic], this is not energy-conserving, so it should be left at `0.5` in most cases. See also [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The method for rendering the specular blob. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: SpecularMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Texture used to control the transmission effect per-pixel. Added to [member transmission]."] # [doc = ""] # [inline] pub fn texture (& self , param : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 uv2_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv2_offset ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, enables the vertex grow setting. See [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } # [doc = "The strength of the anisotropy effect."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , anisotropy) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Specifies the channel of the [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } # [doc = "Controls how the object faces the camera. See [enum BillboardMode]."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The material's blend mode.\n**Note:** Values other than `Mix` force the object into the transparent pipeline. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , blend_mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , clearcoat) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , clearcoat_gloss) ; } } # [doc = "Which side of the object is not drawn when backfaces are rendered. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cull_mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip) ; } } # [doc = "Number of layers to use when using [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Number of layers to use when using [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , depth_draw_mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth_scale) ; } } # [doc = "Specifies how the [member detail_albedo] should blend with the current `ALBEDO`. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail_blend_mode) ; } } # [doc = "Specifies whether to use `UV` or `UV2` for the detail layer. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail_uv) ; } } # [doc = "The algorithm used for diffuse light scattering. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , diffuse_mode) ; } } # [doc = "Specifies which type of fade to use. Can be any of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Distance at which the object fades fully and is no longer visible."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [doc = "Distance at which the object starts to fade. If the object is less than this distance away it will appear normal."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [doc = "The emitted light's color. See [member 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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , emission) ; } } # [doc = "The emitted light's strength. See [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , emission_energy) ; } } # [doc = "Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , operator) ; } } # [doc = "If `true`, the transmission effect is enabled."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , feature , enable) ; } } # [doc = "If `true`, the vertex color is used as albedo color."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, enables the vertex grow setting. See [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , line_width) ; } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , metallic) ; } } # [doc = "Specifies the channel of the [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , normal_scale) ; } } # [doc = "The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _loop) ; } } # [doc = "The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "The point size in pixels. See [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , point_size) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [doc = "The strength of the refraction effect."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , refraction) ; } } # [doc = "Specifies the channel of the [member 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_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rim) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rim_tint) ; } } # [doc = "Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , roughness) ; } } # [doc = "Specifies the channel of the [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } # [doc = "Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.\n**Note:** unlike [member metallic], this is not energy-conserving, so it should be left at `0.5` in most cases. See also [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , specular) ; } } # [doc = "The method for rendering the specular blob. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , specular_mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , strength) ; } } # [doc = "Texture used to control the transmission effect per-pixel. Added to [member transmission]."] # [doc = ""] # [inline] pub fn set_texture (& self , param : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , param , 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , sharpness) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , sharpness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpatialMaterial { } unsafe impl GodotObject for SpatialMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialMaterial" } } impl std :: ops :: Deref for SpatialMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpatialMaterial { } impl Instanciable for SpatialMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "get_anisotropy\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\u{0}" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\u{0}" . as_ptr () as * const c_char) ; table . get_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat\u{0}" . as_ptr () as * const c_char) ; table . get_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat_gloss\u{0}" . as_ptr () as * const c_char) ; table . get_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mode\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_uv\u{0}" . as_ptr () as * const c_char) ; table . get_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_diffuse_mode\u{0}" . as_ptr () as * const c_char) ; table . get_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_emission = (gd_api . godot_method_bind_get_method) (class_name , "get_emission\u{0}" . as_ptr () as * const c_char) ; table . get_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_energy\u{0}" . as_ptr () as * const c_char) ; table . get_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_operator\u{0}" . as_ptr () as * const c_char) ; table . get_feature = (gd_api . godot_method_bind_get_method) (class_name , "get_feature\u{0}" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\u{0}" . as_ptr () as * const c_char) ; table . get_grow = (gd_api . godot_method_bind_get_method) (class_name , "get_grow\u{0}" . as_ptr () as * const c_char) ; table . get_line_width = (gd_api . godot_method_bind_get_method) (class_name , "get_line_width\u{0}" . as_ptr () as * const c_char) ; table . get_metallic = (gd_api . godot_method_bind_get_method) (class_name , "get_metallic\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_scale\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_point_size = (gd_api . godot_method_bind_get_method) (class_name , "get_point_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_refraction = (gd_api . godot_method_bind_get_method) (class_name , "get_refraction\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rim = (gd_api . godot_method_bind_get_method) (class_name , "get_rim\u{0}" . as_ptr () as * const c_char) ; table . get_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "get_rim_tint\u{0}" . as_ptr () as * const c_char) ; table . get_roughness = (gd_api . godot_method_bind_get_method) (class_name , "get_roughness\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_specular = (gd_api . godot_method_bind_get_method) (class_name , "get_specular\u{0}" . as_ptr () as * const c_char) ; table . get_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_specular_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_transmission = (gd_api . godot_method_bind_get_method) (class_name , "get_transmission\u{0}" . as_ptr () as * const c_char) ; table . get_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_offset\u{0}" . as_ptr () as * const c_char) ; table . get_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_offset\u{0}" . as_ptr () as * const c_char) ; table . get_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_scale\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_grow_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_albedo = (gd_api . godot_method_bind_get_method) (class_name , "set_albedo\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "set_anisotropy\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\u{0}" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\u{0}" . as_ptr () as * const c_char) ; table . set_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat\u{0}" . as_ptr () as * const c_char) ; table . set_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat_gloss\u{0}" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_uv\u{0}" . as_ptr () as * const c_char) ; table . set_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_diffuse_mode\u{0}" . as_ptr () as * const c_char) ; table . set_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emission = (gd_api . godot_method_bind_get_method) (class_name , "set_emission\u{0}" . as_ptr () as * const c_char) ; table . set_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_energy\u{0}" . as_ptr () as * const c_char) ; table . set_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_operator\u{0}" . as_ptr () as * const c_char) ; table . set_feature = (gd_api . godot_method_bind_get_method) (class_name , "set_feature\u{0}" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\u{0}" . as_ptr () as * const c_char) ; table . set_grow = (gd_api . godot_method_bind_get_method) (class_name , "set_grow\u{0}" . as_ptr () as * const c_char) ; table . set_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_line_width = (gd_api . godot_method_bind_get_method) (class_name , "set_line_width\u{0}" . as_ptr () as * const c_char) ; table . set_metallic = (gd_api . godot_method_bind_get_method) (class_name , "set_metallic\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_scale\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_point_size = (gd_api . godot_method_bind_get_method) (class_name , "set_point_size\u{0}" . as_ptr () as * const c_char) ; table . set_proximity_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_proximity_fade\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_refraction = (gd_api . godot_method_bind_get_method) (class_name , "set_refraction\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_rim = (gd_api . godot_method_bind_get_method) (class_name , "set_rim\u{0}" . as_ptr () as * const c_char) ; table . set_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "set_rim_tint\u{0}" . as_ptr () as * const c_char) ; table . set_roughness = (gd_api . godot_method_bind_get_method) (class_name , "set_roughness\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_specular = (gd_api . godot_method_bind_get_method) (class_name , "set_specular\u{0}" . as_ptr () as * const c_char) ; table . set_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_specular_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_transmission = (gd_api . godot_method_bind_get_method) (class_name , "set_transmission\u{0}" . as_ptr () as * const c_char) ; table . set_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_offset\u{0}" . as_ptr () as * const c_char) ; table . set_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_offset\u{0}" . as_ptr () as * const c_char) ; table . set_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_scale\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::spatial_material::SpatialMaterial;
            
            pub mod json_parse_result {
                use super::*;
                # [doc = "`core class JSONParseResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [enum Error] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The error message if the JSON source was not successfully parsed. See the [enum Error] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nA [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] will be returned. If the JSON source starts with brackets (`[]`), an [Array] will be returned.\n**Note:** The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [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]) # 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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "The error type if the JSON source was not successfully parsed. See the [enum Error] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , error) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , error_line) ; } } # [doc = "The error message if the JSON source was not successfully parsed. See the [enum Error] 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , error_string . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nA [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] will be returned. If the JSON source starts with brackets (`[]`), an [Array] will be returned.\n**Note:** The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [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]) # 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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "JSONParseResult" } } impl std :: ops :: Deref for JSONParseResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSONParseResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for JSONParseResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for JSONParseResult { } impl Instanciable for JSONParseResult { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_error_line = (gd_api . godot_method_bind_get_method) (class_name , "get_error_line\u{0}" . as_ptr () as * const c_char) ; table . get_error_string = (gd_api . godot_method_bind_get_method) (class_name , "get_error_string\u{0}" . as_ptr () as * const c_char) ; table . get_result = (gd_api . godot_method_bind_get_method) (class_name , "get_result\u{0}" . as_ptr () as * const c_char) ; table . set_error = (gd_api . godot_method_bind_get_method) (class_name , "set_error\u{0}" . as_ptr () as * const c_char) ; table . set_error_line = (gd_api . godot_method_bind_get_method) (class_name , "set_error_line\u{0}" . as_ptr () as * const c_char) ; table . set_error_string = (gd_api . godot_method_bind_get_method) (class_name , "set_error_string\u{0}" . as_ptr () as * const c_char) ; table . set_result = (gd_api . godot_method_bind_get_method) (class_name , "set_result\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::json_parse_result::JSONParseResult;
            
            pub mod audio_effect {
                use super::*;
                # [doc = "`core class AudioEffect` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AudioEffect { } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffect { } unsafe impl GodotObject for AudioEffect { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffect" } } impl std :: ops :: Deref for AudioEffect { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffect { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffect { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffect { }
            }
            pub use crate::generated::audio_effect::AudioEffect;
            
            pub mod visual_script_expression {
                use super::*;
                # [doc = "`core class VisualScriptExpression` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptExpression" } } impl std :: ops :: Deref for VisualScriptExpression { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptExpression { } impl Instanciable for VisualScriptExpression { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_expression::VisualScriptExpression;
            
            pub mod visibility_enabler_2d {
                use super::*;
                # [doc = "`core class VisibilityEnabler2D` inherits `VisibilityNotifier2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler2D { pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_MAX : i64 = 6i64 ; pub const ENABLER_PARENT_PHYSICS_PROCESS : i64 = 4i64 ; pub const ENABLER_PARENT_PROCESS : i64 = 3i64 ; pub const ENABLER_PAUSE_ANIMATED_SPRITES : i64 = 5i64 ; pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; pub const ENABLER_PAUSE_PARTICLES : i64 = 2i64 ; } 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 , thread_access :: 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 = "If `true`, the parent's [method Node._process] will be stopped."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , enabler) ; ret as _ } } # [doc = "If `true`, the parent's [method Node._process] will be stopped."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , enabler , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler2D { } unsafe impl GodotObject for VisibilityEnabler2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityEnabler2D { type Target = crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D ; # [inline] fn deref (& self) -> & crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityEnabler2D { } impl Instanciable for VisibilityEnabler2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visibility_enabler_2d::VisibilityEnabler2D;
            
            pub mod tween {
                use super::*;
                # [doc = "`core class Tween` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tween { pub const EASE_IN : i64 = 0i64 ; pub const EASE_IN_OUT : i64 = 2i64 ; pub const EASE_OUT : i64 = 1i64 ; pub const EASE_OUT_IN : i64 = 3i64 ; pub const TRANS_BACK : i64 = 10i64 ; pub const TRANS_BOUNCE : i64 = 9i64 ; pub const TRANS_CIRC : i64 = 8i64 ; pub const TRANS_CUBIC : i64 = 7i64 ; pub const TRANS_ELASTIC : i64 = 6i64 ; pub const TRANS_EXPO : i64 = 5i64 ; pub const TRANS_LINEAR : i64 = 0i64 ; pub const TRANS_QUAD : i64 = 4i64 ; pub const TRANS_QUART : i64 = 3i64 ; pub const TRANS_QUINT : i64 = 2i64 ; pub const TRANS_SINE : i64 = 1i64 ; pub const TWEEN_PROCESS_IDLE : i64 = 1i64 ; pub const TWEEN_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 [enum TransitionType] for `trans_type` and [enum 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 :: Object > , method : impl Into < GodotString > , initial_val : impl OwnedToVariant , target : impl AsArg < crate :: generated :: object :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [doc = "Follows `property` of `object` and applies it on `target_property` of `target`, beginning from `initial_val` for `duration` seconds, `delay` seconds later.\nUse [enum TransitionType] for `trans_type` and [enum 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 :: Object > , property : impl Into < NodePath > , initial_val : impl OwnedToVariant , target : impl AsArg < crate :: generated :: object :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [method set_active] or [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The tween's animation process thread. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tween :: TweenProcessMode (ret) } } # [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`"] # [doc = ""] # [inline] pub fn interpolate_callback (& self , object : impl AsArg < crate :: generated :: object :: Object > , duration : f64 , callback : impl Into < GodotString > , arg1 : impl OwnedToVariant , arg2 : impl OwnedToVariant , arg3 : impl OwnedToVariant , arg4 : impl OwnedToVariant , arg5 : impl OwnedToVariant) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_callback ; let ret = crate :: icalls :: icallptr_bool_obj_f64_str_var_var_var_var_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , duration , callback . into () , arg1 . owned_to_variant () , arg2 . owned_to_variant () , arg3 . owned_to_variant () , arg4 . owned_to_variant () , arg5 . owned_to_variant ()) ; ret as _ } } # [doc = "Calls `callback` of `object` after `duration` on the main thread (similar to [method 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`"] # [doc = ""] # [inline] pub fn interpolate_deferred_callback (& self , object : impl AsArg < crate :: generated :: object :: Object > , duration : f64 , callback : impl Into < GodotString > , arg1 : impl OwnedToVariant , arg2 : impl OwnedToVariant , arg3 : impl OwnedToVariant , arg4 : impl OwnedToVariant , arg5 : impl OwnedToVariant) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_deferred_callback ; let ret = crate :: icalls :: icallptr_bool_obj_f64_str_var_var_var_var_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , duration , callback . into () , arg1 . owned_to_variant () , arg2 . owned_to_variant () , arg3 . owned_to_variant () , arg4 . owned_to_variant () , arg5 . owned_to_variant ()) ; ret as _ } } # [doc = "Animates `method` of `object` from `initial_val` to `final_val` for `duration` seconds, `delay` seconds later. Methods are called with consecutive values.\nUse [enum TransitionType] for `trans_type` and [enum 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 :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [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 [enum TransitionType] for `trans_type` and [enum 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 :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . remove ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 removed, unless `key` is specified.\n# Default Arguments\n* `key` - `\"\"`"] # [doc = ""] # [inline] pub fn reset (& self , object : impl AsArg < crate :: generated :: object :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , time) ; ret as _ } } # [doc = "Activates/deactivates the tween. See also [method stop_all] and [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , repeat) ; } } # [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 [method set_active] or [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [doc = "The tween's animation process thread. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [enum TransitionType] for `trans_type` and [enum 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 :: Object > , method : impl Into < GodotString > , initial : impl AsArg < crate :: generated :: object :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [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 [enum TransitionType] for `trans_type` and [enum 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 :: Object > , property : impl Into < NodePath > , initial : impl AsArg < crate :: generated :: object :: 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 :: icallptr_bool_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 , trans_type , ease_type , delay) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for Tween { } unsafe impl GodotObject for Tween { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Tween { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tween { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Tween { } unsafe impl SubClass < crate :: generated :: object :: Object > for Tween { } impl Instanciable for Tween { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . follow_property = (gd_api . godot_method_bind_get_method) (class_name , "follow_property\u{0}" . as_ptr () as * const c_char) ; table . get_runtime = (gd_api . godot_method_bind_get_method) (class_name , "get_runtime\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . interpolate_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_callback\u{0}" . as_ptr () as * const c_char) ; table . interpolate_deferred_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_deferred_callback\u{0}" . as_ptr () as * const c_char) ; table . interpolate_method = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_method\u{0}" . as_ptr () as * const c_char) ; table . interpolate_property = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_property\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{0}" . as_ptr () as * const c_char) ; table . is_repeat = (gd_api . godot_method_bind_get_method) (class_name , "is_repeat\u{0}" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\u{0}" . as_ptr () as * const c_char) ; table . remove_all = (gd_api . godot_method_bind_get_method) (class_name , "remove_all\u{0}" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\u{0}" . as_ptr () as * const c_char) ; table . reset_all = (gd_api . godot_method_bind_get_method) (class_name , "reset_all\u{0}" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\u{0}" . as_ptr () as * const c_char) ; table . resume_all = (gd_api . godot_method_bind_get_method) (class_name , "resume_all\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{0}" . as_ptr () as * const c_char) ; table . set_repeat = (gd_api . godot_method_bind_get_method) (class_name , "set_repeat\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; table . stop_all = (gd_api . godot_method_bind_get_method) (class_name , "stop_all\u{0}" . as_ptr () as * const c_char) ; table . targeting_method = (gd_api . godot_method_bind_get_method) (class_name , "targeting_method\u{0}" . as_ptr () as * const c_char) ; table . targeting_property = (gd_api . godot_method_bind_get_method) (class_name , "targeting_property\u{0}" . as_ptr () as * const c_char) ; table . tell = (gd_api . godot_method_bind_get_method) (class_name , "tell\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tween::Tween;
            
            pub mod cylinder_mesh {
                use super::*;
                # [doc = "`core class CylinderMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of radial segments on the cylinder."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of edge rings along the height of the cylinder."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Top radius of the cylinder."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Bottom radius of the cylinder."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "Number of radial segments on the cylinder."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Number of edge rings along the height of the cylinder."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } # [doc = "Top radius of the cylinder."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CylinderMesh { } unsafe impl GodotObject for CylinderMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CylinderMesh" } } impl std :: ops :: Deref for CylinderMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CylinderMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CylinderMesh { } impl Instanciable for CylinderMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\u{0}" . as_ptr () as * const c_char) ; table . get_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_top_radius\u{0}" . as_ptr () as * const c_char) ; table . set_bottom_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_radius\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\u{0}" . as_ptr () as * const c_char) ; table . set_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_top_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cylinder_mesh::CylinderMesh;
            
            pub mod parallax_background {
                use super::*;
                # [doc = "`core class ParallaxBackground` inherits `CanvasLayer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The base position offset for all [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The base motion scale for all [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, elements in [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, elements in [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ignore) ; } } # [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 [member 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 :: icallptr_void_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 [member 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base position offset for all [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base motion scale for all [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxBackground { } unsafe impl GodotObject for ParallaxBackground { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ParallaxBackground { type Target = crate :: generated :: canvas_layer :: CanvasLayer ; # [inline] fn deref (& self) -> & crate :: generated :: canvas_layer :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxBackground { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: canvas_layer :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: canvas_layer :: CanvasLayer > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: node :: Node > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: object :: Object > for ParallaxBackground { } impl Instanciable for ParallaxBackground { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "get_limit_end\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_limit_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_begin\u{0}" . as_ptr () as * const c_char) ; table . set_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_end\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::parallax_background::ParallaxBackground;
            
            pub mod visual_shader_node_custom {
                use super::*;
                # [doc = "`core class VisualShaderNodeCustom` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCustom" } } impl std :: ops :: Deref for VisualShaderNodeCustom { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCustom { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeCustom { } impl Instanciable for VisualShaderNodeCustom { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_custom::VisualShaderNodeCustom;
            
            pub mod world_2d {
                use super::*;
                # [doc = "`core class World2D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] of this world's canvas resource. Used by the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Direct access to the world's physics 2D space state. Used for querying current and potential collisions. Must only be accessed from the main thread within `_physics_process(delta)`."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [RID] of this world's physics space resource. Used by the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for World2D { } unsafe impl GodotObject for World2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World2D" } } impl std :: ops :: Deref for World2D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for World2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for World2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for World2D { } impl Instanciable for World2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::world_2d::World2D;
            
            pub mod audio_effect_amplify {
                use super::*;
                # [doc = "`core class AudioEffectAmplify` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectAmplify { } unsafe impl GodotObject for AudioEffectAmplify { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectAmplify" } } impl std :: ops :: Deref for AudioEffectAmplify { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectAmplify { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectAmplify { } impl Instanciable for AudioEffectAmplify { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_amplify::AudioEffectAmplify;
            
            pub mod input_event_gesture {
                use super::*;
                # [doc = "`core class InputEventGesture` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl InputEventGesture { # [doc = "The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventGesture { } unsafe impl GodotObject for InputEventGesture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventGesture" } } impl std :: ops :: Deref for InputEventGesture { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_gesture::InputEventGesture;
            
            pub mod reg_ex_match {
                use super::*;
                # [doc = "`core class RegExMatch` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [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 :: icallptr_str_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RegExMatch { } unsafe impl GodotObject for RegExMatch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegExMatch" } } impl std :: ops :: Deref for RegExMatch { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegExMatch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RegExMatch { } unsafe impl SubClass < crate :: generated :: object :: Object > for RegExMatch { } impl Instanciable for RegExMatch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\u{0}" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\u{0}" . as_ptr () as * const c_char) ; table . get_start = (gd_api . godot_method_bind_get_method) (class_name , "get_start\u{0}" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\u{0}" . as_ptr () as * const c_char) ; table . get_strings = (gd_api . godot_method_bind_get_method) (class_name , "get_strings\u{0}" . as_ptr () as * const c_char) ; table . get_subject = (gd_api . godot_method_bind_get_method) (class_name , "get_subject\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::reg_ex_match::RegExMatch;
            
            pub mod csg_mesh {
                use super::*;
                # [doc = "`core class CSGMesh` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGMesh { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGMesh { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGMesh { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGMesh { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGMesh { } impl Instanciable for CSGMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_mesh::CSGMesh;
            
            pub mod multiplayer_api {
                use super::*;
                # [doc = "`core class MultiplayerAPI` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiplayerAPI { pub const RPC_MODE_DISABLED : i64 = 0i64 ; pub const RPC_MODE_MASTER : i64 = 2i64 ; pub const RPC_MODE_MASTERSYNC : i64 = 5i64 ; pub const RPC_MODE_PUPPET : i64 = 3i64 ; pub const RPC_MODE_PUPPETSYNC : i64 = 6i64 ; pub const RPC_MODE_REMOTE : i64 = 1i64 ; pub const RPC_MODE_REMOTESYNC : i64 = 4i64 ; pub const RPC_MODE_SLAVE : i64 = 3i64 ; pub const RPC_MODE_SYNC : i64 = 4i64 ; } 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 , thread_access :: 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [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 [method 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 :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the unique peer ID of this MultiplayerAPI's [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn root_node (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_root_node ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if there is a [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this MultiplayerAPI's [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true` (or if the [member network_peer] has [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the MultiplayerAPI's [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to `false`. By default, [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])."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sends the given raw `bytes` to a specific peer identified by `id` (see [method 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 : ByteArray , id : i64 , mode : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . send_bytes ; let ret = crate :: icalls :: icallptr_i64_bytearr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bytes , id , mode) ; GodotError :: result_from_sys (ret as _) } } # [doc = "If `true` (or if the [member network_peer] has [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [method 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 :: networked_multiplayer_peer :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the MultiplayerAPI's [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , refuse) ; } } # [doc = "Sets the base 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_root_node ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerAPI" } } impl std :: ops :: Deref for MultiplayerAPI { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerAPI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiplayerAPI { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiplayerAPI { } impl Instanciable for MultiplayerAPI { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_root_node = (gd_api . godot_method_bind_get_method) (class_name , "get_root_node\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\u{0}" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{0}" . as_ptr () as * const c_char) ; table . send_bytes = (gd_api . godot_method_bind_get_method) (class_name , "send_bytes\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_root_node = (gd_api . godot_method_bind_get_method) (class_name , "set_root_node\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::multiplayer_api::MultiplayerAPI;
            
            pub mod path {
                use super::*;
                # [doc = "`core class Path` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] describing the path."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve_3d :: Curve3D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve_3d :: Curve3D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A [Curve3D] describing the path."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve_3d :: Curve3D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Path { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Path { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Path { } unsafe impl SubClass < crate :: generated :: node :: Node > for Path { } unsafe impl SubClass < crate :: generated :: object :: Object > for Path { } impl Instanciable for Path { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::path::Path;
            
            pub mod groove_joint_2d {
                use super::*;
                # [doc = "`core class GrooveJoint2D` inherits `Joint2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The groove's length. The groove is from the joint's origin towards [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body B's initial anchor position defined by the joint's origin and a local offset [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The groove's length. The groove is from the joint's origin towards [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GrooveJoint2D { } unsafe impl GodotObject for GrooveJoint2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GrooveJoint2D { type Target = crate :: generated :: joint_2d :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GrooveJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint_2d :: Joint2D > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for GrooveJoint2D { } impl Instanciable for GrooveJoint2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\u{0}" . as_ptr () as * const c_char) ; table . set_initial_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_offset\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::groove_joint_2d::GrooveJoint2D;
            
            pub mod performance {
                use super::*;
                # [doc = "`core singleton class Performance` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Performance { pub const AUDIO_OUTPUT_LATENCY : i64 = 30i64 ; pub const MEMORY_DYNAMIC : i64 = 4i64 ; pub const MEMORY_DYNAMIC_MAX : i64 = 6i64 ; pub const MEMORY_MESSAGE_BUFFER_MAX : i64 = 7i64 ; pub const MEMORY_STATIC : i64 = 3i64 ; pub const MEMORY_STATIC_MAX : i64 = 5i64 ; pub const MONITOR_MAX : i64 = 31i64 ; pub const OBJECT_COUNT : i64 = 8i64 ; pub const OBJECT_NODE_COUNT : i64 = 10i64 ; pub const OBJECT_ORPHAN_NODE_COUNT : i64 = 11i64 ; pub const OBJECT_RESOURCE_COUNT : i64 = 9i64 ; 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 RENDER_2D_DRAW_CALLS_IN_FRAME : i64 = 19i64 ; pub const RENDER_2D_ITEMS_IN_FRAME : i64 = 18i64 ; pub const RENDER_DRAW_CALLS_IN_FRAME : i64 = 17i64 ; pub const RENDER_MATERIAL_CHANGES_IN_FRAME : i64 = 14i64 ; pub const RENDER_OBJECTS_IN_FRAME : i64 = 12i64 ; pub const RENDER_SHADER_CHANGES_IN_FRAME : i64 = 15i64 ; pub const RENDER_SURFACE_CHANGES_IN_FRAME : i64 = 16i64 ; pub const RENDER_TEXTURE_MEM_USED : i64 = 21i64 ; pub const RENDER_USAGE_VIDEO_MEM_TOTAL : i64 = 23i64 ; pub const RENDER_VERTEX_MEM_USED : i64 = 22i64 ; pub const RENDER_VERTICES_IN_FRAME : i64 = 13i64 ; pub const RENDER_VIDEO_MEM_USED : i64 = 20i64 ; pub const TIME_FPS : i64 = 0i64 ; pub const TIME_PHYSICS_PROCESS : i64 = 2i64 ; pub const TIME_PROCESS : i64 = 1i64 ; } 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\u{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 [enum 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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , monitor) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for Performance { } unsafe impl GodotObject for Performance { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Performance" } } impl std :: ops :: Deref for Performance { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Performance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::performance::Performance;
            
            pub mod web_socket_peer {
                use super::*;
                # [doc = "`core class WebSocketPeer` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebSocketPeer { pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , code , 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_socket_peer :: WriteMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketPeer { } unsafe impl GodotObject for WebSocketPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketPeer" } } impl std :: ops :: Deref for WebSocketPeer { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketPeer { } impl Instanciable for WebSocketPeer { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\u{0}" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\u{0}" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\u{0}" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\u{0}" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_socket_peer::WebSocketPeer;
            
            pub mod line_shape_2d {
                use super::*;
                # [doc = "`core class LineShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , d) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , normal) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineShape2D { } unsafe impl GodotObject for LineShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LineShape2D" } } impl std :: ops :: Deref for LineShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for LineShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for LineShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for LineShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for LineShape2D { } impl Instanciable for LineShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\u{0}" . as_ptr () as * const c_char) ; table . set_d = (gd_api . godot_method_bind_get_method) (class_name , "set_d\u{0}" . as_ptr () as * const c_char) ; table . set_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_normal\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::line_shape_2d::LineShape2D;
            
            pub mod audio_effect_high_shelf_filter {
                use super::*;
                # [doc = "`core class AudioEffectHighShelfFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectHighShelfFilter" } } impl std :: ops :: Deref for AudioEffectHighShelfFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectHighShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectHighShelfFilter { } impl Instanciable for AudioEffectHighShelfFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_high_shelf_filter::AudioEffectHighShelfFilter;
            
            pub mod canvas_item {
                use super::*;
                # [doc = "`core class CanvasItem` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CanvasItem { pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const BLEND_MODE_DISABLED : i64 = 5i64 ; pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_PREMULT_ALPHA : i64 = 4i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const NOTIFICATION_DRAW : i64 = 30i64 ; pub const NOTIFICATION_ENTER_CANVAS : i64 = 32i64 ; pub const NOTIFICATION_EXIT_CANVAS : i64 = 33i64 ; pub const NOTIFICATION_TRANSFORM_CHANGED : i64 = 2000i64 ; pub const NOTIFICATION_VISIBILITY_CHANGED : i64 = 31i64 ; } impl CanvasItem { # [doc = "Draws an arc between the given angles. The larger the value of `point_count`, the smoother the curve.\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 :: icallptr_void_vec2_f64_f64_f64_i64_color_f64_bool (method_bind , self . this . sys () . as_ptr () , center , radius , start_angle , end_angle , point_count , color , width , antialiased) ; } } # [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 :: 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 :: icallptr_f64_obj_vec2_str_str_color (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr () , position , char . into () , next . into () , modulate) ; ret as _ } } # [doc = "Draws a colored circle."] # [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 :: icallptr_void_vec2_f64_color (method_bind , self . this . sys () . as_ptr () , position , radius , color) ; } } # [doc = "Draws a colored polygon of any amount of points, convex or concave.\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 : Vector2Array , color : Color , uvs : Vector2Array , texture : impl AsArg < crate :: generated :: texture :: Texture > , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_colored_polygon ; let ret = crate :: icalls :: icallptr_void_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) ; } } # [doc = "Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased.\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 :: icallptr_void_vec2_vec2_color_f64_bool (method_bind , self . this . sys () . as_ptr () , from , to , color , width , antialiased) ; } } # [doc = "Draws a [Mesh] in 2D, using the provided texture. See [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 :: Mesh > , texture : impl AsArg < crate :: generated :: texture :: Texture > , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , transform : Transform2D , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_mesh ; let ret = crate :: icalls :: icallptr_void_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, parallel lines with a uniform `color`.\n**Note:** `width` and `antialiased` are currently not implemented and have no effect.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_multiline (& self , points : Vector2Array , 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 :: icallptr_void_vec2arr_color_f64_bool (method_bind , self . this . sys () . as_ptr () , points , color , width , antialiased) ; } } # [doc = "Draws multiple, parallel lines with a uniform `width` and segment-by-segment coloring. Colors assigned to line segments match by index between `points` and `colors`.\n**Note:** `width` and `antialiased` are currently not implemented and have no effect.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_multiline_colors (& self , points : Vector2Array , colors : ColorArray , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_multiline_colors ; let ret = crate :: icalls :: icallptr_void_vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , points , colors , width , antialiased) ; } } # [doc = "Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.\n# Default Arguments\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_multimesh (& self , multimesh : impl AsArg < crate :: generated :: multi_mesh :: MultiMesh > , texture : impl AsArg < crate :: generated :: texture :: Texture > , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_multimesh ; let ret = crate :: icalls :: icallptr_void_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 polygon of any amount of points, convex or concave.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `texture` - `null`\n* `normal_map` - `null`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polygon (& self , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , texture : impl AsArg < crate :: generated :: texture :: Texture > , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_polygon ; let ret = crate :: icalls :: icallptr_void_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) ; } } # [doc = "Draws interconnected line segments with a uniform `color` and `width` and optional antialiasing.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polyline (& self , points : Vector2Array , 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 :: icallptr_void_vec2arr_color_f64_bool (method_bind , self . this . sys () . as_ptr () , points , color , width , antialiased) ; } } # [doc = "Draws interconnected line segments with a uniform `width`, segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between `points` and `colors`.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polyline_colors (& self , points : Vector2Array , colors : ColorArray , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_polyline_colors ; let ret = crate :: icalls :: icallptr_void_vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , points , colors , width , antialiased) ; } } # [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.\n# Default Arguments\n* `texture` - `null`\n* `width` - `1.0`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_primitive (& self , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , texture : impl AsArg < crate :: generated :: texture :: Texture > , width : f64 , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_primitive ; let ret = crate :: icalls :: icallptr_void_vec2arr_colorarr_vec2arr_obj_f64_obj (method_bind , self . this . sys () . as_ptr () , points , colors , uvs , texture . as_arg_ptr () , width , 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 be antialiased.\n**Note:** `width` and `antialiased` are only effective if `filled` is `false`.\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 :: icallptr_void_rect2_color_bool_f64_bool (method_bind , self . this . sys () . as_ptr () , rect , color , filled , width , antialiased) ; } } # [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 :: icallptr_void_vec2_f64_vec2 (method_bind , self . this . sys () . as_ptr () , position , rotation , 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 :: icallptr_void_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` (top-left corner). 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 [method 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 :: 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 :: icallptr_void_obj_vec2_str_color_i64 (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr () , position , text . into () , modulate , clip_w) ; } } # [doc = "Draws a styled rectangle."] # [doc = ""] # [inline] pub fn draw_style_box (& self , style_box : impl AsArg < crate :: generated :: style_box :: StyleBox > , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_style_box ; let ret = crate :: icalls :: icallptr_void_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 :: Texture > , position : Vector2 , modulate : Color , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_texture ; let ret = crate :: icalls :: icallptr_void_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 :: Texture > , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_texture_rect ; let ret = crate :: icalls :: icallptr_void_obj_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , rect , tile , modulate , transpose , 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 :: Texture > , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: 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 :: icallptr_void_obj_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , rect , src_rect , modulate , transpose , normal_map . as_arg_ptr () , clip_uv) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [RID] of the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the canvas item RID used by [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the global position of the mouse."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rendering layers in which this [CanvasItem] responds to [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the mouse position relative to this item's position."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The material applied to textures on this [CanvasItem]."] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The color applied to textures on this [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The color applied to textures on this [CanvasItem]. This is not inherited by children [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the parent [CanvasItem]'s [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the viewport's boundaries as a [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [World2D] where this item is in."] # [doc = ""] # [inline] pub fn get_world_2d (& self) -> Option < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_world_2d ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Hide the [CanvasItem] if it's currently visible."] # [doc = ""] # [inline] pub fn hide (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . hide ; let ret = crate :: icalls :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is set as top-level. See [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return `true`).\n**Note:** For controls that inherit [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is present in the [SceneTree], its [member 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 = CanvasItemMethodTable :: get (get_api ()) . is_visible_in_tree ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; mem :: transmute (ret) } } # [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 :: input_event :: InputEvent >) -> Option < Ref < crate :: generated :: input_event :: InputEvent , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . make_input_local ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: input_event :: InputEvent , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `enable` is `true`, the node won't inherit its transform from parent canvas items."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The rendering layers in which this [CanvasItem] responds to [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , light_mask) ; } } # [doc = "The material applied to textures on this [CanvasItem]."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "The color applied to textures on this [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "If `enable` is `true`, children will be updated with local transform data."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `enable` is `true`, children will be updated with global transform data."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The color applied to textures on this [CanvasItem]. This is not inherited by children [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , self_modulate) ; } } # [doc = "If `true`, the parent [CanvasItem]'s [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return `true`).\n**Note:** For controls that inherit [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [doc = "Show the [CanvasItem] if it's currently hidden. For controls that inherit [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw."] # [doc = ""] # [inline] pub fn update (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasItem { } unsafe impl GodotObject for CanvasItem { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CanvasItem { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasItem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for CanvasItem { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\u{0}" . as_ptr () as * const c_char) ; table . draw_circle = (gd_api . godot_method_bind_get_method) (class_name , "draw_circle\u{0}" . as_ptr () as * const c_char) ; table . draw_colored_polygon = (gd_api . godot_method_bind_get_method) (class_name , "draw_colored_polygon\u{0}" . as_ptr () as * const c_char) ; table . draw_line = (gd_api . godot_method_bind_get_method) (class_name , "draw_line\u{0}" . as_ptr () as * const c_char) ; table . draw_mesh = (gd_api . godot_method_bind_get_method) (class_name , "draw_mesh\u{0}" . as_ptr () as * const c_char) ; table . draw_multiline = (gd_api . godot_method_bind_get_method) (class_name , "draw_multiline\u{0}" . as_ptr () as * const c_char) ; table . draw_multiline_colors = (gd_api . godot_method_bind_get_method) (class_name , "draw_multiline_colors\u{0}" . as_ptr () as * const c_char) ; table . draw_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "draw_multimesh\u{0}" . as_ptr () as * const c_char) ; table . draw_polygon = (gd_api . godot_method_bind_get_method) (class_name , "draw_polygon\u{0}" . as_ptr () as * const c_char) ; table . draw_polyline = (gd_api . godot_method_bind_get_method) (class_name , "draw_polyline\u{0}" . as_ptr () as * const c_char) ; table . draw_polyline_colors = (gd_api . godot_method_bind_get_method) (class_name , "draw_polyline_colors\u{0}" . as_ptr () as * const c_char) ; table . draw_primitive = (gd_api . godot_method_bind_get_method) (class_name , "draw_primitive\u{0}" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\u{0}" . as_ptr () as * const c_char) ; table . draw_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "draw_set_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . draw_string = (gd_api . godot_method_bind_get_method) (class_name , "draw_string\u{0}" . as_ptr () as * const c_char) ; table . draw_style_box = (gd_api . godot_method_bind_get_method) (class_name , "draw_style_box\u{0}" . as_ptr () as * const c_char) ; table . draw_texture = (gd_api . godot_method_bind_get_method) (class_name , "draw_texture\u{0}" . as_ptr () as * const c_char) ; table . draw_texture_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_texture_rect\u{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\u{0}" . as_ptr () as * const c_char) ; table . force_update_transform = (gd_api . godot_method_bind_get_method) (class_name , "force_update_transform\u{0}" . as_ptr () as * const c_char) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\u{0}" . as_ptr () as * const c_char) ; table . get_canvas_item = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_item\u{0}" . as_ptr () as * const c_char) ; table . get_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\u{0}" . as_ptr () as * const c_char) ; table . get_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_self_modulate\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_viewport_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_rect\u{0}" . as_ptr () as * const c_char) ; table . get_viewport_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_transform\u{0}" . as_ptr () as * const c_char) ; table . get_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_world_2d\u{0}" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . make_input_local = (gd_api . godot_method_bind_get_method) (class_name , "make_input_local\u{0}" . as_ptr () as * const c_char) ; table . set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "set_as_toplevel\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mask\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_notify_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_transform\u{0}" . as_ptr () as * const c_char) ; table . set_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_self_modulate\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\u{0}" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\u{0}" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::canvas_item::CanvasItem;
            
            pub mod physics_2d_server {
                use super::*;
                # [doc = "`core singleton class Physics2DServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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) ; pub const TEST_MOTION_MIN_CONTACT_DEPTH : 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Physics2DServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 4i64 ; pub const BODY_PARAM_INERTIA : i64 = 3i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_PARAM_MAX : i64 = 7i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const DAMPED_STRING_DAMPING : i64 = 2i64 ; pub const DAMPED_STRING_REST_LENGTH : i64 = 0i64 ; pub const DAMPED_STRING_STIFFNESS : i64 = 1i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_DAMPED_SPRING : i64 = 2i64 ; pub const JOINT_GROOVE : i64 = 1i64 ; pub const JOINT_PARAM_BIAS : i64 = 0i64 ; pub const JOINT_PARAM_MAX_BIAS : i64 = 1i64 ; pub const JOINT_PARAM_MAX_FORCE : i64 = 2i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const SHAPE_CAPSULE : i64 = 5i64 ; pub const SHAPE_CIRCLE : i64 = 3i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SHAPE_CUSTOM : i64 = 8i64 ; pub const SHAPE_LINE : i64 = 0i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SHAPE_RECTANGLE : i64 = 4i64 ; pub const SHAPE_SEGMENT : i64 = 2i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 6i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH : i64 = 7i64 ; } 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\u{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 = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [Area2D]."] # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns an area parameter value. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param) ; Variant :: from_sys (ret) } } # [doc = "Returns the [RID] of the nth shape of an area."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = ""] # [inline] pub 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 :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the space assigned to the area."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , area) ; Rid :: from_sys (ret) } } # [doc = "Returns the space override mode for the area."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode (ret) } } # [doc = "Returns the transform matrix for an area."] # [doc = ""] # [inline] pub 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 :: icallptr_trans2D_rid (method_bind , self . this . sys () . as_ptr () , area) ; mem :: transmute (ret) } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask) ; } } # [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: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [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 = ""] # [inline] pub fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable) ; } } # [doc = "Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param , 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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx , shape) ; } } # [doc = "Disables a given shape in an area."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx , disabled) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , area , shape_idx , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , area , space) ; } } # [doc = "Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method 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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , torque) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Removes all shapes from a body."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the continuous collision detection mode."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: CcdMode (ret) } } # [doc = "Returns the [Physics2DDirectBodyState] of the body."] # [doc = ""] # [inline] pub fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , body) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the body mode."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: BodyMode (ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param) ; ret as _ } } # [doc = "Returns the [RID] of the nth shape of a body."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the metadata of a shape of a body."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the transform matrix of a body shape."] # [doc = ""] # [inline] pub 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 :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the [RID] of the space assigned to a body."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , body) ; Rid :: from_sys (ret) } } # [doc = "Returns a body state."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state) ; Variant :: from_sys (ret) } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Removes a body from the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; } } # [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 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 :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask) ; } } # [doc = "Sets the continuous collision detection mode using one of the [enum 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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = ""] # [inline] pub fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount) ; } } # [doc = "Sets the body mode using one of the [enum BodyMode] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Sets a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param , value) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx , shape) ; } } # [doc = "Enables one way collision on body if `enable` is `true`."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool_f64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx , enable , margin) ; } } # [doc = "Disables shape in body if `disable` is `true`."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx , disabled) ; } } # [doc = "Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , shape_idx , metadata . owned_to_variant ()) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , body , shape_idx , transform) ; } } # [doc = "Assigns a space to the body (see [method space_create])."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state using one of the [enum BodyState] constants.\nNote that the method doesn't take effect immediately. The state will change on the next physics frame."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state , 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] can be passed to return additional information in.\n# Default Arguments\n* `margin` - `0.08`\n* `result` - `null`"] # [doc = ""] # [inline] pub fn body_test_motion (& self , body : Rid , from : Transform2D , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: physics_2d_test_motion_result :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_test_motion ; let ret = crate :: icalls :: icallptr_bool_rid_trans2D_vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , body , from , motion , infinite_inertia , margin , result . as_arg_ptr ()) ; ret as _ } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a damped spring joint parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets a damped spring joint parameter. See [enum DampedStringParam] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = "Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns information about the current state of the 2D physics engine. See [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , process_info) ; ret as _ } } # [doc = "Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_vec2_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , groove1_a , groove2_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a joint parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Returns a joint's type (see [enum JointType])."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , joint) ; crate :: generated :: physics_2d_server :: JointType (ret) } } # [doc = "Sets a joint parameter. See [enum JointParam] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor , body_a , body_b) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "Returns the shape data."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid (method_bind , self . this . sys () . as_ptr () , shape) ; Variant :: from_sys (ret) } } # [doc = "Returns a shape's type (see [enum ShapeType])."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , shape) ; crate :: generated :: physics_2d_server :: ShapeType (ret) } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [method area_set_space], or to a body with [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = ""] # [inline] pub fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , space) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the value of a space parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param) ; ret as _ } } # [doc = "Returns whether the space is active."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , space) ; ret as _ } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , space , active) ; } } # [doc = "Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServer { } unsafe impl GodotObject for Physics2DServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServer" } } impl std :: ops :: Deref for Physics2DServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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 , 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\u{0}" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\u{0}" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\u{0}" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\u{0}" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\u{0}" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\u{0}" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\u{0}" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\u{0}" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\u{0}" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\u{0}" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\u{0}" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\u{0}" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\u{0}" . as_ptr () as * const c_char) ; table . body_test_motion = (gd_api . godot_method_bind_get_method) (class_name , "body_test_motion\u{0}" . as_ptr () as * const c_char) ; table . capsule_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "capsule_shape_create\u{0}" . as_ptr () as * const c_char) ; table . circle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "circle_shape_create\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\u{0}" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\u{0}" . as_ptr () as * const c_char) ; table . groove_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "groove_joint_create\u{0}" . as_ptr () as * const c_char) ; table . joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_param\u{0}" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\u{0}" . as_ptr () as * const c_char) ; table . joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_param\u{0}" . as_ptr () as * const c_char) ; table . line_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "line_shape_create\u{0}" . as_ptr () as * const c_char) ; table . pin_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_create\u{0}" . as_ptr () as * const c_char) ; table . ray_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "ray_shape_create\u{0}" . as_ptr () as * const c_char) ; table . rectangle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "rectangle_shape_create\u{0}" . as_ptr () as * const c_char) ; table . segment_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "segment_shape_create\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{0}" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\u{0}" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\u{0}" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\u{0}" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\u{0}" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\u{0}" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\u{0}" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_server::Physics2DServer;
            
            pub mod animation_node_animation {
                use super::*;
                # [doc = "`core class AnimationNodeAnimation` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Animation to use as an output. It is one of the animations provided by [member 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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAnimation" } } impl std :: ops :: Deref for AnimationNodeAnimation { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAnimation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAnimation { } impl Instanciable for AnimationNodeAnimation { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_animation::AnimationNodeAnimation;
            
            pub mod arvr_interface_gdnative {
                use super::*;
                # [doc = "`core class ARVRInterfaceGDNative` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterfaceGDNative" } } impl std :: ops :: Deref for ARVRInterfaceGDNative { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterfaceGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRInterfaceGDNative { } impl Instanciable for ARVRInterfaceGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::arvr_interface_gdnative::ARVRInterfaceGDNative;
            
            pub mod csg_cylinder {
                use super::*;
                # [doc = "`core class CSGCylinder` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , cone) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGCylinder { } unsafe impl GodotObject for CSGCylinder { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGCylinder { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCylinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGCylinder { } impl Instanciable for CSGCylinder { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\u{0}" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\u{0}" . as_ptr () as * const c_char) ; table . is_cone = (gd_api . godot_method_bind_get_method) (class_name , "is_cone\u{0}" . as_ptr () as * const c_char) ; table . set_cone = (gd_api . godot_method_bind_get_method) (class_name , "set_cone\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\u{0}" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_cylinder::CSGCylinder;
            
            pub mod mesh_instance {
                use super::*;
                # [doc = "`core class MeshInstance` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] child node with a [ConvexPolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing."] # [doc = ""] # [inline] pub fn create_convex_collision (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . create_convex_collision ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "This helper creates a [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "This helper creates a [StaticBody] child node with a [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_active_material (& self , surface : i64) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_active_material ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , surface) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Mesh] resource for the instance."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "[NodePath] to the [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Sets the skin to be used by this instance."] # [doc = ""] # [inline] pub fn skin (& self) -> Option < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the [Material] for a surface of the [Mesh] resource."] # [doc = ""] # [inline] pub fn get_surface_material (& self , surface : i64) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_surface_material ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , surface) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of surface 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Mesh] resource for the instance."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "[NodePath] to the [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 :: icallptr_void_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 :: Skin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_skin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , skin . as_arg_ptr ()) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Sets the [Material] for a surface of the [Mesh] resource."] # [doc = ""] # [inline] pub fn set_surface_material (& self , surface : i64 , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_surface_material ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , surface , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshInstance { } unsafe impl GodotObject for MeshInstance { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MeshInstance { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for MeshInstance { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for MeshInstance { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for MeshInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for MeshInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshInstance { } impl Instanciable for MeshInstance { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_software_skinning_transform_normals_enabled : * 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_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_software_skinning_transform_normals_enabled : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_debug_tangents = (gd_api . godot_method_bind_get_method) (class_name , "create_debug_tangents\u{0}" . as_ptr () as * const c_char) ; table . create_trimesh_collision = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_collision\u{0}" . as_ptr () as * const c_char) ; table . get_active_material = (gd_api . godot_method_bind_get_method) (class_name , "get_active_material\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_path\u{0}" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\u{0}" . as_ptr () as * const c_char) ; table . get_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_material\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton_path\u{0}" . as_ptr () as * const c_char) ; table . set_skin = (gd_api . godot_method_bind_get_method) (class_name , "set_skin\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "set_surface_material\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh_instance::MeshInstance;
            
            pub mod occluder_polygon_2d {
                use super::*;
                # [doc = "`core class OccluderPolygon2D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OccluderPolygon2D { pub const CULL_CLOCKWISE : i64 = 1i64 ; pub const CULL_COUNTER_CLOCKWISE : i64 = 2i64 ; pub const CULL_DISABLED : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: occluder_polygon_2d :: CullMode (ret) } } # [doc = "A [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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (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 is_closed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . is_closed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , closed) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cull_mode) ; } } # [doc = "A [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 : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OccluderPolygon2D { } unsafe impl GodotObject for OccluderPolygon2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OccluderPolygon2D" } } impl std :: ops :: Deref for OccluderPolygon2D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OccluderPolygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for OccluderPolygon2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for OccluderPolygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for OccluderPolygon2D { } impl Instanciable for OccluderPolygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . is_closed = (gd_api . godot_method_bind_get_method) (class_name , "is_closed\u{0}" . as_ptr () as * const c_char) ; table . set_closed = (gd_api . godot_method_bind_get_method) (class_name , "set_closed\u{0}" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\u{0}" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::occluder_polygon_2d::OccluderPolygon2D;
            
            pub mod environment {
                use super::*;
                # [doc = "`core class Environment` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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) ; } 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Environment { pub const BG_CAMERA_FEED : i64 = 6i64 ; pub const BG_CANVAS : i64 = 4i64 ; pub const BG_CLEAR_COLOR : i64 = 0i64 ; pub const BG_COLOR : i64 = 1i64 ; pub const BG_COLOR_SKY : i64 = 3i64 ; pub const BG_KEEP : i64 = 5i64 ; pub const BG_MAX : i64 = 7i64 ; pub const BG_SKY : i64 = 2i64 ; pub const DOF_BLUR_QUALITY_HIGH : i64 = 2i64 ; pub const DOF_BLUR_QUALITY_LOW : i64 = 0i64 ; pub const DOF_BLUR_QUALITY_MEDIUM : i64 = 1i64 ; pub const GLOW_BLEND_MODE_ADDITIVE : i64 = 0i64 ; pub const GLOW_BLEND_MODE_REPLACE : i64 = 3i64 ; pub const GLOW_BLEND_MODE_SCREEN : i64 = 1i64 ; pub const GLOW_BLEND_MODE_SOFTLIGHT : i64 = 2i64 ; pub const SSAO_BLUR_1x1 : i64 = 1i64 ; pub const SSAO_BLUR_2x2 : i64 = 2i64 ; pub const SSAO_BLUR_3x3 : i64 = 3i64 ; pub const SSAO_BLUR_DISABLED : i64 = 0i64 ; pub const SSAO_QUALITY_HIGH : i64 = 2i64 ; pub const SSAO_QUALITY_LOW : i64 = 0i64 ; pub const SSAO_QUALITY_MEDIUM : i64 = 1i64 ; pub const TONE_MAPPER_ACES : i64 = 3i64 ; pub const TONE_MAPPER_FILMIC : i64 = 2i64 ; pub const TONE_MAPPER_LINEAR : i64 = 0i64 ; pub const TONE_MAPPER_REINHARDT : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Applies the provided [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_color_correction ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 adjustment_saturation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_saturation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ambient light's [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Defines the amount of light that the sky brings on the scene. A value of 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 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."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The background mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: BgMode (ret) } } # [doc = "The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum layer ID to display. Only effective when using the [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: DofBlurQuality (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: DofBlurQuality (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The fog's [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Y coordinate where the height fog will be the most intense. If this value is greater than [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Y coordinate where the height fog will be the least intense. If this value is greater than [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The depth fog's [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: GlowBlendMode (ret) } } # [doc = "The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 glow_intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_intensity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 glow_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_strength ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Sky] resource defined as background."] # [doc = ""] # [inline] pub fn sky (& self) -> Option < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Sky] resource's rotation expressed as a [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 :: icallptr_basis (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 ssao_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_bias ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The screen-space ambient occlusion blur quality. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: SsaoBlur (ret) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The primary screen-space ambient occlusion intensity. See also [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The secondary screen-space ambient occlusion intensity. See also [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: SsaoQuality (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 ssao_radius2 (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_radius2 ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The tonemapping mode to use. Tonemapping is the process that \"converts\" HDR values to be suitable for rendering on a LDR 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: environment :: ToneMapper (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, fog effects are enabled. [member fog_height_enabled] and/or [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the glow effect is enabled."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the 7th level of glow is enabled. This is the most \"global\" level (blurriest)."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , brightness) ; } } # [doc = "Applies the provided [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_color_correction ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , contrast) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , saturation) ; } } # [doc = "The ambient light's [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = "Defines the amount of light that the sky brings on the scene. A value of 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 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."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = "The background mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant 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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , camera_feed_id) ; } } # [doc = "The maximum layer ID to display. Only effective when using the [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , level) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [doc = "The fog's [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [doc = "If `true`, fog effects are enabled. [member fog_height_enabled] and/or [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The Y coordinate where the height fog will be the most intense. If this value is greater than [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The Y coordinate where the height fog will be the least intense. If this value is greater than [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The depth fog's [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, the glow effect is enabled."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [doc = "If `true`, the 7th level of glow is enabled. This is the most \"global\" level (blurriest)."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , strength) ; } } # [doc = "The [Sky] resource defined as background."] # [doc = ""] # [inline] pub fn set_sky (& self , sky : impl AsArg < crate :: generated :: sky :: Sky >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , sky . as_arg_ptr ()) ; } } # [doc = "The [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The [Sky] resource's rotation expressed as a [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 :: icallptr_void_basis (method_bind , self . this . sys () . as_ptr () , orientation) ; } } # [doc = "The [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , euler_radians) ; } } # [doc = "The [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [doc = "The screen-space ambient occlusion blur quality. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , edge_sharpness) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The primary screen-space ambient occlusion intensity. See also [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [doc = "The secondary screen-space ambient occlusion intensity. See also [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , intensity) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth_tolerance) ; } } # [doc = "If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fade_in) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fade_out) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_steps) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , rough) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , auto_exposure) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , exposure_grey) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , exposure_max) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , exposure_min) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , exposure_speed) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , exposure) ; } } # [doc = "The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , white) ; } } # [doc = "The tonemapping mode to use. Tonemapping is the process that \"converts\" HDR values to be suitable for rendering on a LDR 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Environment { } unsafe impl GodotObject for Environment { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Environment" } } impl std :: ops :: Deref for Environment { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Environment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Environment { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Environment { } unsafe impl SubClass < crate :: generated :: object :: Object > for Environment { } impl Instanciable for Environment { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_contrast\u{0}" . as_ptr () as * const c_char) ; table . get_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_saturation\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_background = (gd_api . godot_method_bind_get_method) (class_name , "get_background\u{0}" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\u{0}" . as_ptr () as * const c_char) ; table . get_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_energy\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_color\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_bloom\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_intensity\u{0}" . as_ptr () as * const c_char) ; table . get_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_strength\u{0}" . as_ptr () as * const c_char) ; table . get_sky = (gd_api . godot_method_bind_get_method) (class_name , "get_sky\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_orientation\u{0}" . as_ptr () as * const c_char) ; table . get_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_rotation\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_bias\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_blur\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_color\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity2\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_quality\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius\u{0}" . as_ptr () as * const c_char) ; table . get_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius2\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_exposure\u{0}" . as_ptr () as * const c_char) ; table . get_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_white\u{0}" . as_ptr () as * const c_char) ; table . get_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemapper\u{0}" . as_ptr () as * const c_char) ; table . is_adjustment_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_adjustment_enabled\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_enabled\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssao_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_rough\u{0}" . as_ptr () as * const c_char) ; table . set_adjustment_brightness = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_brightness\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_contrast\u{0}" . as_ptr () as * const c_char) ; table . set_adjustment_enable = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_enable\u{0}" . as_ptr () as * const c_char) ; table . set_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_saturation\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_background = (gd_api . godot_method_bind_get_method) (class_name , "set_background\u{0}" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\u{0}" . as_ptr () as * const c_char) ; table . set_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_energy\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_color\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_enabled\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_bloom\u{0}" . as_ptr () as * const c_char) ; table . set_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_enabled\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_intensity\u{0}" . as_ptr () as * const c_char) ; table . set_glow_level = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_level\u{0}" . as_ptr () as * const c_char) ; table . set_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_strength\u{0}" . as_ptr () as * const c_char) ; table . set_sky = (gd_api . godot_method_bind_get_method) (class_name , "set_sky\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_orientation\u{0}" . as_ptr () as * const c_char) ; table . set_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_rotation\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_bias\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_blur\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_color\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity2\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_quality\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius\u{0}" . as_ptr () as * const c_char) ; table . set_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius2\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_enabled\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_rough\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_exposure\u{0}" . as_ptr () as * const c_char) ; table . set_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_white\u{0}" . as_ptr () as * const c_char) ; table . set_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemapper\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::environment::Environment;
            
            pub mod visual_script_variable_get {
                use super::*;
                # [doc = "`core class VisualScriptVariableGet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptVariableGet" } } impl std :: ops :: Deref for VisualScriptVariableGet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptVariableGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptVariableGet { } impl Instanciable for VisualScriptVariableGet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_variable = (gd_api . godot_method_bind_get_method) (class_name , "set_variable\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_variable_get::VisualScriptVariableGet;
            
            pub mod visual_shader_node_vector_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorFunc { 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_HSV2RGB : i64 = 5i64 ; pub const FUNC_INVERSE_SQRT : i64 = 21i64 ; pub const FUNC_LOG : i64 = 22i64 ; pub const FUNC_LOG2 : i64 = 23i64 ; pub const FUNC_NEGATE : i64 = 2i64 ; pub const FUNC_NORMALIZE : i64 = 0i64 ; pub const FUNC_ONEMINUS : i64 = 34i64 ; pub const FUNC_RADIANS : i64 = 24i64 ; pub const FUNC_RECIPROCAL : i64 = 3i64 ; pub const FUNC_RGB2HSV : i64 = 4i64 ; pub const FUNC_ROUND : i64 = 25i64 ; pub const FUNC_ROUNDEVEN : i64 = 26i64 ; pub const FUNC_SATURATE : i64 = 1i64 ; 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 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_vector_func :: Function (ret) } } # [doc = "The function to be performed. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorFunc { } unsafe impl GodotObject for VisualShaderNodeVectorFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorFunc" } } impl std :: ops :: Deref for VisualShaderNodeVectorFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorFunc { } impl Instanciable for VisualShaderNodeVectorFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_func::VisualShaderNodeVectorFunc;
            
            pub mod procedural_sky {
                use super::*;
                # [doc = "`core class ProceduralSky` inherits `Sky` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ProceduralSky { pub const TEXTURE_SIZE_1024 : i64 = 2i64 ; pub const TEXTURE_SIZE_2048 : i64 = 3i64 ; pub const TEXTURE_SIZE_256 : i64 = 0i64 ; pub const TEXTURE_SIZE_4096 : i64 = 4i64 ; pub const TEXTURE_SIZE_512 : i64 = 1i64 ; 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "How quickly the [member ground_horizon_color] fades into the [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "How quickly the [member sky_horizon_color] fades into the [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "How quickly the sun fades away between [member sun_angle_min] and [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Size of [Texture] that the ProceduralSky will generate. The size is set using [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: procedural_sky :: TextureSize (ret) } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the [member ground_horizon_color] fades into the [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the [member sky_horizon_color] fades into the [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the sun fades away between [member sun_angle_min] and [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Size of [Texture] that the ProceduralSky will generate. The size is set using [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProceduralSky { } unsafe impl GodotObject for ProceduralSky { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ProceduralSky" } } impl std :: ops :: Deref for ProceduralSky { type Target = crate :: generated :: sky :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProceduralSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sky :: Sky > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProceduralSky { } impl Instanciable for ProceduralSky { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_curve\u{0}" . as_ptr () as * const c_char) ; table . get_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_energy\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_curve\u{0}" . as_ptr () as * const c_char) ; table . get_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_energy\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_color\u{0}" . as_ptr () as * const c_char) ; table . get_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_curve\u{0}" . as_ptr () as * const c_char) ; table . get_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_energy\u{0}" . as_ptr () as * const c_char) ; table . get_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_latitude\u{0}" . as_ptr () as * const c_char) ; table . get_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_longitude\u{0}" . as_ptr () as * const c_char) ; table . get_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_curve\u{0}" . as_ptr () as * const c_char) ; table . set_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_energy\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_curve\u{0}" . as_ptr () as * const c_char) ; table . set_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_energy\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_color\u{0}" . as_ptr () as * const c_char) ; table . set_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_curve\u{0}" . as_ptr () as * const c_char) ; table . set_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_energy\u{0}" . as_ptr () as * const c_char) ; table . set_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_latitude\u{0}" . as_ptr () as * const c_char) ; table . set_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_longitude\u{0}" . as_ptr () as * const c_char) ; table . set_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::procedural_sky::ProceduralSky;
            
            pub mod visual_script_preload {
                use super::*;
                # [doc = "`core class VisualScriptPreload` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . get_preload ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_preload (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . set_preload ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPreload" } } impl std :: ops :: Deref for VisualScriptPreload { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPreload { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptPreload { } impl Instanciable for VisualScriptPreload { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_preload = (gd_api . godot_method_bind_get_method) (class_name , "set_preload\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_preload::VisualScriptPreload;
            
            pub mod animation_track_edit_plugin {
                use super::*;
                # [doc = "`tools class AnimationTrackEditPlugin` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AnimationTrackEditPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTrackEditPlugin { } unsafe impl GodotObject for AnimationTrackEditPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationTrackEditPlugin" } } impl std :: ops :: Deref for AnimationTrackEditPlugin { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTrackEditPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationTrackEditPlugin { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationTrackEditPlugin { }
            }
            pub use crate::generated::animation_track_edit_plugin::AnimationTrackEditPlugin;
            
            pub mod hinge_joint {
                use super::*;
                # [doc = "`core class HingeJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HingeJoint { pub const FLAG_ENABLE_MOTOR : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const FLAG_USE_LIMIT : i64 = 0i64 ; pub const PARAM_BIAS : i64 = 0i64 ; pub const PARAM_LIMIT_BIAS : i64 = 3i64 ; pub const PARAM_LIMIT_LOWER : i64 = 2i64 ; pub const PARAM_LIMIT_RELAXATION : i64 = 5i64 ; pub const PARAM_LIMIT_SOFTNESS : i64 = 4i64 ; pub const PARAM_LIMIT_UPPER : i64 = 1i64 ; pub const PARAM_MAX : i64 = 8i64 ; pub const PARAM_MOTOR_MAX_IMPULSE : i64 = 7i64 ; pub const PARAM_MOTOR_TARGET_VELOCITY : i64 = 6i64 ; } 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 , thread_access :: 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 = "When activated, a motor turns the hinge."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "The speed with which the two bodies get pulled together when they move in different directions."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "When activated, a motor turns the hinge."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enabled) ; } } # [doc = "The speed with which the two bodies get pulled together when they move in different directions."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HingeJoint { } unsafe impl GodotObject for HingeJoint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HingeJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HingeJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for HingeJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for HingeJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for HingeJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for HingeJoint { } impl Instanciable for HingeJoint { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\u{0}" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::hinge_joint::HingeJoint;
            
            pub mod crypto {
                use super::*;
                # [doc = "`core class Crypto` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "Generates a [PoolByteArray] of cryptographically secure random bytes with given `size`."] # [doc = ""] # [inline] pub fn generate_random_bytes (& self , size : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_random_bytes ; let ret = crate :: icalls :: icallptr_bytearr_i64 (method_bind , self . this . sys () . as_ptr () , size) ; ByteArray :: from_sys (ret) } } # [doc = "Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.accept_stream]."] # [doc = ""] # [inline] pub fn generate_rsa (& self , size : i64) -> Option < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_rsa ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , size) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nGenerates a self-signed [X509Certificate] from the given [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 :: crypto_key :: CryptoKey > , issuer_name : impl Into < GodotString > , not_before : impl Into < GodotString > , not_after : impl Into < GodotString >) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_self_signed_certificate ; let ret = crate :: icalls :: icallptr_obj_obj_str_str_str (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , issuer_name . into () , not_before . into () , not_after . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for Crypto { } unsafe impl GodotObject for Crypto { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Crypto" } } impl std :: ops :: Deref for Crypto { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Crypto { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Crypto { } unsafe impl SubClass < crate :: generated :: object :: Object > for Crypto { } impl Instanciable for Crypto { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Crypto :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoMethodTable { pub class_constructor : sys :: godot_class_constructor , 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 } impl CryptoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoMethodTable = CryptoMethodTable { class_constructor : None , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate_random_bytes = (gd_api . godot_method_bind_get_method) (class_name , "generate_random_bytes\u{0}" . as_ptr () as * const c_char) ; table . generate_rsa = (gd_api . godot_method_bind_get_method) (class_name , "generate_rsa\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::crypto::Crypto;
            
            pub mod visual_shader_node {
                use super::*;
                # [doc = "`core class VisualShaderNode` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNode { pub const PORT_TYPE_BOOLEAN : i64 = 2i64 ; pub const PORT_TYPE_MAX : i64 = 5i64 ; pub const PORT_TYPE_SAMPLER : i64 = 4i64 ; pub const PORT_TYPE_SCALAR : i64 = 0i64 ; pub const PORT_TYPE_TRANSFORM : i64 = 3i64 ; pub const PORT_TYPE_VECTOR : i64 = 1i64 ; } impl VisualShaderNode { # [doc = "Returns an [Array] 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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , port) ; Variant :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the default input ports values using an [Array] 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 :: icallptr_void_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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , port , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , port) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNode { } unsafe impl GodotObject for VisualShaderNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNode" } } impl std :: ops :: Deref for VisualShaderNode { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node::VisualShaderNode;
            
            pub mod marshalls {
                use super::*;
                # [doc = "`core singleton class Marshalls` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] corresponding to the Base64-encoded string `base64_str`."] # [doc = ""] # [inline] pub fn base64_to_raw (& self , base64_str : impl Into < GodotString >) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_raw ; let ret = crate :: icalls :: icallptr_bytearr_str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; ByteArray :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns a decoded [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 :: icallptr_var_str_bool (method_bind , self . this . sys () . as_ptr () , base64_str . into () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "Returns a Base64-encoded string of a given [PoolByteArray]."] # [doc = ""] # [inline] pub fn raw_to_base64 (& self , array : ByteArray) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . raw_to_base64 ; let ret = crate :: icalls :: icallptr_str_bytearr (method_bind , self . this . sys () . as_ptr () , array) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , utf8_str . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns a Base64-encoded string of the [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 :: icallptr_str_var_bool (method_bind , self . this . sys () . as_ptr () , variant . owned_to_variant () , full_objects) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Marshalls { } unsafe impl GodotObject for Marshalls { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Marshalls" } } impl std :: ops :: Deref for Marshalls { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Marshalls { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . base64_to_utf8 = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_utf8\u{0}" . as_ptr () as * const c_char) ; table . base64_to_variant = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_variant\u{0}" . as_ptr () as * const c_char) ; table . raw_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "raw_to_base64\u{0}" . as_ptr () as * const c_char) ; table . utf8_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "utf8_to_base64\u{0}" . as_ptr () as * const c_char) ; table . variant_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "variant_to_base64\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::marshalls::Marshalls;
            
            pub mod reference_rect {
                use super::*;
                # [doc = "`core class ReferenceRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] of the [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If set to `true`, the [ReferenceRect] will only be visible while in editor. Otherwise, [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the border [Color] of the [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [doc = "If set to `true`, the [ReferenceRect] will only be visible while in editor. Otherwise, [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ReferenceRect { } unsafe impl GodotObject for ReferenceRect { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ReferenceRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ReferenceRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for ReferenceRect { } impl Instanciable for ReferenceRect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\u{0}" . as_ptr () as * const c_char) ; table . get_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_only\u{0}" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\u{0}" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\u{0}" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::reference_rect::ReferenceRect;
            
            pub mod input_event_mouse_motion {
                use super::*;
                # [doc = "`core class InputEventMouseMotion` inherits `InputEventMouse` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The mouse position relative to the previous position (position at the last frame).\n**Note:** Since [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pressure) ; } } # [doc = "The mouse position relative to the previous position (position at the last frame).\n**Note:** Since [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , tilt) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseMotion { } unsafe impl GodotObject for InputEventMouseMotion { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseMotion" } } impl std :: ops :: Deref for InputEventMouseMotion { type Target = crate :: generated :: input_event_mouse :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseMotion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_mouse :: InputEventMouse > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouseMotion { } impl Instanciable for InputEventMouseMotion { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\u{0}" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\u{0}" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\u{0}" . as_ptr () as * const c_char) ; table . get_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_tilt\u{0}" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\u{0}" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\u{0}" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\u{0}" . as_ptr () as * const c_char) ; table . set_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_tilt\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_mouse_motion::InputEventMouseMotion;
            
            pub mod audio_stream_random_pitch {
                use super::*;
                # [doc = "`core class AudioStreamRandomPitch` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]."] # [doc = ""] # [inline] pub fn audio_stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . get_audio_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current [AudioStream]."] # [doc = ""] # [inline] pub fn set_audio_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . set_audio_stream ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamRandomPitch { } unsafe impl GodotObject for AudioStreamRandomPitch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamRandomPitch" } } impl std :: ops :: Deref for AudioStreamRandomPitch { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamRandomPitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamRandomPitch { } impl Instanciable for AudioStreamRandomPitch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "get_random_pitch\u{0}" . as_ptr () as * const c_char) ; table . set_audio_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_stream\u{0}" . as_ptr () as * const c_char) ; table . set_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "set_random_pitch\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_random_pitch::AudioStreamRandomPitch;
            
            pub mod audio_server {
                use super::*;
                # [doc = "`core singleton class AudioServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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\u{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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , at_position) ; } } # [doc = "Adds an [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 :: audio_effect :: AudioEffect > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . add_bus_effect ; let ret = crate :: icalls :: icallptr_void_i64_obj_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect . as_arg_ptr () , at_position) ; } } # [doc = "Name of the current device for audio input (see [method capture_get_device_list])."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the names of all audio input devices detected on the system."] # [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 = "Sets which audio input device is used for audio capture."] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Generates an [AudioBusLayout] using the available buses and effects."] # [doc = ""] # [inline] pub fn generate_bus_layout (& self) -> Option < Ref < crate :: generated :: audio_bus_layout :: AudioBusLayout , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . generate_bus_layout ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_bus_layout :: AudioBusLayout , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [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 :: audio_effect :: AudioEffect , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_effect :: AudioEffect , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Returns the [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 :: audio_effect_instance :: AudioEffectInstance , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect_instance ; let ret = crate :: icalls :: icallptr_obj_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , channel) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_effect_instance :: AudioEffectInstance , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bus_name . into ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , channel) ; ret as _ } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , channel) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Name of the current device for audio output (see [method get_device_list])."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the sample rate at the output of the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_server :: SpeakerMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , to_index) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , enabled) ; } } # [doc = "Overwrites the currently used [AudioBusLayout]."] # [doc = ""] # [inline] pub fn set_bus_layout (& self , bus_layout : impl AsArg < crate :: generated :: audio_bus_layout :: AudioBusLayout >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_layout ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , bus_idx , volume_db) ; } } # [doc = "Name of the current device for audio output (see [method get_device_list])."] # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , by_effect_idx) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioServer { } unsafe impl GodotObject for AudioServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioServer" } } impl std :: ops :: Deref for AudioServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "add_bus_effect\u{0}" . as_ptr () as * const c_char) ; table . capture_get_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_get_device\u{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\u{0}" . as_ptr () as * const c_char) ; table . capture_set_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_set_device\u{0}" . as_ptr () as * const c_char) ; table . generate_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "generate_bus_layout\u{0}" . as_ptr () as * const c_char) ; table . get_bus_channels = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_channels\u{0}" . as_ptr () as * const c_char) ; table . get_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_count\u{0}" . as_ptr () as * const c_char) ; table . get_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bus_index = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_index\u{0}" . as_ptr () as * const c_char) ; table . get_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_name\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_send\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\u{0}" . as_ptr () as * const c_char) ; table . get_device_list = (gd_api . godot_method_bind_get_method) (class_name , "get_device_list\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\u{0}" . as_ptr () as * const c_char) ; table . get_output_latency = (gd_api . godot_method_bind_get_method) (class_name , "get_output_latency\u{0}" . as_ptr () as * const c_char) ; table . get_speaker_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_speaker_mode\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_mute\u{0}" . as_ptr () as * const c_char) ; table . is_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_solo\u{0}" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\u{0}" . as_ptr () as * const c_char) ; table . move_bus = (gd_api . godot_method_bind_get_method) (class_name , "move_bus\u{0}" . as_ptr () as * const c_char) ; table . remove_bus = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus\u{0}" . as_ptr () as * const c_char) ; table . remove_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus_effect\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_layout\u{0}" . as_ptr () as * const c_char) ; table . set_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_mute\u{0}" . as_ptr () as * const c_char) ; table . set_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_name\u{0}" . as_ptr () as * const c_char) ; table . set_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_send\u{0}" . as_ptr () as * const c_char) ; table . set_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_solo\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\u{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\u{0}" . as_ptr () as * const c_char) ; table . swap_bus_effects = (gd_api . godot_method_bind_get_method) (class_name , "swap_bus_effects\u{0}" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_server::AudioServer;
            
            pub mod editor_inspector {
                use super::*;
                # [doc = "`tools class EditorInspector` inherits `ScrollContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInspector { } unsafe impl GodotObject for EditorInspector { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorInspector { type Target = crate :: generated :: scroll_container :: ScrollContainer ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_container :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInspector { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_container :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_container :: ScrollContainer > for EditorInspector { } unsafe impl SubClass < crate :: generated :: container :: Container > for EditorInspector { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorInspector { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorInspector { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorInspector { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_inspector::EditorInspector;
            
            pub mod camera_feed {
                use super::*;
                # [doc = "`core class CameraFeed` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraFeed { pub const FEED_BACK : i64 = 2i64 ; pub const FEED_FRONT : i64 = 1i64 ; pub const FEED_NOIMAGE : i64 = 0i64 ; pub const FEED_RGB : i64 = 1i64 ; pub const FEED_UNSPECIFIED : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_feed :: FeedPosition (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraFeed { } unsafe impl GodotObject for CameraFeed { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraFeed" } } impl std :: ops :: Deref for CameraFeed { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraFeed { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CameraFeed { } unsafe impl SubClass < crate :: generated :: object :: Object > for CameraFeed { } impl Instanciable for CameraFeed { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::camera_feed::CameraFeed;
            
            pub mod scroll_bar {
                use super::*;
                # [doc = "`core class ScrollBar` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl ScrollBar { # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , step) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScrollBar { } unsafe impl GodotObject for ScrollBar { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScrollBar { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for ScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScrollBar { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_step\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::scroll_bar::ScrollBar;
            
            pub mod center_container {
                use super::*;
                # [doc = "`core class CenterContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]'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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, centers children relative to the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CenterContainer { } unsafe impl GodotObject for CenterContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CenterContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CenterContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for CenterContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for CenterContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CenterContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for CenterContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for CenterContainer { } impl Instanciable for CenterContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::center_container::CenterContainer;
            
            pub mod shader_material {
                use super::*;
                # [doc = "`core class ShaderMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] program used to render this material."] # [doc = ""] # [inline] pub fn shader (& self) -> Option < Ref < crate :: generated :: shader :: Shader , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . get_shader ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shader :: Shader , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "The [Shader] program used to render this material."] # [doc = ""] # [inline] pub fn set_shader (& self , shader : impl AsArg < crate :: generated :: shader :: Shader >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . set_shader ; let ret = crate :: icalls :: icallptr_void_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. **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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ShaderMaterial" } } impl std :: ops :: Deref for ShaderMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ShaderMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for ShaderMaterial { } impl Instanciable for ShaderMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "get_shader_param\u{0}" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\u{0}" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\u{0}" . as_ptr () as * const c_char) ; table . set_shader = (gd_api . godot_method_bind_get_method) (class_name , "set_shader\u{0}" . as_ptr () as * const c_char) ; table . set_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::shader_material::ShaderMaterial;
            
            pub mod resource_saver {
                use super::*;
                # [doc = "`core singleton class ResourceSaver` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ResourceSaver { pub const FLAG_BUNDLE_RESOURCES : i64 = 2i64 ; pub const FLAG_CHANGE_PATH : i64 = 4i64 ; pub const FLAG_COMPRESS : i64 = 32i64 ; pub const FLAG_OMIT_EDITOR_PROPERTIES : i64 = 8i64 ; pub const FLAG_RELATIVE_PATHS : i64 = 1i64 ; pub const FLAG_REPLACE_SUBRESOURCE_PATHS : i64 = 64i64 ; pub const FLAG_SAVE_BIG_ENDIAN : i64 = 16i64 ; } 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\u{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 :: Resource >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . get_recognized_extensions ; let ret = crate :: icalls :: icallptr_strarr_obj (method_bind , self . this . sys () . as_ptr () , _type . as_arg_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.\nThe `flags` bitmask can be specified to customize the save behavior.\nReturns [constant 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 :: Resource > , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64_str_obj_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , resource . as_arg_ptr () , flags) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceSaver { } unsafe impl GodotObject for ResourceSaver { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourceSaver" } } impl std :: ops :: Deref for ResourceSaver { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::resource_saver::ResourceSaver;
            
            pub mod audio_stream_generator_playback {
                use super::*;
                # [doc = "`core class AudioStreamGeneratorPlayback` inherits `AudioStreamPlaybackResampled` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AudioStreamGeneratorPlayback { # [doc = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn push_buffer (& self , frames : Vector2Array) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_buffer ; let ret = crate :: icalls :: icallptr_bool_vec2arr (method_bind , self . this . sys () . as_ptr () , frames) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , frame) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGeneratorPlayback { } unsafe impl GodotObject for AudioStreamGeneratorPlayback { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGeneratorPlayback" } } impl std :: ops :: Deref for AudioStreamGeneratorPlayback { type Target = crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGeneratorPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: audio_stream_playback :: AudioStreamPlayback > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\u{0}" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\u{0}" . as_ptr () as * const c_char) ; table . get_skips = (gd_api . godot_method_bind_get_method) (class_name , "get_skips\u{0}" . as_ptr () as * const c_char) ; table . push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "push_buffer\u{0}" . as_ptr () as * const c_char) ; table . push_frame = (gd_api . godot_method_bind_get_method) (class_name , "push_frame\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_generator_playback::AudioStreamGeneratorPlayback;
            
            pub mod visual_shader_node_vec3_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeVec3Uniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVec3Uniform { } unsafe impl GodotObject for VisualShaderNodeVec3Uniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVec3Uniform" } } impl std :: ops :: Deref for VisualShaderNodeVec3Uniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVec3Uniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVec3Uniform { } impl Instanciable for VisualShaderNodeVec3Uniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVec3Uniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVec3UniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVec3UniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVec3UniformMethodTable = VisualShaderNodeVec3UniformMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vec3_uniform::VisualShaderNodeVec3Uniform;
            
            pub mod visual_shader_node_vector_interp {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorInterp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorInterp" } } impl std :: ops :: Deref for VisualShaderNodeVectorInterp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorInterp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorInterp { } impl Instanciable for VisualShaderNodeVectorInterp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_interp::VisualShaderNodeVectorInterp;
            
            pub mod particles_2d {
                use super::*;
                # [doc = "`core class Particles2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: particles_2d :: DrawOrder (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 = Particles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn process_material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_process_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Editor visibility helper."] # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 = Particles2DMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn set_process_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_process_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Editor visibility helper."] # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Particles2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Particles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Particles2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Particles2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Particles2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Particles2D { } impl Instanciable for Particles2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\u{0}" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\u{0}" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\u{0}" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\u{0}" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_process_material = (gd_api . godot_method_bind_get_method) (class_name , "get_process_material\u{0}" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_rect\u{0}" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\u{0}" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\u{0}" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\u{0}" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\u{0}" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\u{0}" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\u{0}" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\u{0}" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "set_process_material\u{0}" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_rect\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::particles_2d::Particles2D;
            
            pub mod char_fx_transform {
                use super::*;
                # [doc = "`core class CharFXTransform` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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). 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 character (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_character ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].\n**Note:** Time still passes while the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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], [int] or [float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [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]:\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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The index of the current character (starting from 0). 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The index of the current character (starting from 0). 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , character) ; } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].\n**Note:** Time still passes while the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [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], [int] or [float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [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]:\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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The index of the current character (starting from 0). 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visibility) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CharFXTransform { } unsafe impl GodotObject for CharFXTransform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CharFXTransform" } } impl std :: ops :: Deref for CharFXTransform { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CharFXTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CharFXTransform { } unsafe impl SubClass < crate :: generated :: object :: Object > for CharFXTransform { } impl Instanciable for CharFXTransform { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_character = (gd_api . godot_method_bind_get_method) (class_name , "get_character\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "get_elapsed_time\u{0}" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "get_relative_index\u{0}" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\u{0}" . as_ptr () as * const c_char) ; table . set_absolute_index = (gd_api . godot_method_bind_get_method) (class_name , "set_absolute_index\u{0}" . as_ptr () as * const c_char) ; table . set_character = (gd_api . godot_method_bind_get_method) (class_name , "set_character\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "set_elapsed_time\u{0}" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "set_relative_index\u{0}" . as_ptr () as * const c_char) ; table . set_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::char_fx_transform::CharFXTransform;
            
            pub mod input_event_screen_touch {
                use super::*;
                # [doc = "`core class InputEventScreenTouch` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenTouch { } unsafe impl GodotObject for InputEventScreenTouch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenTouch" } } impl std :: ops :: Deref for InputEventScreenTouch { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenTouch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventScreenTouch { } impl Instanciable for InputEventScreenTouch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_screen_touch::InputEventScreenTouch;
            
            pub mod editor_spatial_gizmo {
                use super::*;
                # [doc = "`tools class EditorSpatialGizmo` inherits `SpatialGizmo` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorSpatialGizmo { # [doc = "Adds the specified `segments` to the gizmo's collision shape for picking. Call this function during [method redraw]."] # [doc = ""] # [inline] pub fn add_collision_segments (& self , segments : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_segments ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]."] # [doc = ""] # [inline] pub fn add_collision_triangles (& self , triangles : impl AsArg < crate :: generated :: triangle_mesh :: TriangleMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_triangles ; let ret = crate :: icalls :: icallptr_void_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 [method redraw].\n# Default Arguments\n* `billboard` - `false`\n* `secondary` - `false`"] # [doc = ""] # [inline] pub fn add_handles (& self , handles : Vector3Array , material : impl AsArg < crate :: generated :: material :: Material > , billboard : bool , secondary : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_handles ; let ret = crate :: icalls :: icallptr_void_vec3arr_obj_bool_bool (method_bind , self . this . sys () . as_ptr () , handles , material . as_arg_ptr () , billboard , secondary) ; } } # [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 [method redraw].\n# Default Arguments\n* `billboard` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn add_lines (& self , lines : Vector3Array , material : impl AsArg < crate :: generated :: material :: Material > , billboard : bool , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_lines ; let ret = crate :: icalls :: icallptr_void_vec3arr_obj_bool_color (method_bind , self . this . sys () . as_ptr () , lines , material . as_arg_ptr () , billboard , 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 [method 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 :: array_mesh :: ArrayMesh > , billboard : bool , skeleton : impl AsArg < crate :: generated :: skin_reference :: SkinReference > , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_mesh ; let ret = crate :: icalls :: icallptr_void_obj_bool_obj_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , billboard , skeleton . as_arg_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Adds an unscaled billboard for visualization. Call this function during [method 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 :: 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 :: icallptr_void_obj_f64_color (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr () , default_scale , 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material]."] # [doc = ""] # [inline] pub fn get_plugin (& self) -> Option < Ref < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_plugin ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the Spatial node associated with this gizmo."] # [doc = ""] # [inline] pub fn get_spatial_node (& self) -> Option < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_spatial_node ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , hidden) ; } } # [doc = "Sets the reference [Spatial] node for the gizmo. `node` must inherit from [Spatial]."] # [doc = ""] # [inline] pub fn set_spatial_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . set_spatial_node ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmo" } } impl std :: ops :: Deref for EditorSpatialGizmo { type Target = crate :: generated :: spatial_gizmo :: SpatialGizmo ; # [inline] fn deref (& self) -> & crate :: generated :: spatial_gizmo :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial_gizmo :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial_gizmo :: SpatialGizmo > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_collision_triangles = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_triangles\u{0}" . as_ptr () as * const c_char) ; table . add_handles = (gd_api . godot_method_bind_get_method) (class_name , "add_handles\u{0}" . as_ptr () as * const c_char) ; table . add_lines = (gd_api . godot_method_bind_get_method) (class_name , "add_lines\u{0}" . as_ptr () as * const c_char) ; table . add_mesh = (gd_api . godot_method_bind_get_method) (class_name , "add_mesh\u{0}" . as_ptr () as * const c_char) ; table . add_unscaled_billboard = (gd_api . godot_method_bind_get_method) (class_name , "add_unscaled_billboard\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_plugin = (gd_api . godot_method_bind_get_method) (class_name , "get_plugin\u{0}" . as_ptr () as * const c_char) ; table . get_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "get_spatial_node\u{0}" . as_ptr () as * const c_char) ; table . set_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_hidden\u{0}" . as_ptr () as * const c_char) ; table . set_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "set_spatial_node\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_spatial_gizmo::EditorSpatialGizmo;
            
            pub mod arvr_positional_tracker {
                use super::*;
                # [doc = "`core class ARVRPositionalTracker` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ARVRPositionalTracker` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ARVRPositionalTracker>` 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\nARVRPositionalTracker 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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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\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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: arvr_positional_tracker :: TrackerHand (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_basis (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] and [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans_bool (method_bind , self . this . sys () . as_ptr () , adjust_by_reference_frame) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: arvr_server :: TrackerType (ret) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rumble) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRPositionalTracker { } unsafe impl GodotObject for ARVRPositionalTracker { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRPositionalTracker" } } impl std :: ops :: Deref for ARVRPositionalTracker { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRPositionalTracker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRPositionalTracker { } impl Instanciable for ARVRPositionalTracker { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_joy_id = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_id\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_orientation\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_rumble = (gd_api . godot_method_bind_get_method) (class_name , "get_rumble\u{0}" . as_ptr () as * const c_char) ; table . get_tracker_id = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_id\u{0}" . as_ptr () as * const c_char) ; table . get_tracks_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_orientation\u{0}" . as_ptr () as * const c_char) ; table . get_tracks_position = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_position\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . get_type = (gd_api . godot_method_bind_get_method) (class_name , "get_type\u{0}" . as_ptr () as * const c_char) ; table . set_rumble = (gd_api . godot_method_bind_get_method) (class_name , "set_rumble\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_positional_tracker::ARVRPositionalTracker;
            
            pub mod physics_body_2d {
                use super::*;
                # [doc = "`core class PhysicsBody2D` inherits `CollisionObject2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_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 = "The physics layers this area 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 [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the [member collision_layer]."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the [member collision_mask]."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = "The physics layers this area 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 [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = PhysicsBody2DMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Sets individual bits on the [member collision_layer] bitmask. 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 = PhysicsBody2DMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = PhysicsBody2DMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Sets individual bits on the [member collision_mask] bitmask. 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 = PhysicsBody2DMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsBody2D { } unsafe impl GodotObject for PhysicsBody2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PhysicsBody2D { type Target = crate :: generated :: collision_object_2d :: CollisionObject2D ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: object :: 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 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 remove_collision_exception_with : * 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 } 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 , 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 , remove_collision_exception_with : 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_body_2d::PhysicsBody2D;
            
            pub mod scene_tree {
                use super::*;
                # [doc = "`core class SceneTree` inherits `MainLoop` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneTree { pub const GROUP_CALL_DEFAULT : i64 = 0i64 ; pub const GROUP_CALL_REALTIME : i64 = 2i64 ; pub const GROUP_CALL_REVERSE : i64 = 1i64 ; pub const GROUP_CALL_UNIQUE : i64 = 4i64 ; pub const STRETCH_ASPECT_EXPAND : i64 = 4i64 ; pub const STRETCH_ASPECT_IGNORE : i64 = 0i64 ; pub const STRETCH_ASPECT_KEEP : i64 = 1i64 ; pub const STRETCH_ASPECT_KEEP_HEIGHT : i64 = 3i64 ; pub const STRETCH_ASPECT_KEEP_WIDTH : i64 = 2i64 ; pub const STRETCH_MODE_2D : i64 = 1i64 ; pub const STRETCH_MODE_DISABLED : i64 = 0i64 ; pub const STRETCH_MODE_VIEWPORT : i64 = 2i64 ; } 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 , thread_access :: 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."] # [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 = "Calls `method` on each member of the given group, respecting the given [enum GroupCallFlags]."] # [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 , group . into () , method . into () , varargs) ; ret } } # [doc = "Changes the running scene to the one at the given `path`, after loading it into a [PackedScene] and creating a new instance.\nReturns [constant OK] on success, [constant ERR_CANT_OPEN] if the `path` cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Changes the running scene to a new instance of the given [PackedScene].\nReturns [constant OK] on success or [constant ERR_CANT_CREATE] if the scene cannot be instantiated."] # [doc = ""] # [inline] pub fn change_scene_to (& self , packed_scene : impl AsArg < crate :: generated :: packed_scene :: PackedScene >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . change_scene_to ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , packed_scene . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If `pause_mode_process` is set to `false`, pausing the [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```\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 :: scene_tree_timer :: SceneTreeTimer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . create_timer ; let ret = crate :: icalls :: icallptr_obj_f64_bool (method_bind , self . this . sys () . as_ptr () , time_sec , pause_mode_process) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: scene_tree_timer :: SceneTreeTimer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The current scene."] # [doc = ""] # [inline] pub fn current_scene (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_current_scene ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The root of the edited scene."] # [doc = ""] # [inline] pub fn edited_scene_root (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_edited_scene_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The default [MultiplayerAPI] instance for this [SceneTree]."] # [doc = ""] # [inline] pub fn multiplayer (& self) -> Option < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_multiplayer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method 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]'s signals."] # [doc = ""] # [inline] pub fn network_peer (& self) -> Option < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the unique peer ID of this [SceneTree]'s [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of nodes in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 = "The [SceneTree]'s root [Viewport]."] # [doc = ""] # [inline] pub fn root (& self) -> Option < Ref < crate :: generated :: viewport :: Viewport , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: viewport :: Viewport , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if there is a [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision shapes will be visible when running the game from the editor for debugging purposes."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the most recent [InputEvent] was marked as handled with [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true` (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame].\nIf `false`, you need to manually call [method 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] protection when accessing the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this [SceneTree]'s [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [SceneTree] is paused. Doing so will have the following behavior:\n- 2D and 3D physics will be stopped.\n- [method Node._process], [method Node._physics_process] and [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [SceneTree]'s [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, font oversampling is used."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , group . into () , notification) ; } } # [doc = "Sends the given notification to all members of the `group`, respecting the given [enum 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 :: icallptr_void_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , call_flags , group . into () , notification) ; } } # [doc = "Queues the given object for deletion, delaying the call to [method Object.free] to after the current frame."] # [doc = ""] # [inline] pub fn queue_delete (& self , obj : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . queue_delete ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , obj . as_arg_ptr ()) ; } } # [doc = "Quits the application. A process `exit_code` can optionally be passed as an argument. If this argument is `0` or greater, it will override the [member OS.exit_code] defined before quitting the application.\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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , exit_code) ; } } # [doc = "Reloads the currently active scene.\nReturns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "If `true`, the application automatically accepts quitting. Enabled by default.\nFor mobile platforms, see [method set_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The current scene."] # [doc = ""] # [inline] pub fn set_current_scene (& self , child_node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_current_scene ; let ret = crate :: icalls :: icallptr_void_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."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The root of the edited scene."] # [doc = ""] # [inline] pub fn set_edited_scene_root (& self , scene : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_edited_scene_root ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 [enum 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 :: icallptr_void_i64_str_str_var (method_bind , self . this . sys () . as_ptr () , call_flags , group . into () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Marks the most recent [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The default [MultiplayerAPI] instance for this [SceneTree]."] # [doc = ""] # [inline] pub fn set_multiplayer (& self , multiplayer : impl AsArg < crate :: generated :: multiplayer_api :: MultiplayerAPI >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_multiplayer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , multiplayer . as_arg_ptr ()) ; } } # [doc = "If `true` (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame].\nIf `false`, you need to manually call [method 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] protection when accessing the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method 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]'s signals."] # [doc = ""] # [inline] pub fn set_network_peer (& self , peer : impl AsArg < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the [SceneTree] is paused. Doing so will have the following behavior:\n- 2D and 3D physics will be stopped.\n- [method Node._process], [method Node._physics_process] and [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the application quits automatically on going back (e.g. on Android). Enabled by default.\nTo handle 'Go Back' button when this option is disabled, use [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the [SceneTree]'s [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , refuse) ; } } # [doc = "Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and `shrink` ratio.\n# Default Arguments\n* `shrink` - `1`"] # [doc = ""] # [inline] pub fn set_screen_stretch (& self , mode : i64 , aspect : i64 , minsize : Vector2 , shrink : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_screen_stretch ; let ret = crate :: icalls :: icallptr_void_i64_i64_vec2_f64 (method_bind , self . this . sys () . as_ptr () , mode , aspect , minsize , shrink) ; } } # [doc = "If `true`, font oversampling is used."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTree { } unsafe impl GodotObject for SceneTree { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SceneTree" } } impl std :: ops :: Deref for SceneTree { type Target = crate :: generated :: main_loop :: MainLoop ; # [inline] fn deref (& self) -> & crate :: generated :: main_loop :: MainLoop { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: main_loop :: MainLoop { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: main_loop :: MainLoop > for SceneTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for SceneTree { } impl Instanciable for SceneTree { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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_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_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_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 , 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . call_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "call_group_flags\u{0}" . as_ptr () as * const c_char) ; table . change_scene = (gd_api . godot_method_bind_get_method) (class_name , "change_scene\u{0}" . as_ptr () as * const c_char) ; table . change_scene_to = (gd_api . godot_method_bind_get_method) (class_name , "change_scene_to\u{0}" . as_ptr () as * const c_char) ; table . create_timer = (gd_api . godot_method_bind_get_method) (class_name , "create_timer\u{0}" . as_ptr () as * const c_char) ; table . get_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_current_scene\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\u{0}" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_group = (gd_api . godot_method_bind_get_method) (class_name , "has_group\u{0}" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\u{0}" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . notify_group = (gd_api . godot_method_bind_get_method) (class_name , "notify_group\u{0}" . as_ptr () as * const c_char) ; table . notify_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "notify_group_flags\u{0}" . as_ptr () as * const c_char) ; table . queue_delete = (gd_api . godot_method_bind_get_method) (class_name , "queue_delete\u{0}" . as_ptr () as * const c_char) ; table . quit = (gd_api . godot_method_bind_get_method) (class_name , "quit\u{0}" . as_ptr () as * const c_char) ; table . reload_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "reload_current_scene\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_current_scene\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_group = (gd_api . godot_method_bind_get_method) (class_name , "set_group\u{0}" . as_ptr () as * const c_char) ; table . set_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_group_flags\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_multiplayer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\u{0}" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_screen_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_stretch\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::scene_tree::SceneTree;
            
            pub mod animation {
                use super::*;
                # [doc = "`core class Animation` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Animation { pub const INTERPOLATION_CUBIC : i64 = 2i64 ; pub const INTERPOLATION_LINEAR : i64 = 1i64 ; pub const INTERPOLATION_NEAREST : i64 = 0i64 ; pub const TYPE_ANIMATION : i64 = 5i64 ; pub const TYPE_AUDIO : i64 = 4i64 ; pub const TYPE_BEZIER : i64 = 3i64 ; pub const TYPE_METHOD : i64 = 2i64 ; pub const TYPE_TRANSFORM : i64 = 1i64 ; pub const TYPE_VALUE : i64 = 0i64 ; pub const UPDATE_CAPTURE : i64 = 3i64 ; pub const UPDATE_CONTINUOUS : i64 = 0i64 ; pub const UPDATE_DISCRETE : i64 = 1i64 ; pub const UPDATE_TRIGGER : i64 = 2i64 ; } 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 , thread_access :: 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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , at_position) ; ret as _ } } # [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 :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64_f64_str (method_bind , self . this . sys () . as_ptr () , track_idx , time , animation . into ()) ; ret as _ } } # [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 :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , 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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [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 :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_stream ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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] 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 :: 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 :: icallptr_i64_i64_f64_obj_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time , stream . as_arg_ptr () , start_offset , end_offset) ; ret as _ } } # [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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , offset) ; } } # [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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , offset) ; } } # [doc = "Sets the stream 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_stream (& self , track_idx : i64 , key_idx : i64 , stream : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_stream ; let ret = crate :: icalls :: icallptr_void_i64_i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , 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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [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 :: icallptr_i64_i64_f64_f64_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , time , value , in_handle , out_handle) ; ret as _ } } # [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 :: icallptr_f64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time) ; ret as _ } } # [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 :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , 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 :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , 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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , value) ; } } # [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 :: icallptr_void (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 :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . copy_track ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx , 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 :: icallptr_i64_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret 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 length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "A flag indicating that the animation must loop. This is uses 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_key_indices ; let ret = crate :: icalls :: icallptr_i32arr_i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec , delta) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; GodotString :: from_sys (ret) } } # [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 , key_idx) ; < 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_sec) ; } } # [doc = "A flag indicating that the animation must loop. This is uses 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size_sec) ; } } # [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 :: icallptr_i64_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , time , exact) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: InterpolationType (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [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 :: icallptr_var_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; Variant :: from_sys (ret) } } # [doc = "Gets the path of a track. For more information on the path format, see [method 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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: TrackType (ret) } } # [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 :: icallptr_void_i64_f64_var_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time , key . owned_to_variant () , transition) ; } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , to_idx) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , position) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , enabled) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , imported) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , interpolation) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , interpolation) ; } } # [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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , time) ; } } # [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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , transition) ; } } # [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 :: icallptr_void_i64_i64_var (method_bind , self . this . sys () . as_ptr () , track_idx , key , 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 :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , track_idx , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , with_idx) ; } } # [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 :: icallptr_i64_i64_f64_vec3_quat_vec3 (method_bind , self . this . sys () . as_ptr () , track_idx , time , location , rotation , scale) ; ret as _ } } # [doc = "Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([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 , time_sec) ; < 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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_get_key_indices ; let ret = crate :: icalls :: icallptr_i32arr_i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec , delta) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: UpdateMode (ret) } } # [doc = ""] # [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 :: icallptr_var_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec) ; Variant :: from_sys (ret) } } # [doc = "Sets the update mode (see [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Animation { } unsafe impl GodotObject for Animation { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Animation" } } impl std :: ops :: Deref for Animation { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Animation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Animation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Animation { } unsafe impl SubClass < crate :: generated :: object :: Object > for Animation { } impl Instanciable for Animation { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . bezier_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_interpolate\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . copy_track = (gd_api . godot_method_bind_get_method) (class_name , "copy_track\u{0}" . as_ptr () as * const c_char) ; table . find_track = (gd_api . godot_method_bind_get_method) (class_name , "find_track\u{0}" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\u{0}" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\u{0}" . as_ptr () as * const c_char) ; table . get_track_count = (gd_api . godot_method_bind_get_method) (class_name , "get_track_count\u{0}" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_track = (gd_api . godot_method_bind_get_method) (class_name , "remove_track\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{0}" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\u{0}" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\u{0}" . as_ptr () as * const c_char) ; table . track_find_key = (gd_api . godot_method_bind_get_method) (class_name , "track_find_key\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . track_get_path = (gd_api . godot_method_bind_get_method) (class_name , "track_get_path\u{0}" . as_ptr () as * const c_char) ; table . track_get_type = (gd_api . godot_method_bind_get_method) (class_name , "track_get_type\u{0}" . as_ptr () as * const c_char) ; table . track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "track_insert_key\u{0}" . as_ptr () as * const c_char) ; table . track_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_is_enabled\u{0}" . as_ptr () as * const c_char) ; table . track_is_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_is_imported\u{0}" . as_ptr () as * const c_char) ; table . track_move_down = (gd_api . godot_method_bind_get_method) (class_name , "track_move_down\u{0}" . as_ptr () as * const c_char) ; table . track_move_to = (gd_api . godot_method_bind_get_method) (class_name , "track_move_to\u{0}" . as_ptr () as * const c_char) ; table . track_move_up = (gd_api . godot_method_bind_get_method) (class_name , "track_move_up\u{0}" . as_ptr () as * const c_char) ; table . track_remove_key = (gd_api . godot_method_bind_get_method) (class_name , "track_remove_key\u{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\u{0}" . as_ptr () as * const c_char) ; table . track_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_set_enabled\u{0}" . as_ptr () as * const c_char) ; table . track_set_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_set_imported\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . track_set_path = (gd_api . godot_method_bind_get_method) (class_name , "track_set_path\u{0}" . as_ptr () as * const c_char) ; table . track_swap = (gd_api . godot_method_bind_get_method) (class_name , "track_swap\u{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\u{0}" . as_ptr () as * const c_char) ; table . transform_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "transform_track_interpolate\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . value_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "value_track_interpolate\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation::Animation;
            
            pub mod editor_script {
                use super::*;
                # [doc = "`tools class EditorScript` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . add_root_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Returns the [EditorInterface] singleton instance."] # [doc = ""] # [inline] pub fn get_editor_interface (& self) -> Option < Ref < crate :: generated :: editor_interface :: EditorInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . get_editor_interface ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_interface :: EditorInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the Editor's currently active scene."] # [doc = ""] # [inline] pub fn get_scene (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . get_scene ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorScript { } unsafe impl GodotObject for EditorScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorScript" } } impl std :: ops :: Deref for EditorScript { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorScript { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_editor_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_interface\u{0}" . as_ptr () as * const c_char) ; table . get_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_scene\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_script::EditorScript;
            
            pub mod texture_layered {
                use super::*;
                # [doc = "`core class TextureLayered` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 : Flags = Flags (4i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; } 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureLayered { pub const FLAGS_DEFAULT : i64 = 4i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; } impl TextureLayered { # [doc = "Creates the [Texture3D] or [TextureArray] with specified `width`, `height`, and `depth`. See [enum Image.Format] for `format` options. See [enum 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 = TextureLayeredMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , depth , format , flags) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies which [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an [Image] resource with the data from specified `layer`."] # [doc = ""] # [inline] pub fn get_layer_data (& self , layer : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_layer_data ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] 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 :: 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 :: icallptr_void_obj_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , x_offset , y_offset , layer , mipmap) ; } } # [doc = "Specifies which [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [doc = "Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource."] # [doc = ""] # [inline] pub fn set_layer_data (& self , image : impl AsArg < crate :: generated :: image :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_layer_data ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , layer) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureLayered { } unsafe impl GodotObject for TextureLayered { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextureLayered" } } impl std :: ops :: Deref for TextureLayered { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureLayered { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TextureLayered { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TextureLayered { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureLayered { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureLayeredMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind , 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 , create : 0 as * mut sys :: godot_method_bind , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\u{0}" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\u{0}" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_data\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . set_data_partial = (gd_api . godot_method_bind_get_method) (class_name , "set_data_partial\u{0}" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\u{0}" . as_ptr () as * const c_char) ; table . set_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_data\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::texture_layered::TextureLayered;
            
            pub mod navigation_polygon {
                use super::*;
                # [doc = "`core class NavigationPolygon` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method 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 : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_outline ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , outline) ; } } # [doc = "Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method 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 : Vector2Array , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_outline_at_index ; let ret = crate :: icalls :: icallptr_void_vec2arr_i64 (method_bind , self . this . sys () . as_ptr () , outline , index) ; } } # [doc = "Adds a polygon using the indices of the vertices you get when calling [method get_vertices]."] # [doc = ""] # [inline] pub fn add_polygon (& self , polygon : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_polygon ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script."] # [doc = ""] # [inline] pub fn get_outline (& self , idx : i64) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_outline ; let ret = crate :: icalls :: icallptr_vec2arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [PoolIntArray] containing the indices of the vertices of a created polygon."] # [doc = ""] # [inline] pub fn get_polygon (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [PoolVector2Array] containing all the vertices being used to create the polygons."] # [doc = ""] # [inline] pub fn vertices (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_vertices ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes an outline created in the editor or by script. You have to call [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update."] # [doc = ""] # [inline] pub fn set_outline (& self , idx : i64 , outline : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . set_outline ; let ret = crate :: icalls :: icallptr_void_i64_vec2arr (method_bind , self . this . sys () . as_ptr () , idx , outline) ; } } # [doc = "Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method."] # [doc = ""] # [inline] pub fn set_vertices (& self , vertices : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . set_vertices ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , vertices) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationPolygon { } unsafe impl GodotObject for NavigationPolygon { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NavigationPolygon" } } impl std :: ops :: Deref for NavigationPolygon { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NavigationPolygon { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NavigationPolygon { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationPolygon { } impl Instanciable for NavigationPolygon { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "add_polygon\u{0}" . as_ptr () as * const c_char) ; table . clear_outlines = (gd_api . godot_method_bind_get_method) (class_name , "clear_outlines\u{0}" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\u{0}" . as_ptr () as * const c_char) ; table . get_outline = (gd_api . godot_method_bind_get_method) (class_name , "get_outline\u{0}" . as_ptr () as * const c_char) ; table . get_outline_count = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_count\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\u{0}" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_outline = (gd_api . godot_method_bind_get_method) (class_name , "remove_outline\u{0}" . as_ptr () as * const c_char) ; table . set_outline = (gd_api . godot_method_bind_get_method) (class_name , "set_outline\u{0}" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation_polygon::NavigationPolygon;
            
            pub mod csg_polygon {
                use super::*;
                # [doc = "`core class CSGPolygon` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CSGPolygon { pub const MODE_DEPTH : i64 = 0i64 ; pub const MODE_PATH : i64 = 2i64 ; pub const MODE_SPIN : i64 = 1i64 ; pub const PATH_ROTATION_PATH : i64 = 1i64 ; pub const PATH_ROTATION_PATH_FOLLOW : i64 = 2i64 ; pub const PATH_ROTATION_POLYGON : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: csg_polygon :: Mode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: csg_polygon :: PathRotation (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_interval (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_interval ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_rotation (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_rotation ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , spin_sides) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPolygon { } unsafe impl GodotObject for CSGPolygon { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGPolygon { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGPolygon { } impl Instanciable for CSGPolygon { # [inline] fn construct () -> Ref < Self , thread_access :: 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_node : * mut sys :: godot_method_bind , pub get_path_rotation : * 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_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_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_node : 0 as * mut sys :: godot_method_bind , get_path_rotation : 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{0}" . as_ptr () as * const c_char) ; table . get_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_path_interval\u{0}" . as_ptr () as * const c_char) ; table . get_path_node = (gd_api . godot_method_bind_get_method) (class_name , "get_path_node\u{0}" . as_ptr () as * const c_char) ; table . get_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_path_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\u{0}" . as_ptr () as * const c_char) ; table . get_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_degrees\u{0}" . as_ptr () as * const c_char) ; table . get_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_sides\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "is_path_joined\u{0}" . as_ptr () as * const c_char) ; table . is_path_local = (gd_api . godot_method_bind_get_method) (class_name , "is_path_local\u{0}" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_path_interval\u{0}" . as_ptr () as * const c_char) ; table . set_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "set_path_joined\u{0}" . as_ptr () as * const c_char) ; table . set_path_local = (gd_api . godot_method_bind_get_method) (class_name , "set_path_local\u{0}" . as_ptr () as * const c_char) ; table . set_path_node = (gd_api . godot_method_bind_get_method) (class_name , "set_path_node\u{0}" . as_ptr () as * const c_char) ; table . set_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_path_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\u{0}" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\u{0}" . as_ptr () as * const c_char) ; table . set_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_sides\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_polygon::CSGPolygon;
            
            pub mod visual_script_yield_signal {
                use super::*;
                # [doc = "`core class VisualScriptYieldSignal` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptYieldSignal { pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_yield_signal :: CallMode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptYieldSignal" } } impl std :: ops :: Deref for VisualScriptYieldSignal { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptYieldSignal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptYieldSignal { } impl Instanciable for VisualScriptYieldSignal { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\u{0}" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\u{0}" . as_ptr () as * const c_char) ; table . get_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_signal\u{0}" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\u{0}" . as_ptr () as * const c_char) ; table . set_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_signal\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_yield_signal::VisualScriptYieldSignal;
            
            pub mod audio_effect_filter {
                use super::*;
                # [doc = "`core class AudioEffectFilter` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectFilter { pub const FILTER_12DB : i64 = 1i64 ; pub const FILTER_18DB : i64 = 2i64 ; pub const FILTER_24DB : i64 = 3i64 ; pub const FILTER_6DB : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_filter :: FilterDb (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , freq) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectFilter { } unsafe impl GodotObject for AudioEffectFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectFilter" } } impl std :: ops :: Deref for AudioEffectFilter { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectFilter { } impl Instanciable for AudioEffectFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_db = (gd_api . godot_method_bind_get_method) (class_name , "get_db\u{0}" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\u{0}" . as_ptr () as * const c_char) ; table . get_resonance = (gd_api . godot_method_bind_get_method) (class_name , "get_resonance\u{0}" . as_ptr () as * const c_char) ; table . set_cutoff = (gd_api . godot_method_bind_get_method) (class_name , "set_cutoff\u{0}" . as_ptr () as * const c_char) ; table . set_db = (gd_api . godot_method_bind_get_method) (class_name , "set_db\u{0}" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\u{0}" . as_ptr () as * const c_char) ; table . set_resonance = (gd_api . godot_method_bind_get_method) (class_name , "set_resonance\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_filter::AudioEffectFilter;
            
            pub mod audio_stream_playback_resampled {
                use super::*;
                # [doc = "`core class AudioStreamPlaybackResampled` inherits `AudioStreamPlayback` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AudioStreamPlaybackResampled { } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlaybackResampled { } unsafe impl GodotObject for AudioStreamPlaybackResampled { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlaybackResampled" } } impl std :: ops :: Deref for AudioStreamPlaybackResampled { type Target = crate :: generated :: audio_stream_playback :: AudioStreamPlayback ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream_playback :: AudioStreamPlayback { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlaybackResampled { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream_playback :: AudioStreamPlayback { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream_playback :: AudioStreamPlayback > for AudioStreamPlaybackResampled { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamPlaybackResampled { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlaybackResampled { }
            }
            pub use crate::generated::audio_stream_playback_resampled::AudioStreamPlaybackResampled;
            
            pub mod animation_node_blend_space_2d {
                use super::*;
                # [doc = "`core class AnimationNodeBlendSpace2D` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendSpace2D { pub const BLEND_MODE_DISCRETE : i64 = 1i64 ; pub const BLEND_MODE_DISCRETE_CARRY : i64 = 2i64 ; pub const BLEND_MODE_INTERPOLATED : i64 = 0i64 ; } 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 , thread_access :: 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 :: animation_root_node :: 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 :: icallptr_void_obj_vec2_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos , at_index) ; } } # [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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z , at_index) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the interpolation between animations. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_node_blend_space_2d :: BlendMode (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AnimationRootNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The blend space's X and Y axes' lower limit for the points' position. See [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , triangle , point) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , triangle) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Controls the interpolation between animations. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Changes the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , point , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , point , pos) ; } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [method 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 :: icallptr_void_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 [method 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace2D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace2D { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendSpace2D { } impl Instanciable for AnimationNodeBlendSpace2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_triangle = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle\u{0}" . as_ptr () as * const c_char) ; table . get_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "get_auto_triangles\u{0}" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\u{0}" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\u{0}" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\u{0}" . as_ptr () as * const c_char) ; table . get_triangle_count = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_count\u{0}" . as_ptr () as * const c_char) ; table . get_triangle_point = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_point\u{0}" . as_ptr () as * const c_char) ; table . get_x_label = (gd_api . godot_method_bind_get_method) (class_name , "get_x_label\u{0}" . as_ptr () as * const c_char) ; table . get_y_label = (gd_api . godot_method_bind_get_method) (class_name , "get_y_label\u{0}" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\u{0}" . as_ptr () as * const c_char) ; table . remove_triangle = (gd_api . godot_method_bind_get_method) (class_name , "remove_triangle\u{0}" . as_ptr () as * const c_char) ; table . set_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_triangles\u{0}" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\u{0}" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\u{0}" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\u{0}" . as_ptr () as * const c_char) ; table . set_x_label = (gd_api . godot_method_bind_get_method) (class_name , "set_x_label\u{0}" . as_ptr () as * const c_char) ; table . set_y_label = (gd_api . godot_method_bind_get_method) (class_name , "set_y_label\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_blend_space_2d::AnimationNodeBlendSpace2D;
            
            pub mod navigation_polygon_instance {
                use super::*;
                # [doc = "`core class NavigationPolygonInstance` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [doc = ""] # [inline] pub fn navigation_polygon (& self) -> Option < Ref < crate :: generated :: navigation_polygon :: NavigationPolygon , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_navigation_polygon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_polygon :: NavigationPolygon , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_navigation_polygon (& self , navpoly : impl AsArg < crate :: generated :: navigation_polygon :: NavigationPolygon >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_navigation_polygon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , navpoly . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationPolygonInstance { } unsafe impl GodotObject for NavigationPolygonInstance { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NavigationPolygonInstance { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationPolygonInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationPolygonInstance { } impl Instanciable for NavigationPolygonInstance { # [inline] fn construct () -> Ref < Self , thread_access :: 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_navigation_polygon : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_navigation_polygon : * mut sys :: godot_method_bind } impl NavigationPolygonInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationPolygonInstanceMethodTable = NavigationPolygonInstanceMethodTable { class_constructor : None , get_navigation_polygon : 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_navigation_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_polygon\u{0}" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation_polygon_instance::NavigationPolygonInstance;
            
            pub mod button_group {
                use super::*;
                # [doc = "`core class ButtonGroup` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] of [Button]s who have this as their [ButtonGroup] (see [member 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 :: base_button :: BaseButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonGroupMethodTable :: get (get_api ()) . get_pressed_button ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: base_button :: BaseButton , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for ButtonGroup { } unsafe impl GodotObject for ButtonGroup { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ButtonGroup" } } impl std :: ops :: Deref for ButtonGroup { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ButtonGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: object :: Object > for ButtonGroup { } impl Instanciable for ButtonGroup { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_pressed_button = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_button\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::button_group::ButtonGroup;
            
            pub mod box_container {
                use super::*;
                # [doc = "`core class BoxContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , begin) ; } } # [doc = "The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: box_container :: AlignMode (ret) } } # [doc = "The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxContainer { } unsafe impl GodotObject for BoxContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BoxContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for BoxContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for BoxContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for BoxContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for BoxContainer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_alignment = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment\u{0}" . as_ptr () as * const c_char) ; table . set_alignment = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::box_container::BoxContainer;
            
            pub mod animation_player {
                use super::*;
                # [doc = "`core class AnimationPlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationPlayer { pub const ANIMATION_METHOD_CALL_DEFERRED : i64 = 0i64 ; pub const ANIMATION_METHOD_CALL_IMMEDIATE : i64 = 1i64 ; pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_MANUAL : i64 = 2i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 :: Animation >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . add_animation ; let ret = crate :: icalls :: icallptr_i64_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , animation . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; } } # [doc = "[AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method 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 :: icallptr_void (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 :: icallptr_void (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 :: Animation >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . find_animation ; let ret = crate :: icalls :: icallptr_str_obj (method_bind , self . this . sys () . as_ptr () , animation . as_arg_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [Animation] with key `name` or `null` if not found."] # [doc = ""] # [inline] pub fn get_animation (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the list of stored animation names."] # [doc = ""] # [inline] pub fn get_animation_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_player :: AnimationProcessMode (ret) } } # [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 [member 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; ret 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 [method 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]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_player :: AnimationMethodCallMode (ret) } } # [doc = "Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by `custom_speed` argument specified when calling the [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of the animation names that are currently queued to play."] # [doc = ""] # [inline] pub fn get_queue (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_queue ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [AnimationPlayer] stores an [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method play_backwards]).\nThe [AnimationPlayer] keeps track of its current or last played animation with [member 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 [method 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] 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 :: icallptr_void_str_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend , custom_speed , from_end) ; } } # [doc = "Plays the animation with key `name` in reverse.\nThis method is a shorthand for [method 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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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# 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 :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , seconds , update) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 [member 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str_str_f64 (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into () , sec) ; } } # [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 [method 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]."] # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , sec) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [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 [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , reset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationPlayer { } unsafe impl GodotObject for AnimationPlayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimationPlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimationPlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationPlayer { } impl Instanciable for AnimationPlayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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 , 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\u{0}" . as_ptr () as * const c_char) ; table . animation_get_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_get_next\u{0}" . as_ptr () as * const c_char) ; table . animation_set_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_set_next\u{0}" . as_ptr () as * const c_char) ; table . clear_caches = (gd_api . godot_method_bind_get_method) (class_name , "clear_caches\u{0}" . as_ptr () as * const c_char) ; table . clear_queue = (gd_api . godot_method_bind_get_method) (class_name , "clear_queue\u{0}" . as_ptr () as * const c_char) ; table . find_animation = (gd_api . godot_method_bind_get_method) (class_name , "find_animation\u{0}" . as_ptr () as * const c_char) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\u{0}" . as_ptr () as * const c_char) ; table . get_animation_list = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_list\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_assigned_animation\u{0}" . as_ptr () as * const c_char) ; table . get_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "get_autoplay\u{0}" . as_ptr () as * const c_char) ; table . get_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_time\u{0}" . as_ptr () as * const c_char) ; table . get_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_playing_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_speed\u{0}" . as_ptr () as * const c_char) ; table . get_queue = (gd_api . godot_method_bind_get_method) (class_name , "get_queue\u{0}" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . play_backwards = (gd_api . godot_method_bind_get_method) (class_name , "play_backwards\u{0}" . as_ptr () as * const c_char) ; table . queue = (gd_api . godot_method_bind_get_method) (class_name , "queue\u{0}" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\u{0}" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_assigned_animation\u{0}" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\u{0}" . as_ptr () as * const c_char) ; table . set_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_time\u{0}" . as_ptr () as * const c_char) ; table . set_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_current_animation\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_root = (gd_api . godot_method_bind_get_method) (class_name , "set_root\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_player::AnimationPlayer;
            
            pub mod control {
                use super::*;
                # [doc = "`core class Control` inherits `CanvasItem` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Control { pub const ANCHOR_BEGIN : i64 = 0i64 ; pub const ANCHOR_END : i64 = 1i64 ; pub const CURSOR_ARROW : i64 = 0i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const CURSOR_HELP : i64 = 16i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const FOCUS_ALL : i64 = 2i64 ; pub const FOCUS_CLICK : i64 = 1i64 ; pub const FOCUS_NONE : i64 = 0i64 ; pub const GROW_DIRECTION_BEGIN : i64 = 0i64 ; pub const GROW_DIRECTION_BOTH : i64 = 2i64 ; pub const GROW_DIRECTION_END : i64 = 1i64 ; pub const MOUSE_FILTER_IGNORE : i64 = 2i64 ; pub const MOUSE_FILTER_PASS : i64 = 1i64 ; pub const MOUSE_FILTER_STOP : i64 = 0i64 ; pub const NOTIFICATION_FOCUS_ENTER : i64 = 43i64 ; pub const NOTIFICATION_FOCUS_EXIT : i64 = 44i64 ; pub const NOTIFICATION_MODAL_CLOSE : i64 = 46i64 ; pub const NOTIFICATION_MOUSE_ENTER : i64 = 41i64 ; pub const NOTIFICATION_MOUSE_EXIT : i64 = 42i64 ; pub const NOTIFICATION_RESIZED : i64 = 40i64 ; pub const NOTIFICATION_SCROLL_BEGIN : i64 = 47i64 ; pub const NOTIFICATION_SCROLL_END : i64 = 48i64 ; pub const NOTIFICATION_THEME_CHANGED : i64 = 45i64 ; pub const PRESET_BOTTOM_LEFT : i64 = 2i64 ; pub const PRESET_BOTTOM_RIGHT : i64 = 3i64 ; pub const PRESET_BOTTOM_WIDE : i64 = 12i64 ; pub const PRESET_CENTER : i64 = 8i64 ; pub const PRESET_CENTER_BOTTOM : i64 = 7i64 ; pub const PRESET_CENTER_LEFT : i64 = 4i64 ; pub const PRESET_CENTER_RIGHT : i64 = 6i64 ; pub const PRESET_CENTER_TOP : i64 = 5i64 ; pub const PRESET_HCENTER_WIDE : i64 = 14i64 ; pub const PRESET_LEFT_WIDE : i64 = 9i64 ; pub const PRESET_MODE_KEEP_HEIGHT : i64 = 2i64 ; pub const PRESET_MODE_KEEP_SIZE : i64 = 3i64 ; pub const PRESET_MODE_KEEP_WIDTH : i64 = 1i64 ; pub const PRESET_MODE_MINSIZE : i64 = 0i64 ; pub const PRESET_RIGHT_WIDE : i64 = 11i64 ; pub const PRESET_TOP_LEFT : i64 = 0i64 ; pub const PRESET_TOP_RIGHT : i64 = 1i64 ; pub const PRESET_TOP_WIDE : i64 = 10i64 ; pub const PRESET_VCENTER_WIDE : i64 = 13i64 ; pub const PRESET_WIDE : i64 = 15i64 ; pub const SIZE_EXPAND : i64 = 2i64 ; pub const SIZE_EXPAND_FILL : i64 = 3i64 ; pub const SIZE_FILL : i64 = 1i64 ; pub const SIZE_SHRINK_CENTER : i64 = 4i64 ; pub const SIZE_SHRINK_END : i64 = 8i64 ; } 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 , thread_access :: 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 [method Node._unhandled_input] or [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nOverrides the [Color] with given `name` in the [member theme] resource the control uses.\n**Note:** Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color.\n**Example of overriding a label's color and resetting it later:**\n```gdscript\n# Override the child node \"MyLabel\"'s font color to orange.\n$MyLabel.add_color_override(\"font_color\", Color(1, 0.5, 0))\n\n# Reset the color by creating a new node to get the default value:\nvar default_label_color = Label.new().get_color(\"font_color\")\n$MyLabel.add_color_override(\"font_color\", default_label_color)\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 :: icallptr_void_str_color (method_bind , self . this . sys () . as_ptr () , name . into () , color) ; } } # [doc = "Overrides an integer constant with given `name` in the [member theme] resource the control uses. If the `constant` is `0`, the override is cleared and the constant from assigned [Theme] is used."] # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , constant) ; } } # [doc = "Overrides the font with given `name` in the [member theme] resource the control uses. If `font` is `null` or invalid, the override is cleared and the font from assigned [Theme] is used."] # [doc = ""] # [inline] pub fn add_font_override (& self , name : impl Into < GodotString > , font : impl AsArg < crate :: generated :: font :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_font_override ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , font . as_arg_ptr ()) ; } } # [doc = "Overrides the icon with given `name` in the [member theme] resource the control uses. If `icon` is `null` or invalid, the override is cleared and the icon from assigned [Theme] is used."] # [doc = ""] # [inline] pub fn add_icon_override (& self , name : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_icon_override ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , texture . as_arg_ptr ()) ; } } # [doc = "Overrides the [Shader] with given `name` in the [member theme] resource the control uses. If `shader` is `null` or invalid, the override is cleared and the shader from assigned [Theme] is used."] # [doc = ""] # [inline] pub fn add_shader_override (& self , name : impl Into < GodotString > , shader : impl AsArg < crate :: generated :: shader :: Shader >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_shader_override ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , shader . as_arg_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nOverrides the [StyleBox] with given `name` in the [member theme] resource the control uses. If `stylebox` is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used.\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\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 :: style_box :: StyleBox >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_stylebox_override ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , stylebox . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn find_next_valid_focus (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . find_next_valid_focus ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn find_prev_valid_focus (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . find_prev_valid_focus ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Forces drag and bypasses [method get_drag_data] and [method 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 [method can_drop_data] and [method 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 :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . force_drag ; let ret = crate :: icalls :: icallptr_void_var_obj (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant () , preview . as_arg_ptr ()) ; } } # [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 [enum Anchor] constants for convenience."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns [member margin_left] and [member margin_top]. See also [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a color from assigned [Theme] with given `name` and associated with [Control] of given `type`.\n```gdscript\nfunc _ready():\n    modulate = get_color(\"font_color\", \"Button\") #get the color defined for button fonts\n```\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_color (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; mem :: transmute (ret) } } # [doc = "Returns combined minimum size from [member rect_min_size] and [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns a constant from assigned [Theme] with given `name` and associated with [Control] of given `type`.\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_constant (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns the mouse cursor shape the control displays on mouse hover. See [enum 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 :: icallptr_i64_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; crate :: generated :: control :: CursorShape (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: CursorShape (ret) } } # [doc = "Returns [member margin_right] and [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: FocusMode (ret) } } # [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]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one."] # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_owner ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Returns a font from assigned [Theme] with given `name` and associated with [Control] of given `type`.\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: font :: Font , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: font :: Font , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: GrowDirection (ret) } } # [doc = "Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an icon from assigned [Theme] with given `name` and associated with [Control] of given `type`.\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Distance between the node's top edge and its parent control, based on [member anchor_top].\nMargins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns the minimum size for this control. See [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: MouseFilter (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the parent control node."] # [doc = ""] # [inline] pub fn get_parent_control (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_parent_control ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node's rotation around its pivot, in degrees. See [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.\n**Note:** If the Control node is a child of a [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 [member 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The size of the node's bounding rectangle, in pixels. [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If the node and at least one of its neighbours uses the [constant SIZE_EXPAND] size flag, the parent [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [StyleBox] from assigned [Theme] with given `name` and associated with [Control] of given `type`.\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: style_box :: StyleBox , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_stylebox ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: style_box :: StyleBox , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Changing this property replaces the current [Theme] resource this node and all its [Control] children use."] # [doc = ""] # [inline] pub fn theme (& self) -> Option < Ref < crate :: generated :: theme :: Theme , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_theme ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: theme :: Theme , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the tooltip, which will appear when the cursor is resting over this control. See [member 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 :: icallptr_str_vec2 (method_bind , self . this . sys () . as_ptr () , at_position) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: control :: GrowDirection (ret) } } # [doc = "Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates an [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Steal the focus from another control and become the focused control (see [member focus_mode])."] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if [Color] with given `name` and associated with [Control] of given `type` exists in assigned [Theme].\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_color (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_color ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if [Color] with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if constant with given `name` and associated with [Control] of given `type` exists in assigned [Theme].\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_constant (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_constant ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if constant with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if this is the current focused control. See [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if font with given `name` and associated with [Control] of given `type` exists in assigned [Theme].\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_font ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if font with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if icon with given `name` and associated with [Control] of given `type` exists in assigned [Theme].\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_icon ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if icon with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if [Shader] with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if [StyleBox] with given `name` and associated with [Control] of given `type` exists in assigned [Theme].\n# Default Arguments\n* `type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_stylebox ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if [StyleBox] with given `name` has a valid override in this [Control] node."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Enables whether rendering of [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member 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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the anchor identified by `margin` constant from [enum Margin] enum to value `anchor`. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member 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 :: icallptr_void_i64_f64_bool_bool (method_bind , self . this . sys () . as_ptr () , margin , anchor , keep_margin , push_opposite_anchor) ; } } # [doc = "Works the same as [method set_anchor], but instead of `keep_margin` argument and automatic update of margin, it allows to set the margin offset yourself (see [method 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 :: icallptr_void_i64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , margin , anchor , offset , push_opposite_anchor) ; } } # [doc = "Sets both anchor preset and margin preset. See [method set_anchors_preset] and [method 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 :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , preset , resize_mode , margin) ; } } # [doc = "Sets the anchors to a `preset` from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , preset , keep_margins) ; } } # [doc = "Sets [member margin_left] and [member margin_top] at the same time. Equivalent of changing [member 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Enables whether rendering of [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [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 [method get_drag_data], [method can_drop_data], and [method 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 :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_drag_forwarding ; let ret = crate :: icalls :: icallptr_void_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 [method get_drag_data]. The control must not be in the scene tree.\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 :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_drag_preview ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Sets [member margin_right] and [member 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one."] # [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 :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , margin , 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 :: icallptr_void_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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , previous . into ()) ; } } # [doc = "Sets the [member 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 :: icallptr_void_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , keep_margins) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [doc = "Distance between the node's top edge and its parent control, based on [member anchor_top].\nMargins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , offset) ; } } # [doc = "Sets the margins to a `preset` from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor.\nUse parameter `resize_mode` with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [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] 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 :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , preset , resize_mode , margin) ; } } # [doc = "Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , filter) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , pivot_offset) ; } } # [doc = "Sets the [member 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 :: icallptr_void_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , keep_margins) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "The node's rotation around its pivot, in degrees. See [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.\n**Note:** If the Control node is a child of a [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 [member 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Sets the size (see [member 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 :: icallptr_void_vec2_bool (method_bind , self . this . sys () . as_ptr () , size , keep_margins) ; } } # [doc = "If the node and at least one of its neighbours uses the [constant SIZE_EXPAND] size flag, the parent [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Changing this property replaces the current [Theme] resource this node and all its [Control] children use."] # [doc = ""] # [inline] pub fn set_theme (& self , theme : impl AsArg < crate :: generated :: theme :: Theme >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_theme ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , theme . as_arg_ptr ()) ; } } # [doc = "Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. You can change the time required for the tooltip to appear with `gui/timers/tooltip_delay_sec` option in Project Settings."] # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , exclusive) ; } } # [doc = "Moves the mouse cursor to `to_position`, relative to [member rect_position] of this [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Control { } unsafe impl GodotObject for Control { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Control { type Target = crate :: generated :: canvas_item :: CanvasItem ; # [inline] fn deref (& self) -> & crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Control { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Control { } unsafe impl SubClass < crate :: generated :: node :: Node > for Control { } unsafe impl SubClass < crate :: generated :: object :: Object > for Control { } impl Instanciable for Control { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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 minimum_size_changed : * mut sys :: godot_method_bind , pub release_focus : * 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_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_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 , minimum_size_changed : 0 as * mut sys :: godot_method_bind , release_focus : 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_color_override = (gd_api . godot_method_bind_get_method) (class_name , "add_color_override\u{0}" . as_ptr () as * const c_char) ; table . add_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "add_constant_override\u{0}" . as_ptr () as * const c_char) ; table . add_font_override = (gd_api . godot_method_bind_get_method) (class_name , "add_font_override\u{0}" . as_ptr () as * const c_char) ; table . add_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_override\u{0}" . as_ptr () as * const c_char) ; table . add_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "add_shader_override\u{0}" . as_ptr () as * const c_char) ; table . add_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "add_stylebox_override\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . force_drag = (gd_api . godot_method_bind_get_method) (class_name , "force_drag\u{0}" . as_ptr () as * const c_char) ; table . get_anchor = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor\u{0}" . as_ptr () as * const c_char) ; table . get_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_begin\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\u{0}" . as_ptr () as * const c_char) ; table . get_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\u{0}" . as_ptr () as * const c_char) ; table . get_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_mode\u{0}" . as_ptr () as * const c_char) ; table . get_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_neighbour\u{0}" . as_ptr () as * const c_char) ; table . get_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_next\u{0}" . as_ptr () as * const c_char) ; table . get_focus_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_owner\u{0}" . as_ptr () as * const c_char) ; table . get_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_previous\u{0}" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\u{0}" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\u{0}" . as_ptr () as * const c_char) ; table . get_global_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rect\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\u{0}" . as_ptr () as * const c_char) ; table . get_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_filter\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_parent_control = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_control\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_pivot_offset\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\u{0}" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox\u{0}" . as_ptr () as * const c_char) ; table . get_theme = (gd_api . godot_method_bind_get_method) (class_name , "get_theme\u{0}" . as_ptr () as * const c_char) ; table . get_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . grab_click_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_click_focus\u{0}" . as_ptr () as * const c_char) ; table . grab_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_focus\u{0}" . as_ptr () as * const c_char) ; table . has_color = (gd_api . godot_method_bind_get_method) (class_name , "has_color\u{0}" . as_ptr () as * const c_char) ; table . has_color_override = (gd_api . godot_method_bind_get_method) (class_name , "has_color_override\u{0}" . as_ptr () as * const c_char) ; table . has_constant = (gd_api . godot_method_bind_get_method) (class_name , "has_constant\u{0}" . as_ptr () as * const c_char) ; table . has_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "has_constant_override\u{0}" . as_ptr () as * const c_char) ; table . has_focus = (gd_api . godot_method_bind_get_method) (class_name , "has_focus\u{0}" . as_ptr () as * const c_char) ; table . has_font = (gd_api . godot_method_bind_get_method) (class_name , "has_font\u{0}" . as_ptr () as * const c_char) ; table . has_font_override = (gd_api . godot_method_bind_get_method) (class_name , "has_font_override\u{0}" . as_ptr () as * const c_char) ; table . has_icon = (gd_api . godot_method_bind_get_method) (class_name , "has_icon\u{0}" . as_ptr () as * const c_char) ; table . has_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "has_icon_override\u{0}" . as_ptr () as * const c_char) ; table . has_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "has_shader_override\u{0}" . as_ptr () as * const c_char) ; table . has_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox\u{0}" . as_ptr () as * const c_char) ; table . has_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox_override\u{0}" . as_ptr () as * const c_char) ; table . is_clipping_contents = (gd_api . godot_method_bind_get_method) (class_name , "is_clipping_contents\u{0}" . as_ptr () as * const c_char) ; table . minimum_size_changed = (gd_api . godot_method_bind_get_method) (class_name , "minimum_size_changed\u{0}" . as_ptr () as * const c_char) ; table . release_focus = (gd_api . godot_method_bind_get_method) (class_name , "release_focus\u{0}" . as_ptr () as * const c_char) ; table . set_anchor = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_anchors_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_anchors_preset\u{0}" . as_ptr () as * const c_char) ; table . set_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_begin\u{0}" . as_ptr () as * const c_char) ; table . set_clip_contents = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_contents\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_drag_forwarding = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_forwarding\u{0}" . as_ptr () as * const c_char) ; table . set_drag_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_preview\u{0}" . as_ptr () as * const c_char) ; table . set_end = (gd_api . godot_method_bind_get_method) (class_name , "set_end\u{0}" . as_ptr () as * const c_char) ; table . set_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_mode\u{0}" . as_ptr () as * const c_char) ; table . set_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_neighbour\u{0}" . as_ptr () as * const c_char) ; table . set_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_next\u{0}" . as_ptr () as * const c_char) ; table . set_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_previous\u{0}" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_margins_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_margins_preset\u{0}" . as_ptr () as * const c_char) ; table . set_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_filter\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_pivot_offset\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_theme = (gd_api . godot_method_bind_get_method) (class_name , "set_theme\u{0}" . as_ptr () as * const c_char) ; table . set_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_tooltip\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . show_modal = (gd_api . godot_method_bind_get_method) (class_name , "show_modal\u{0}" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::control::Control;
            
            pub mod func_ref {
                use super::*;
                # [doc = "`core class FuncRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 by [method set_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 by [method set_function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]."] # [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 :: icallptr_var_arr (method_bind , self . this . sys () . as_ptr () , arg_array) ; Variant :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The name of the referenced function to call on the object, without parentheses or any parameters."] # [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 :: icallptr_void_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], not a built-in type such as [int], [Vector2] or [Dictionary]."] # [doc = ""] # [inline] pub fn set_instance (& self , instance : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . set_instance ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "FuncRef" } } impl std :: ops :: Deref for FuncRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FuncRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for FuncRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for FuncRef { } impl Instanciable for FuncRef { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . call_funcv = (gd_api . godot_method_bind_get_method) (class_name , "call_funcv\u{0}" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\u{0}" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; table . set_instance = (gd_api . godot_method_bind_get_method) (class_name , "set_instance\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::func_ref::FuncRef;
            
            pub mod physics_material {
                use super::*;
                # [doc = "`core class PhysicsMaterial` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 is_rough (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . is_rough ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , absorbent) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , rough) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsMaterial { } unsafe impl GodotObject for PhysicsMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsMaterial" } } impl std :: ops :: Deref for PhysicsMaterial { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicsMaterial { } impl Instanciable for PhysicsMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{0}" . as_ptr () as * const c_char) ; table . is_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "is_absorbent\u{0}" . as_ptr () as * const c_char) ; table . is_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_rough\u{0}" . as_ptr () as * const c_char) ; table . set_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "set_absorbent\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{0}" . as_ptr () as * const c_char) ; table . set_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_rough\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_material::PhysicsMaterial;
            
            pub mod vehicle_body {
                use super::*;
                # [doc = "`core class VehicleBody` inherits `RigidBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to `true` and are in contact with a surface. The [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , brake) ; } } # [doc = "Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to `true` and are in contact with a surface. The [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , engine_force) ; } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , steering) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VehicleBody { } unsafe impl GodotObject for VehicleBody { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VehicleBody { type Target = crate :: generated :: rigid_body :: RigidBody ; # [inline] fn deref (& self) -> & crate :: generated :: rigid_body :: RigidBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VehicleBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: rigid_body :: RigidBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: rigid_body :: RigidBody > for VehicleBody { } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for VehicleBody { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for VehicleBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VehicleBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for VehicleBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for VehicleBody { } impl Instanciable for VehicleBody { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "get_engine_force\u{0}" . as_ptr () as * const c_char) ; table . get_steering = (gd_api . godot_method_bind_get_method) (class_name , "get_steering\u{0}" . as_ptr () as * const c_char) ; table . set_brake = (gd_api . godot_method_bind_get_method) (class_name , "set_brake\u{0}" . as_ptr () as * const c_char) ; table . set_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "set_engine_force\u{0}" . as_ptr () as * const c_char) ; table . set_steering = (gd_api . godot_method_bind_get_method) (class_name , "set_steering\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::vehicle_body::VehicleBody;
            
            pub mod skin_reference {
                use super::*;
                # [doc = "`core class SkinReference` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skin (& self) -> Option < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinReferenceMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for SkinReference { } unsafe impl GodotObject for SkinReference { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SkinReference" } } impl std :: ops :: Deref for SkinReference { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkinReference { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SkinReference { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::skin_reference::SkinReference;
            
            pub mod spatial_gizmo {
                use super::*;
                # [doc = "`core class SpatialGizmo` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl SpatialGizmo { } impl gdnative_core :: private :: godot_object :: Sealed for SpatialGizmo { } unsafe impl GodotObject for SpatialGizmo { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialGizmo" } } impl std :: ops :: Deref for SpatialGizmo { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialGizmo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpatialGizmo { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpatialGizmo { }
            }
            pub use crate::generated::spatial_gizmo::SpatialGizmo;
            
            pub mod editor_export_plugin {
                use super::*;
                # [doc = "`tools class EditorExportPlugin` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorExportPlugin { # [doc = ""] # [doc = ""] # [inline] pub fn add_file (& self , path : impl Into < GodotString > , file : ByteArray , remap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_file ; let ret = crate :: icalls :: icallptr_void_str_bytearr_bool (method_bind , self . this . sys () . as_ptr () , path . into () , file , remap) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_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 [method 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 :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , flags . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , plist_content . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_shared_object (& self , path : impl Into < GodotString > , tags : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_shared_object ; let ret = crate :: icalls :: icallptr_void_str_strarr (method_bind , self . this . sys () . as_ptr () , path . into () , tags) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn skip (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . skip ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorExportPlugin { } unsafe impl GodotObject for EditorExportPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorExportPlugin" } } impl std :: ops :: Deref for EditorExportPlugin { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorExportPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorExportPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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 = 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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_ios_framework = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_framework\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_shared_object = (gd_api . godot_method_bind_get_method) (class_name , "add_shared_object\u{0}" . as_ptr () as * const c_char) ; table . skip = (gd_api . godot_method_bind_get_method) (class_name , "skip\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_export_plugin::EditorExportPlugin;
            
            pub mod slider {
                use super::*;
                # [doc = "`core class Slider` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , scrollable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ticks_on_border) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Slider { } unsafe impl GodotObject for Slider { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Slider { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Slider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for Slider { } unsafe impl SubClass < crate :: generated :: control :: Control > for Slider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Slider { } unsafe impl SubClass < crate :: generated :: node :: Node > for Slider { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\u{0}" . as_ptr () as * const c_char) ; table . is_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "is_scrollable\u{0}" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\u{0}" . as_ptr () as * const c_char) ; table . set_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "set_scrollable\u{0}" . as_ptr () as * const c_char) ; table . set_ticks = (gd_api . godot_method_bind_get_method) (class_name , "set_ticks\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::slider::Slider;
            
            pub mod spatial {
                use super::*;
                # [doc = "`core class Spatial` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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_TRANSFORM_CHANGED : i64 = 2000i64 ; pub const NOTIFICATION_VISIBILITY_CHANGED : i64 = 43i64 ; } 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 , thread_access :: 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn gizmo (& self) -> Option < Ref < crate :: generated :: spatial_gizmo :: SpatialGizmo , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_gizmo ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial_gizmo :: SpatialGizmo , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "World space (global) [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial]."] # [doc = ""] # [inline] pub fn get_parent_spatial (& self) -> Option < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_parent_spatial ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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] data structure not because the rotation is a vector, but only because [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Scale part of the local transformation."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Local space [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current [World] resource this [Spatial] node is registered to."] # [doc = ""] # [inline] pub fn get_world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Rotates the global (world) transformation around axis, a unit [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 :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [doc = "Scales the global (world) transformation by the given [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Moves the global (world) transformation by [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Disables rendering of this node. Changes [member 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns whether node notifies about its local transformation changes. [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether the node notifies about its global and local transformation changes. [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is present in the [SceneTree], its [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rotates itself so that the local -Z axis points towards the `target` position.\nThe transform will first be rotated around the given `up` vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the `target` and `up` vectors.\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 :: icallptr_void_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 [method 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 :: icallptr_void_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]."] # [doc = ""] # [inline] pub fn orthonormalize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . orthonormalize ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Rotates the local transformation around axis, a unit [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 :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [doc = "Rotates the local transformation around axis, a unit [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 :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn set_gizmo (& self , gizmo : impl AsArg < crate :: generated :: spatial_gizmo :: SpatialGizmo >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_gizmo ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , gizmo . as_arg_ptr ()) ; } } # [doc = "World space (global) [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 :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , global) ; } } # [doc = "Reset all transformations for this node (sets its [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 :: icallptr_void (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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Sets whether the node notifies about its local transformation changes. [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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] data structure not because the rotation is a vector, but only because [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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , euler_degrees) ; } } # [doc = "Scale part of the local transformation."] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local space [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 :: icallptr_void_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 :: icallptr_void_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, [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [doc = "Enables rendering of this node. Changes [member 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 :: icallptr_void (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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , global_point) ; mem :: transmute (ret) } } # [doc = "Changes the node's position by the given offset [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Changes the node's position by the given offset [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Updates the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Spatial { } unsafe impl GodotObject for Spatial { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Spatial { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Spatial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Spatial { } unsafe impl SubClass < crate :: generated :: object :: Object > for Spatial { } impl Instanciable for Spatial { # [inline] fn construct () -> Ref < Self , thread_access :: 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_transform : * 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_transform : * 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_transform : 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_transform : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "get_gizmo\u{0}" . as_ptr () as * const c_char) ; table . get_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform\u{0}" . as_ptr () as * const c_char) ; table . get_parent_spatial = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_spatial\u{0}" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . get_translation = (gd_api . godot_method_bind_get_method) (class_name , "get_translation\u{0}" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\u{0}" . as_ptr () as * const c_char) ; table . global_rotate = (gd_api . godot_method_bind_get_method) (class_name , "global_rotate\u{0}" . as_ptr () as * const c_char) ; table . global_scale = (gd_api . godot_method_bind_get_method) (class_name , "global_scale\u{0}" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\u{0}" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_scale_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_scale_disabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\u{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\u{0}" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\u{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\u{0}" . as_ptr () as * const c_char) ; table . orthonormalize = (gd_api . godot_method_bind_get_method) (class_name , "orthonormalize\u{0}" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\u{0}" . as_ptr () as * const c_char) ; table . rotate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "rotate_object_local\u{0}" . as_ptr () as * const c_char) ; table . rotate_x = (gd_api . godot_method_bind_get_method) (class_name , "rotate_x\u{0}" . as_ptr () as * const c_char) ; table . rotate_y = (gd_api . godot_method_bind_get_method) (class_name , "rotate_y\u{0}" . as_ptr () as * const c_char) ; table . rotate_z = (gd_api . godot_method_bind_get_method) (class_name , "rotate_z\u{0}" . as_ptr () as * const c_char) ; table . scale_object_local = (gd_api . godot_method_bind_get_method) (class_name , "scale_object_local\u{0}" . as_ptr () as * const c_char) ; table . set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "set_as_toplevel\u{0}" . as_ptr () as * const c_char) ; table . set_disable_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_scale\u{0}" . as_ptr () as * const c_char) ; table . set_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "set_gizmo\u{0}" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\u{0}" . as_ptr () as * const c_char) ; table . set_identity = (gd_api . godot_method_bind_get_method) (class_name , "set_identity\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_notify_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_transform\u{0}" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; table . set_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_translation\u{0}" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\u{0}" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\u{0}" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\u{0}" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\u{0}" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\u{0}" . as_ptr () as * const c_char) ; table . translate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "translate_object_local\u{0}" . as_ptr () as * const c_char) ; table . update_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "update_gizmo\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::spatial::Spatial;
            
            pub mod timer {
                use super::*;
                # [doc = "`core class Timer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Timer { pub const TIMER_PROCESS_IDLE : i64 = 1i64 ; pub const TIMER_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Processing mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: timer :: TimerProcessMode (ret) } } # [doc = "Wait time in seconds."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the timer is paused and will not process until it is unpaused again, even if [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the timer is paused and will not process until it is unpaused again, even if [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , paused) ; } } # [doc = "Processing mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Wait time in seconds."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_sec) ; } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_sec) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Timer { } unsafe impl GodotObject for Timer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Timer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Timer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Timer { } unsafe impl SubClass < crate :: generated :: object :: Object > for Timer { } impl Instanciable for Timer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "get_wait_time\u{0}" . as_ptr () as * const c_char) ; table . has_autostart = (gd_api . godot_method_bind_get_method) (class_name , "has_autostart\u{0}" . as_ptr () as * const c_char) ; table . is_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "is_one_shot\u{0}" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\u{0}" . as_ptr () as * const c_char) ; table . is_stopped = (gd_api . godot_method_bind_get_method) (class_name , "is_stopped\u{0}" . as_ptr () as * const c_char) ; table . set_autostart = (gd_api . godot_method_bind_get_method) (class_name , "set_autostart\u{0}" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\u{0}" . as_ptr () as * const c_char) ; table . set_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_paused\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "set_wait_time\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::timer::Timer;
            
            pub mod video_player {
                use super::*;
                # [doc = "`core class VideoPlayer` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The assigned video stream. See description for supported formats."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: video_stream :: VideoStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: video_stream :: VideoStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The current position of the stream, in seconds."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current frame as a [Texture]."] # [doc = ""] # [inline] pub fn get_video_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_video_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , msec) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , paused) ; } } # [doc = "The assigned video stream. See description for supported formats."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: video_stream :: VideoStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "The current position of the stream, in seconds."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , db) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoPlayer { } unsafe impl GodotObject for VideoPlayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VideoPlayer { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: node :: Node > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoPlayer { } impl Instanciable for VideoPlayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_buffering_msec\u{0}" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\u{0}" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\u{0}" . as_ptr () as * const c_char) ; table . get_stream_name = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_name\u{0}" . as_ptr () as * const c_char) ; table . get_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_position\u{0}" . as_ptr () as * const c_char) ; table . get_video_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_video_texture\u{0}" . as_ptr () as * const c_char) ; table . get_volume = (gd_api . godot_method_bind_get_method) (class_name , "get_volume\u{0}" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\u{0}" . as_ptr () as * const c_char) ; table . has_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "has_autoplay\u{0}" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\u{0}" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . set_audio_track = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_track\u{0}" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\u{0}" . as_ptr () as * const c_char) ; table . set_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "set_buffering_msec\u{0}" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\u{0}" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\u{0}" . as_ptr () as * const c_char) ; table . set_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_paused\u{0}" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\u{0}" . as_ptr () as * const c_char) ; table . set_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_position\u{0}" . as_ptr () as * const c_char) ; table . set_volume = (gd_api . godot_method_bind_get_method) (class_name , "set_volume\u{0}" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::video_player::VideoPlayer;
            
            pub mod visual_script_iterator {
                use super::*;
                # [doc = "`core class VisualScriptIterator` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIterator" } } impl std :: ops :: Deref for VisualScriptIterator { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIterator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIterator { } impl Instanciable for VisualScriptIterator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_iterator::VisualScriptIterator;
            
            pub mod physics_2d_direct_body_state_sw {
                use super::*;
                # [doc = "`core class Physics2DDirectBodyStateSW` inherits `Physics2DDirectBodyState` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2ddirectbodystatesw.html) 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\nPhysics2DDirectBodyStateSW inherits methods from:\n - [Physics2DDirectBodyState](struct.Physics2DDirectBodyState.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DDirectBodyStateSW { this : RawObject < Self > , } impl Physics2DDirectBodyStateSW { } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DDirectBodyStateSW { } unsafe impl GodotObject for Physics2DDirectBodyStateSW { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DDirectBodyStateSW" } } impl std :: ops :: Deref for Physics2DDirectBodyStateSW { type Target = crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState ; # [inline] fn deref (& self) -> & crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DDirectBodyStateSW { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState > for Physics2DDirectBodyStateSW { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DDirectBodyStateSW { }
            }
            pub use crate::generated::physics_2d_direct_body_state_sw::Physics2DDirectBodyStateSW;
            
            pub mod path_follow {
                use super::*;
                # [doc = "`core class PathFollow` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PathFollow { pub const ROTATION_NONE : i64 = 0i64 ; pub const ROTATION_ORIENTED : i64 = 4i64 ; pub const ROTATION_XY : i64 = 2i64 ; pub const ROTATION_XYZ : i64 = 3i64 ; pub const ROTATION_Y : i64 = 1i64 ; } 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 , thread_access :: 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] of the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Allows or forbids rotation on one or more axes, depending on the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: path_follow :: RotationMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [Curve3D] of the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , h_offset) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _loop) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Allows or forbids rotation on one or more axes, depending on the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rotation_mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , unit_offset) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , v_offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PathFollow { } unsafe impl GodotObject for PathFollow { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PathFollow { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PathFollow { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PathFollow { } unsafe impl SubClass < crate :: generated :: node :: Node > for PathFollow { } unsafe impl SubClass < crate :: generated :: object :: Object > for PathFollow { } impl Instanciable for PathFollow { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_rotation_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_mode\u{0}" . as_ptr () as * const c_char) ; table . get_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_offset\u{0}" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\u{0}" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\u{0}" . as_ptr () as * const c_char) ; table . set_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_cubic_interpolation\u{0}" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\u{0}" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_rotation_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_mode\u{0}" . as_ptr () as * const c_char) ; table . set_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_offset\u{0}" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::path_follow::PathFollow;
            
            pub mod damped_spring_joint_2d {
                use super::*;
                # [doc = "`core class DampedSpringJoint2D` inherits `Joint2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 rest_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_rest_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_stiffness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , damping) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rest_length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , stiffness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DampedSpringJoint2D { } unsafe impl GodotObject for DampedSpringJoint2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for DampedSpringJoint2D { type Target = crate :: generated :: joint_2d :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DampedSpringJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint_2d :: Joint2D > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for DampedSpringJoint2D { } impl Instanciable for DampedSpringJoint2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\u{0}" . as_ptr () as * const c_char) ; table . get_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_length\u{0}" . as_ptr () as * const c_char) ; table . get_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_stiffness\u{0}" . as_ptr () as * const c_char) ; table . set_damping = (gd_api . godot_method_bind_get_method) (class_name , "set_damping\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{0}" . as_ptr () as * const c_char) ; table . set_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "set_rest_length\u{0}" . as_ptr () as * const c_char) ; table . set_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_stiffness\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::damped_spring_joint_2d::DampedSpringJoint2D;
            
            pub mod physics_2d_server_sw {
                use super::*;
                # [doc = "`core class Physics2DServerSW` inherits `Physics2DServer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl Physics2DServerSW { } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServerSW { } unsafe impl GodotObject for Physics2DServerSW { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServerSW" } } impl std :: ops :: Deref for Physics2DServerSW { type Target = crate :: generated :: physics_2d_server :: Physics2DServer ; # [inline] fn deref (& self) -> & crate :: generated :: physics_2d_server :: Physics2DServer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServerSW { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_2d_server :: Physics2DServer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_2d_server :: Physics2DServer > for Physics2DServerSW { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DServerSW { }
            }
            pub use crate::generated::physics_2d_server_sw::Physics2DServerSW;
            
            pub mod resource_importer {
                use super::*;
                # [doc = "`core class ResourceImporter` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl ResourceImporter { } impl gdnative_core :: private :: godot_object :: Sealed for ResourceImporter { } unsafe impl GodotObject for ResourceImporter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceImporter" } } impl std :: ops :: Deref for ResourceImporter { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceImporter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ResourceImporter { } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourceImporter { }
            }
            pub use crate::generated::resource_importer::ResourceImporter;
            
            pub mod packed_scene {
                use super::*;
                # [doc = "`core class PackedScene` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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) ; } 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 } } # [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 ; } 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the `SceneState` representing the scene file contents."] # [doc = ""] # [inline] pub fn get_state (& self) -> Option < Ref < crate :: generated :: scene_state :: SceneState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . get_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: scene_state :: SceneState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant 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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . instance ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , edit_state) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Pack will ignore any sub-nodes not owned by given node. See [member Node.owner]."] # [doc = ""] # [inline] pub fn pack (& self , path : impl AsArg < crate :: generated :: node :: Node >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . pack ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , path . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedScene { } unsafe impl GodotObject for PackedScene { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedScene" } } impl std :: ops :: Deref for PackedScene { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedScene { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PackedScene { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PackedScene { } unsafe impl SubClass < crate :: generated :: object :: Object > for PackedScene { } impl Instanciable for PackedScene { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_state = (gd_api . godot_method_bind_get_method) (class_name , "get_state\u{0}" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\u{0}" . as_ptr () as * const c_char) ; table . pack = (gd_api . godot_method_bind_get_method) (class_name , "pack\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packed_scene::PackedScene;
            
            pub mod csg_shape {
                use super::*;
                # [doc = "`core class CSGShape` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CSGShape { pub const OPERATION_INTERSECTION : i64 = 1i64 ; pub const OPERATION_SUBTRACTION : i64 = 2i64 ; pub const OPERATION_UNION : i64 = 0i64 ; } 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: csg_shape :: Operation (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , operation) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , snap) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , operation) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGShape { } unsafe impl GodotObject for CSGShape { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGShape { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGShape { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGShape { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGShape { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGShape { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\u{0}" . as_ptr () as * const c_char) ; table . get_operation = (gd_api . godot_method_bind_get_method) (class_name , "get_operation\u{0}" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\u{0}" . as_ptr () as * const c_char) ; table . is_calculating_tangents = (gd_api . godot_method_bind_get_method) (class_name , "is_calculating_tangents\u{0}" . as_ptr () as * const c_char) ; table . is_root_shape = (gd_api . godot_method_bind_get_method) (class_name , "is_root_shape\u{0}" . as_ptr () as * const c_char) ; table . is_using_collision = (gd_api . godot_method_bind_get_method) (class_name , "is_using_collision\u{0}" . as_ptr () as * const c_char) ; table . set_calculate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "set_calculate_tangents\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operation = (gd_api . godot_method_bind_get_method) (class_name , "set_operation\u{0}" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\u{0}" . as_ptr () as * const c_char) ; table . set_use_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_use_collision\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_shape::CSGShape;
            
            pub mod sphere_mesh {
                use super::*;
                # [doc = "`core class SphereMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 is_hemisphere (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_is_hemisphere ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , is_hemisphere) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radial_segments) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SphereMesh { } unsafe impl GodotObject for SphereMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SphereMesh" } } impl std :: ops :: Deref for SphereMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SphereMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SphereMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SphereMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for SphereMesh { } impl Instanciable for SphereMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "get_is_hemisphere\u{0}" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "set_is_hemisphere\u{0}" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sphere_mesh::SphereMesh;
            
            pub mod audio_effect_limiter {
                use super::*;
                # [doc = "`core class AudioEffectLimiter` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ceiling) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , soft_clip) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , soft_clip) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLimiter { } unsafe impl GodotObject for AudioEffectLimiter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLimiter" } } impl std :: ops :: Deref for AudioEffectLimiter { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLimiter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLimiter { } impl Instanciable for AudioEffectLimiter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold_db\u{0}" . as_ptr () as * const c_char) ; table . set_ceiling_db = (gd_api . godot_method_bind_get_method) (class_name , "set_ceiling_db\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold_db\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_limiter::AudioEffectLimiter;
            
            pub mod tab_container {
                use super::*;
                # [doc = "`core class TabContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TabContainer { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current tab index. When set, this index's [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the child [Control] node located at the active tab index."] # [doc = ""] # [inline] pub fn get_current_tab_control (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_current_tab_control ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [Popup] node instance if one has been set already with [method set_popup]."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: popup :: Popup , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup :: Popup , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The alignment of all tabs in the tab container. See the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tab_container :: TabAlign (ret) } } # [doc = "Returns the [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 :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_control ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ret as _ } } # [doc = "Returns the [Texture] for the tab at index `tab_idx` or `null` if the tab has no [Texture]."] # [doc = ""] # [inline] pub fn get_tab_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, children [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , is_front) ; } } # [doc = "The current tab index. When set, this index's [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer]. Clicking it will expand the [Popup] node."] # [doc = ""] # [inline] pub fn set_popup (& self , popup : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_popup ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , popup . as_arg_ptr ()) ; } } # [doc = "The alignment of all tabs in the tab container. See the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `disabled` is `false`, hides the tab at index `tab_idx`.\n**Note:** Its title text will remain, unless also removed with [method set_tab_title]."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx , disabled) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx , 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, but this can be overridden with [method set_tab_title]."] # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , tab_idx , title . into ()) ; } } # [doc = "Defines rearrange group id, choose for each [TabContainer] the same value to enable tab drag between [TabContainer]. Enable drag with `set_drag_to_rearrange_enabled(true)`."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , group_id) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [doc = "If `true`, children [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TabContainer { } unsafe impl GodotObject for TabContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TabContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TabContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for TabContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for TabContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TabContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for TabContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for TabContainer { } impl Instanciable for TabContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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_icon : * 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_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_icon : 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\u{0}" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\u{0}" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\u{0}" . as_ptr () as * const c_char) ; table . get_tab_control = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_control\u{0}" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\u{0}" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\u{0}" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\u{0}" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_popup = (gd_api . godot_method_bind_get_method) (class_name , "set_popup\u{0}" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\u{0}" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\u{0}" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tabs_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_visible\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tab_container::TabContainer;
            
            pub mod nine_patch_rect {
                use super::*;
                # [doc = "`core class NinePatchRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 = "Doesn't do anything at the time of writing."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [doc = "The height of the 9-slice's top row."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret 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 region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Doesn't do anything at the time of writing."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_center) ; } } # [doc = "Doesn't do anything at the time of writing."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The height of the 9-slice's top row."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , value) ; } } # [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 :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Doesn't do anything at the time of writing."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NinePatchRect { } unsafe impl GodotObject for NinePatchRect { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NinePatchRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NinePatchRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for NinePatchRect { } impl Instanciable for NinePatchRect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_patch_margin\u{0}" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_patch_margin\u{0}" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::nine_patch_rect::NinePatchRect;
            
            pub mod file {
                use super::*;
                # [doc = "`core class File` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl File { pub const COMPRESSION_DEFLATE : i64 = 1i64 ; pub const COMPRESSION_FASTLZ : i64 = 0i64 ; pub const COMPRESSION_GZIP : i64 = 3i64 ; pub const COMPRESSION_ZSTD : i64 = 2i64 ; pub const READ : i64 = 1i64 ; pub const READ_WRITE : i64 = 3i64 ; pub const WRITE : i64 = 2i64 ; 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 , thread_access :: 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."] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if the file cursor has read past the end of the file.\n**Note:** This function will still return `false` while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 that their source asset will not be included in the exported game, as only the imported version is used (in the `res://.import` folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using `File.file_exists` on an imported resource would work while you are developing in the editor (the source asset is present in `res://`, but fail when exported)."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn flush (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . flush ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the next 16 bits from the file as an integer. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next 32 bits from the file as an integer. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next 64 bits from the file as an integer. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next 8 bits from the file as an integer. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the whole file as a [String].\nText is interpreted as being UTF-8 encoded."] # [doc = ""] # [inline] pub fn get_as_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_as_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns next `len` bytes of the file as a [PoolByteArray]."] # [doc = ""] # [inline] pub fn get_buffer (& self , len : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallptr_bytearr_i64 (method_bind , self . this . sys () . as_ptr () , len) ; ByteArray :: from_sys (ret) } } # [doc = "Returns 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.\nText is interpreted as being UTF-8 encoded.\n# Default Arguments\n* `delim` - `\",\"`"] # [doc = ""] # [inline] pub fn get_csv_line (& self , delim : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_csv_line ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , delim . into ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines.\n**Note:** This is about the file format, not CPU type. This is always reset to `false` whenever you open the file."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the last error that happened when trying to perform operations. Compare with the `ERR_FILE_*` constants from [enum Error]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next line of the file as a [String].\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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns an MD5 String representing the file at the given path or an empty [String] 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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the last time the `file` was modified in unix timestamp format or returns a [String] \"ERROR IN `file`\". This unix timestamp can be converted to datetime by using [method 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; ret as _ } } # [doc = "Returns a [String] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path as a [String] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the absolute path as a [String] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a SHA-256 [String] representing the file at the given path or an empty [String] 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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the next [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 :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Opens a compressed file for reading or writing.\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 :: icallptr_i64_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags , compression_mode) ; GodotError :: result_from_sys (ret as _) } } # [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 : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . open_encrypted ; let ret = crate :: icalls :: icallptr_i64_str_i64_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags , key) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str_i64_str (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags , pass . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines.\n**Note:** This is about the file format, not CPU type. This is always reset to `false` whenever you open the file."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 [method store_64], or convert it manually (see [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 [method store_64], or convert it manually (see [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Stores the given array of bytes in the file."] # [doc = ""] # [inline] pub fn store_buffer (& self , buffer : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_buffer ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; } } # [doc = "Store the given [PoolStringArray] 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 : StringArray , delim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_csv_line ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Stores the given [String] as a line in the file.\nText will be encoded 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , line . into ()) ; } } # [doc = "Stores the given [String] 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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Stores the given [String] in the file.\nText will be encoded as UTF-8."] # [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 :: icallptr_void_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# 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 :: icallptr_void_var_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , full_objects) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for File { } unsafe impl GodotObject for File { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "File" } } impl std :: ops :: Deref for File { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for File { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for File { } unsafe impl SubClass < crate :: generated :: object :: Object > for File { } impl Instanciable for File { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . eof_reached = (gd_api . godot_method_bind_get_method) (class_name , "eof_reached\u{0}" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\u{0}" . as_ptr () as * const c_char) ; table . flush = (gd_api . godot_method_bind_get_method) (class_name , "flush\u{0}" . as_ptr () as * const c_char) ; table . get_16 = (gd_api . godot_method_bind_get_method) (class_name , "get_16\u{0}" . as_ptr () as * const c_char) ; table . get_32 = (gd_api . godot_method_bind_get_method) (class_name , "get_32\u{0}" . as_ptr () as * const c_char) ; table . get_64 = (gd_api . godot_method_bind_get_method) (class_name , "get_64\u{0}" . as_ptr () as * const c_char) ; table . get_8 = (gd_api . godot_method_bind_get_method) (class_name , "get_8\u{0}" . as_ptr () as * const c_char) ; table . get_as_text = (gd_api . godot_method_bind_get_method) (class_name , "get_as_text\u{0}" . as_ptr () as * const c_char) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\u{0}" . as_ptr () as * const c_char) ; table . get_csv_line = (gd_api . godot_method_bind_get_method) (class_name , "get_csv_line\u{0}" . as_ptr () as * const c_char) ; table . get_double = (gd_api . godot_method_bind_get_method) (class_name , "get_double\u{0}" . as_ptr () as * const c_char) ; table . get_endian_swap = (gd_api . godot_method_bind_get_method) (class_name , "get_endian_swap\u{0}" . as_ptr () as * const c_char) ; table . get_error = (gd_api . godot_method_bind_get_method) (class_name , "get_error\u{0}" . as_ptr () as * const c_char) ; table . get_float = (gd_api . godot_method_bind_get_method) (class_name , "get_float\u{0}" . as_ptr () as * const c_char) ; table . get_len = (gd_api . godot_method_bind_get_method) (class_name , "get_len\u{0}" . as_ptr () as * const c_char) ; table . get_line = (gd_api . godot_method_bind_get_method) (class_name , "get_line\u{0}" . as_ptr () as * const c_char) ; table . get_md5 = (gd_api . godot_method_bind_get_method) (class_name , "get_md5\u{0}" . as_ptr () as * const c_char) ; table . get_modified_time = (gd_api . godot_method_bind_get_method) (class_name , "get_modified_time\u{0}" . as_ptr () as * const c_char) ; table . get_pascal_string = (gd_api . godot_method_bind_get_method) (class_name , "get_pascal_string\u{0}" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\u{0}" . as_ptr () as * const c_char) ; table . get_path_absolute = (gd_api . godot_method_bind_get_method) (class_name , "get_path_absolute\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_real = (gd_api . godot_method_bind_get_method) (class_name , "get_real\u{0}" . as_ptr () as * const c_char) ; table . get_sha256 = (gd_api . godot_method_bind_get_method) (class_name , "get_sha256\u{0}" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\u{0}" . as_ptr () as * const c_char) ; table . is_open = (gd_api . godot_method_bind_get_method) (class_name , "is_open\u{0}" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\u{0}" . as_ptr () as * const c_char) ; table . open_compressed = (gd_api . godot_method_bind_get_method) (class_name , "open_compressed\u{0}" . as_ptr () as * const c_char) ; table . open_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "open_encrypted\u{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\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . seek_end = (gd_api . godot_method_bind_get_method) (class_name , "seek_end\u{0}" . as_ptr () as * const c_char) ; table . set_endian_swap = (gd_api . godot_method_bind_get_method) (class_name , "set_endian_swap\u{0}" . as_ptr () as * const c_char) ; table . store_16 = (gd_api . godot_method_bind_get_method) (class_name , "store_16\u{0}" . as_ptr () as * const c_char) ; table . store_32 = (gd_api . godot_method_bind_get_method) (class_name , "store_32\u{0}" . as_ptr () as * const c_char) ; table . store_64 = (gd_api . godot_method_bind_get_method) (class_name , "store_64\u{0}" . as_ptr () as * const c_char) ; table . store_8 = (gd_api . godot_method_bind_get_method) (class_name , "store_8\u{0}" . as_ptr () as * const c_char) ; table . store_buffer = (gd_api . godot_method_bind_get_method) (class_name , "store_buffer\u{0}" . as_ptr () as * const c_char) ; table . store_csv_line = (gd_api . godot_method_bind_get_method) (class_name , "store_csv_line\u{0}" . as_ptr () as * const c_char) ; table . store_double = (gd_api . godot_method_bind_get_method) (class_name , "store_double\u{0}" . as_ptr () as * const c_char) ; table . store_float = (gd_api . godot_method_bind_get_method) (class_name , "store_float\u{0}" . as_ptr () as * const c_char) ; table . store_line = (gd_api . godot_method_bind_get_method) (class_name , "store_line\u{0}" . as_ptr () as * const c_char) ; table . store_pascal_string = (gd_api . godot_method_bind_get_method) (class_name , "store_pascal_string\u{0}" . as_ptr () as * const c_char) ; table . store_real = (gd_api . godot_method_bind_get_method) (class_name , "store_real\u{0}" . as_ptr () as * const c_char) ; table . store_string = (gd_api . godot_method_bind_get_method) (class_name , "store_string\u{0}" . as_ptr () as * const c_char) ; table . store_var = (gd_api . godot_method_bind_get_method) (class_name , "store_var\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::file::File;
            
            pub mod scene_tree_timer {
                use super::*;
                # [doc = "`core class SceneTreeTimer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl SceneTreeTimer { # [doc = "The time remaining."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The time remaining."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTreeTimer { } unsafe impl GodotObject for SceneTreeTimer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneTreeTimer" } } impl std :: ops :: Deref for SceneTreeTimer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTreeTimer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SceneTreeTimer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_time_left = (gd_api . godot_method_bind_get_method) (class_name , "set_time_left\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::scene_tree_timer::SceneTreeTimer;
            
            pub mod style_box_empty {
                use super::*;
                # [doc = "`core class StyleBoxEmpty` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxEmpty" } } impl std :: ops :: Deref for StyleBoxEmpty { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxEmpty { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxEmpty { } impl Instanciable for StyleBoxEmpty { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::style_box_empty::StyleBoxEmpty;
            
            pub mod visual_shader_node_vector_scalar_mix {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorScalarMix` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarMix" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarMix { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarMix { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarMix { } impl Instanciable for VisualShaderNodeVectorScalarMix { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_scalar_mix::VisualShaderNodeVectorScalarMix;
            
            pub mod dynamic_font_data {
                use super::*;
                # [doc = "`core class DynamicFontData` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DynamicFontData { pub const HINTING_LIGHT : i64 = 1i64 ; pub const HINTING_NONE : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The font hinting mode used by FreeType. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: dynamic_font_data :: Hinting (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The font hinting mode used by FreeType. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DynamicFontData { } unsafe impl GodotObject for DynamicFontData { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DynamicFontData" } } impl std :: ops :: Deref for DynamicFontData { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DynamicFontData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: object :: Object > for DynamicFontData { } impl Instanciable for DynamicFontData { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 } 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 , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_hinting = (gd_api . godot_method_bind_get_method) (class_name , "get_hinting\u{0}" . as_ptr () as * const c_char) ; table . is_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "is_antialiased\u{0}" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\u{0}" . as_ptr () as * const c_char) ; table . set_font_path = (gd_api . godot_method_bind_get_method) (class_name , "set_font_path\u{0}" . as_ptr () as * const c_char) ; table . set_hinting = (gd_api . godot_method_bind_get_method) (class_name , "set_hinting\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::dynamic_font_data::DynamicFontData;
            
            pub mod translation {
                use super::*;
                # [doc = "`core class Translation` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , src_message . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns all the messages (keys)."] # [doc = ""] # [inline] pub fn get_message_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . get_message_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Translation" } } impl std :: ops :: Deref for Translation { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Translation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Translation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Translation { } unsafe impl SubClass < crate :: generated :: object :: Object > for Translation { } impl Instanciable for Translation { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . erase_message = (gd_api . godot_method_bind_get_method) (class_name , "erase_message\u{0}" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\u{0}" . as_ptr () as * const c_char) ; table . get_message = (gd_api . godot_method_bind_get_method) (class_name , "get_message\u{0}" . as_ptr () as * const c_char) ; table . get_message_count = (gd_api . godot_method_bind_get_method) (class_name , "get_message_count\u{0}" . as_ptr () as * const c_char) ; table . get_message_list = (gd_api . godot_method_bind_get_method) (class_name , "get_message_list\u{0}" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::translation::Translation;
            
            pub mod world_environment {
                use super::*;
                # [doc = "`core class WorldEnvironment` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] resource used by this [WorldEnvironment], defining the default properties."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldEnvironmentMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Environment] resource used by this [WorldEnvironment], defining the default properties."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldEnvironmentMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for WorldEnvironment { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WorldEnvironment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for WorldEnvironment { } unsafe impl SubClass < crate :: generated :: object :: Object > for WorldEnvironment { } impl Instanciable for WorldEnvironment { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::world_environment::WorldEnvironment;
            
            pub mod root_motion_view {
                use super::*;
                # [doc = "`core class RootMotionView` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl RootMotionView { } impl gdnative_core :: private :: godot_object :: Sealed for RootMotionView { } unsafe impl GodotObject for RootMotionView { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RootMotionView { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RootMotionView { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for RootMotionView { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RootMotionView { } unsafe impl SubClass < crate :: generated :: node :: Node > for RootMotionView { } unsafe impl SubClass < crate :: generated :: object :: Object > for RootMotionView { }
            }
            pub use crate::generated::root_motion_view::RootMotionView;
            
            pub mod clipped_camera {
                use super::*;
                # [doc = "`core class ClippedCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ClippedCamera { pub const CLIP_PROCESS_IDLE : i64 = 1i64 ; pub const CLIP_PROCESS_PHYSICS : i64 = 0i64 ; } 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 , thread_access :: 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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The camera's process callback. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: clipped_camera :: ProcessMode (ret) } } # [doc = "If `true`, the camera stops on contact with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera stops on contact with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a collision exception with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception with the specified [RID]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "If `true`, the camera stops on contact with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the camera stops on contact with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The camera's process callback. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , process_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ClippedCamera { } unsafe impl GodotObject for ClippedCamera { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ClippedCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClippedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for ClippedCamera { } impl Instanciable for ClippedCamera { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\u{0}" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\u{0}" . as_ptr () as * const c_char) ; table . get_clip_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_offset\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\u{0}" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::clipped_camera::ClippedCamera;
            
            pub mod animated_texture {
                use super::*;
                # [doc = "`core class AnimatedTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; ret as _ } } # [doc = "Returns the given frame's [Texture]."] # [doc = ""] # [inline] pub fn frame_texture (& self , frame : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frame_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [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 [member 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 [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [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 [member 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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , frame , delay) ; } } # [doc = "Assigns a [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 [member frames] - 1.\nYou can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation."] # [doc = ""] # [inline] pub fn set_frame_texture (& self , frame : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frame_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , frame , texture . as_arg_ptr ()) ; } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [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 [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , oneshot) ; } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedTexture { } unsafe impl GodotObject for AnimatedTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimatedTexture" } } impl std :: ops :: Deref for AnimatedTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedTexture { } impl Instanciable for AnimatedTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fps\u{0}" . as_ptr () as * const c_char) ; table . get_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_delay\u{0}" . as_ptr () as * const c_char) ; table . get_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_texture\u{0}" . as_ptr () as * const c_char) ; table . get_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_frames\u{0}" . as_ptr () as * const c_char) ; table . get_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "get_oneshot\u{0}" . as_ptr () as * const c_char) ; table . get_pause = (gd_api . godot_method_bind_get_method) (class_name , "get_pause\u{0}" . as_ptr () as * const c_char) ; table . set_current_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_current_frame\u{0}" . as_ptr () as * const c_char) ; table . set_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fps\u{0}" . as_ptr () as * const c_char) ; table . set_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_delay\u{0}" . as_ptr () as * const c_char) ; table . set_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_texture\u{0}" . as_ptr () as * const c_char) ; table . set_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_frames\u{0}" . as_ptr () as * const c_char) ; table . set_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "set_oneshot\u{0}" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animated_texture::AnimatedTexture;
            
            pub mod physics_direct_body_state {
                use super::*;
                # [doc = "`core class PhysicsDirectBodyState` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , j) ; } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the collider's [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 :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; Rid :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [doc = "Returns the collider object."] # [doc = ""] # [inline] pub fn get_contact_collider_object (& self , contact_idx : i64) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_object ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_inverse_mass ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's linear velocity."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_basis (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current state of the space, useful for queries."] # [doc = ""] # [inline] pub fn get_space_state (& self) -> Option < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } # [doc = "The body's linear velocity."] # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsDirectBodyState { } unsafe impl GodotObject for PhysicsDirectBodyState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsDirectBodyState" } } impl std :: ops :: Deref for PhysicsDirectBodyState { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsDirectBodyState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\u{0}" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\u{0}" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\u{0}" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\u{0}" . as_ptr () as * const c_char) ; table . get_contact_impulse = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_impulse\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\u{0}" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\u{0}" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\u{0}" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\u{0}" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\u{0}" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_direct_body_state::PhysicsDirectBodyState;
            
            pub mod visual_shader_node_scalar_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarFunc { pub const FUNC_ABS : i64 = 12i64 ; pub const FUNC_ACOS : i64 = 4i64 ; pub const FUNC_ACOSH : i64 = 20i64 ; pub const FUNC_ASIN : i64 = 3i64 ; pub const FUNC_ASINH : i64 = 21i64 ; pub const FUNC_ATAN : i64 = 5i64 ; pub const FUNC_ATANH : i64 = 22i64 ; pub const FUNC_CEIL : i64 = 16i64 ; pub const FUNC_COS : i64 = 1i64 ; pub const FUNC_COSH : i64 = 7i64 ; pub const FUNC_DEGREES : i64 = 23i64 ; pub const FUNC_EXP : i64 = 10i64 ; pub const FUNC_EXP2 : i64 = 24i64 ; pub const FUNC_FLOOR : i64 = 14i64 ; pub const FUNC_FRAC : i64 = 17i64 ; pub const FUNC_INVERSE_SQRT : i64 = 25i64 ; pub const FUNC_LOG : i64 = 9i64 ; pub const FUNC_LOG2 : i64 = 26i64 ; pub const FUNC_NEGATE : i64 = 19i64 ; pub const FUNC_ONEMINUS : i64 = 31i64 ; pub const FUNC_RADIANS : i64 = 27i64 ; pub const FUNC_RECIPROCAL : i64 = 28i64 ; pub const FUNC_ROUND : i64 = 15i64 ; pub const FUNC_ROUNDEVEN : i64 = 29i64 ; pub const FUNC_SATURATE : i64 = 18i64 ; pub const FUNC_SIGN : i64 = 13i64 ; pub const FUNC_SIN : i64 = 0i64 ; pub const FUNC_SINH : i64 = 6i64 ; pub const FUNC_SQRT : i64 = 11i64 ; pub const FUNC_TAN : i64 = 2i64 ; pub const FUNC_TANH : i64 = 8i64 ; pub const FUNC_TRUNC : i64 = 30i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_scalar_func :: Function (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarFunc { } unsafe impl GodotObject for VisualShaderNodeScalarFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarFunc" } } impl std :: ops :: Deref for VisualShaderNodeScalarFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarFunc { } impl Instanciable for VisualShaderNodeScalarFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_func::VisualShaderNodeScalarFunc;
            
            pub mod texture_rect {
                use super::*;
                # [doc = "`core class TextureRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureRect { pub const STRETCH_KEEP : i64 = 3i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 6i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 7i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 4i64 ; pub const STRETCH_SCALE : i64 = 1i64 ; pub const STRETCH_SCALE_ON_EXPAND : i64 = 0i64 ; pub const STRETCH_TILE : i64 = 2i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: texture_rect :: StretchMode (ret) } } # [doc = "The node's [Texture] resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Controls the texture's behavior when resizing the node's bounding rectangle. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode) ; } } # [doc = "The node's [Texture] resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextureRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for TextureRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextureRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextureRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureRect { } impl Instanciable for TextureRect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\u{0}" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\u{0}" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\u{0}" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::texture_rect::TextureRect;
            
            pub mod editor_scene_importer_fbx {
                use super::*;
                # [doc = "`tools class EditorSceneImporterFBX` inherits `EditorSceneImporter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorSceneImporterFBX { } impl gdnative_core :: private :: godot_object :: Sealed for EditorSceneImporterFBX { } unsafe impl GodotObject for EditorSceneImporterFBX { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSceneImporterFBX" } } impl std :: ops :: Deref for EditorSceneImporterFBX { type Target = crate :: generated :: editor_scene_importer :: EditorSceneImporter ; # [inline] fn deref (& self) -> & crate :: generated :: editor_scene_importer :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSceneImporterFBX { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: editor_scene_importer :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: editor_scene_importer :: EditorSceneImporter > for EditorSceneImporterFBX { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSceneImporterFBX { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorSceneImporterFBX { }
            }
            pub use crate::generated::editor_scene_importer_fbx::EditorSceneImporterFBX;
            
            pub mod cpu_particles_2d {
                use super::*;
                # [doc = "`core class CPUParticles2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CPUParticles2D { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const EMISSION_SHAPE_MAX : i64 = 5i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const EMISSION_SHAPE_RECTANGLE : i64 = 2i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const PARAM_MAX : i64 = 12i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; } 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 , thread_access :: 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] node with an assigned [ParticlesMaterial]."] # [doc = ""] # [inline] pub fn convert_from_particles (& self , particles : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . convert_from_particles ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , particles . as_arg_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Each particle's initial color. If [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Each particle's color will vary along this [Gradient]."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles_2d :: DrawOrder (ret) } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_normals (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_normals ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particles will be emitted inside this region. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles_2d :: EmissionShape (ret) } } # [doc = "The sphere's radius if [member emission_shape] is set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normalmap (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_normalmap ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn param_curve (& self , param : i64) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Each particle's initial color. If [member 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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's color will vary along this [Gradient]."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: gradient :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_colors (& self , array : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_normals (& self , array : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_normals ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_points (& self , array : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Particles will be emitted inside this region. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The sphere's radius if [member emission_shape] is set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , random) ; } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normalmap (& self , normalmap : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_normalmap ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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_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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn set_param_curve (& self , param : i64 , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , param , curve . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , randomness) ; } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CPUParticles2D { } unsafe impl GodotObject for CPUParticles2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CPUParticles2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CPUParticles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CPUParticles2D { } impl Instanciable for CPUParticles2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\u{0}" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\u{0}" . as_ptr () as * const c_char) ; table . get_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\u{0}" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\u{0}" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "get_normalmap\u{0}" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\u{0}" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\u{0}" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\u{0}" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\u{0}" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\u{0}" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\u{0}" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\u{0}" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\u{0}" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\u{0}" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\u{0}" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_normalmap\u{0}" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\u{0}" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cpu_particles_2d::CPUParticles2D;
            
            pub mod editor_navigation_mesh_generator {
                use super::*;
                # [doc = "`tools class EditorNavigationMeshGenerator` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editornavigationmeshgenerator.html) 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\nEditorNavigationMeshGenerator 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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorNavigationMeshGenerator { this : RawObject < Self > , } impl EditorNavigationMeshGenerator { # [doc = ""] # [doc = ""] # [inline] pub fn bake (& self , nav_mesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh > , root_node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorNavigationMeshGeneratorMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallptr_void_obj_obj (method_bind , self . this . sys () . as_ptr () , nav_mesh . as_arg_ptr () , root_node . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self , nav_mesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorNavigationMeshGeneratorMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , nav_mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorNavigationMeshGenerator { } unsafe impl GodotObject for EditorNavigationMeshGenerator { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorNavigationMeshGenerator" } } impl std :: ops :: Deref for EditorNavigationMeshGenerator { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorNavigationMeshGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorNavigationMeshGenerator { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorNavigationMeshGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind } impl EditorNavigationMeshGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorNavigationMeshGeneratorMethodTable = EditorNavigationMeshGeneratorMethodTable { 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 = Once :: new () ; INIT . call_once (|| { EditorNavigationMeshGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorNavigationMeshGenerator\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_navigation_mesh_generator::EditorNavigationMeshGenerator;
            
            pub mod popup {
                use super::*;
                # [doc = "`core class Popup` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Popup { pub const NOTIFICATION_POPUP_HIDE : i64 = 81i64 ; pub const NOTIFICATION_POST_POPUP : i64 = 80i64 ; } 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 , thread_access :: 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 [method WindowDialog.get_close_button] or [method ConfirmationDialog.get_cancel] and hide the buttons in question by setting their [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_vec2_f64 (method_bind , self . this . sys () . as_ptr () , size , fallback_ratio) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void (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 [method WindowDialog.get_close_button] or [method ConfirmationDialog.get_cancel] and hide the buttons in question by setting their [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Popup { } unsafe impl GodotObject for Popup { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Popup { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Popup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Popup { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Popup { } unsafe impl SubClass < crate :: generated :: node :: Node > for Popup { } unsafe impl SubClass < crate :: generated :: object :: Object > for Popup { } impl Instanciable for Popup { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . popup = (gd_api . godot_method_bind_get_method) (class_name , "popup\u{0}" . as_ptr () as * const c_char) ; table . popup_centered = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered\u{0}" . as_ptr () as * const c_char) ; table . popup_centered_clamped = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_clamped\u{0}" . as_ptr () as * const c_char) ; table . popup_centered_minsize = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_minsize\u{0}" . as_ptr () as * const c_char) ; table . popup_centered_ratio = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_as_minsize = (gd_api . godot_method_bind_get_method) (class_name , "set_as_minsize\u{0}" . as_ptr () as * const c_char) ; table . set_exclusive = (gd_api . godot_method_bind_get_method) (class_name , "set_exclusive\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::popup::Popup;
            
            pub mod expression {
                use super::*;
                # [doc = "`core class Expression` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].\nIf you defined input variables in [method 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 :: Object > , show_error : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . execute ; let ret = crate :: icalls :: icallptr_var_arr_obj_bool (method_bind , self . this . sys () . as_ptr () , inputs , base_instance . as_arg_ptr () , show_error) ; Variant :: from_sys (ret) } } # [doc = "Returns the error text if [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Parses the expression and returns an [enum Error] 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 : StringArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallptr_i64_str_strarr (method_bind , self . this . sys () . as_ptr () , expression . into () , input_names) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Expression { } unsafe impl GodotObject for Expression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Expression" } } impl std :: ops :: Deref for Expression { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Expression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Expression { } unsafe impl SubClass < crate :: generated :: object :: Object > for Expression { } impl Instanciable for Expression { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_error_text = (gd_api . godot_method_bind_get_method) (class_name , "get_error_text\u{0}" . as_ptr () as * const c_char) ; table . has_execute_failed = (gd_api . godot_method_bind_get_method) (class_name , "has_execute_failed\u{0}" . as_ptr () as * const c_char) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::expression::Expression;
            
            pub mod input {
                use super::*;
                # [doc = "`core singleton class Input` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Input { pub const CURSOR_ARROW : i64 = 0i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const CURSOR_HELP : i64 = 16i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const MOUSE_MODE_CAPTURED : i64 = 2i64 ; pub const MOUSE_MODE_CONFINED : i64 = 3i64 ; pub const MOUSE_MODE_HIDDEN : i64 = 1i64 ; pub const MOUSE_MODE_VISIBLE : i64 = 0i64 ; } 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\u{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 [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate `_input`, use [method 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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , strength) ; } } # [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 :: icallptr_void_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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , mapping . into () , update_existing) ; } } # [doc = "Returns the acceleration of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\nNote this method returns an empty [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 [constant Vector3.ZERO]."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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."] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns an [Array] 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: CursorShape (ret) } } # [doc = "Returns the gravity of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android. On other platforms, it always returns [constant 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current value of the joypad axis at given index (see [enum 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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , axis) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , axis . into ()) ; ret as _ } } # [doc = "Receives a [enum 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , axis_index) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , button . into ()) ; ret as _ } } # [doc = "Receives a gamepad button from [enum 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , device) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and UWP. On other platforms, it always returns [constant 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the mouse mode. See the constants for more information."] # [doc = ""] # [inline] pub fn get_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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: MouseMode (ret) } } # [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."] # [doc = ""] # [inline] pub fn is_action_just_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [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."] # [doc = ""] # [inline] pub fn is_action_just_released (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_released ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [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."] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if you are pressing the joypad button (see [enum 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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , button) ; ret as _ } } # [doc = "Returns `true` if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [doc = "Returns `true` if you are pressing the key. You can pass a [enum KeyList] constant."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; ret as _ } } # [doc = "Returns `true` if you are pressing the mouse button specified with [enum 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , button) ; ret as _ } } # [doc = "Notifies the [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 [signal 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 :: icallptr_void_i64_bool_str_str (method_bind , self . this . sys () . as_ptr () , device , connected , name . into () , guid . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFeeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method 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 :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . parse_input_event ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , guid . into ()) ; } } # [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 [enum 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]s aren't supported as custom mouse cursors. If using an [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 :: 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 :: icallptr_void_obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , shape , hotspot) ; } } # [doc = "Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].\n**Note:** If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.\n**Note:** This method generates an [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "Sets the mouse mode. See the constants 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Enables or disables the accumulation of similar input events sent by the operating system. 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 is enabled by default. It 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."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , device , weak_magnitude , strong_magnitude , duration) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , device) ; } } # [doc = "Vibrate Android and iOS devices.\n**Note:** It needs VIBRATE permission for Android at export settings. iOS does not support duration.\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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , duration_ms) ; } } # [doc = "Sets the mouse position to the specified vector."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Input { } unsafe impl GodotObject for Input { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Input" } } impl std :: ops :: Deref for Input { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Input { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 get_accelerometer : * mut sys :: godot_method_bind , pub get_action_strength : * 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 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 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_custom_mouse_cursor : * mut sys :: godot_method_bind , pub set_default_cursor_shape : * 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 , get_accelerometer : 0 as * mut sys :: godot_method_bind , get_action_strength : 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 , 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 , 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_custom_mouse_cursor : 0 as * mut sys :: godot_method_bind , set_default_cursor_shape : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . action_release = (gd_api . godot_method_bind_get_method) (class_name , "action_release\u{0}" . as_ptr () as * const c_char) ; table . add_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_joy_mapping\u{0}" . as_ptr () as * const c_char) ; table . get_accelerometer = (gd_api . godot_method_bind_get_method) (class_name , "get_accelerometer\u{0}" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\u{0}" . as_ptr () as * const c_char) ; table . get_connected_joypads = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_joypads\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{0}" . as_ptr () as * const c_char) ; table . get_gyroscope = (gd_api . godot_method_bind_get_method) (class_name , "get_gyroscope\u{0}" . as_ptr () as * const c_char) ; table . get_joy_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_joy_guid = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_guid\u{0}" . as_ptr () as * const c_char) ; table . get_joy_name = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_name\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_magnetometer = (gd_api . godot_method_bind_get_method) (class_name , "get_magnetometer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_joy_known = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_known\u{0}" . as_ptr () as * const c_char) ; table . is_key_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_key_pressed\u{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\u{0}" . as_ptr () as * const c_char) ; table . joy_connection_changed = (gd_api . godot_method_bind_get_method) (class_name , "joy_connection_changed\u{0}" . as_ptr () as * const c_char) ; table . parse_input_event = (gd_api . godot_method_bind_get_method) (class_name , "parse_input_event\u{0}" . as_ptr () as * const c_char) ; table . remove_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "remove_joy_mapping\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . start_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "start_joy_vibration\u{0}" . as_ptr () as * const c_char) ; table . stop_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "stop_joy_vibration\u{0}" . as_ptr () as * const c_char) ; table . vibrate_handheld = (gd_api . godot_method_bind_get_method) (class_name , "vibrate_handheld\u{0}" . as_ptr () as * const c_char) ; table . warp_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input::Input;
            
            pub mod texture_3d {
                use super::*;
                # [doc = "`core class Texture3D` inherits `TextureLayered` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture3D { } unsafe impl GodotObject for Texture3D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture3D" } } impl std :: ops :: Deref for Texture3D { type Target = crate :: generated :: texture_layered :: TextureLayered ; # [inline] fn deref (& self) -> & crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture_layered :: TextureLayered > for Texture3D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Texture3D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Texture3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Texture3D { } impl Instanciable for Texture3D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Texture3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Texture3DMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl Texture3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Texture3DMethodTable = Texture3DMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::texture_3d::Texture3D;
            
            pub mod panorama_sky {
                use super::*;
                # [doc = "`core class PanoramaSky` inherits `Sky` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn panorama (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . get_panorama ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "[Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn set_panorama (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . set_panorama ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PanoramaSky" } } impl std :: ops :: Deref for PanoramaSky { type Target = crate :: generated :: sky :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanoramaSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sky :: Sky > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: object :: Object > for PanoramaSky { } impl Instanciable for PanoramaSky { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_panorama = (gd_api . godot_method_bind_get_method) (class_name , "set_panorama\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::panorama_sky::PanoramaSky;
            
            pub mod visual_script_builtin_func {
                use super::*;
                # [doc = "`core class VisualScriptBuiltinFunc` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptBuiltinFunc { pub const BYTES_TO_VAR : i64 = 62i64 ; pub const COLORN : i64 = 63i64 ; pub const FUNC_FUNCREF : i64 = 50i64 ; pub const FUNC_MAX : i64 = 68i64 ; pub const LOGIC_CLAMP : i64 = 47i64 ; pub const LOGIC_MAX : i64 = 45i64 ; pub const LOGIC_MIN : i64 = 46i64 ; pub const LOGIC_NEAREST_PO2 : i64 = 48i64 ; pub const MATH_ABS : i64 = 16i64 ; pub const MATH_ACOS : i64 = 7i64 ; pub const MATH_ASIN : i64 = 6i64 ; pub const MATH_ATAN : i64 = 8i64 ; pub const MATH_ATAN2 : i64 = 9i64 ; pub const MATH_CARTESIAN2POLAR : i64 = 42i64 ; pub const MATH_CEIL : i64 = 14i64 ; pub const MATH_COS : i64 = 1i64 ; pub const MATH_COSH : i64 = 4i64 ; pub const MATH_DB2LINEAR : i64 = 40i64 ; pub const MATH_DECIMALS : i64 = 24i64 ; pub const MATH_DECTIME : i64 = 30i64 ; pub const MATH_DEG2RAD : i64 = 37i64 ; pub const MATH_EASE : i64 = 23i64 ; pub const MATH_EXP : i64 = 20i64 ; pub const MATH_FLOOR : i64 = 13i64 ; pub const MATH_FMOD : i64 = 11i64 ; pub const MATH_FPOSMOD : i64 = 12i64 ; pub const MATH_INVERSE_LERP : i64 = 27i64 ; pub const MATH_ISINF : i64 = 22i64 ; pub const MATH_ISNAN : i64 = 21i64 ; pub const MATH_LERP : i64 = 26i64 ; pub const MATH_LERP_ANGLE : i64 = 66i64 ; pub const MATH_LINEAR2DB : i64 = 39i64 ; pub const MATH_LOG : i64 = 19i64 ; pub const MATH_MOVE_TOWARD : i64 = 29i64 ; pub const MATH_POLAR2CARTESIAN : i64 = 41i64 ; pub const MATH_POSMOD : i64 = 65i64 ; pub const MATH_POW : i64 = 18i64 ; pub const MATH_RAD2DEG : i64 = 38i64 ; pub const MATH_RAND : i64 = 32i64 ; pub const MATH_RANDF : i64 = 33i64 ; pub const MATH_RANDOM : i64 = 34i64 ; pub const MATH_RANDOMIZE : i64 = 31i64 ; pub const MATH_RANDSEED : i64 = 36i64 ; pub const MATH_RANGE_LERP : i64 = 28i64 ; pub const MATH_ROUND : i64 = 15i64 ; pub const MATH_SEED : i64 = 35i64 ; pub const MATH_SIGN : i64 = 17i64 ; pub const MATH_SIN : i64 = 0i64 ; pub const MATH_SINH : i64 = 3i64 ; pub const MATH_SMOOTHSTEP : i64 = 64i64 ; pub const MATH_SQRT : i64 = 10i64 ; pub const MATH_STEPIFY : i64 = 25i64 ; pub const MATH_TAN : i64 = 2i64 ; pub const MATH_TANH : i64 = 5i64 ; pub const MATH_WRAP : i64 = 43i64 ; pub const MATH_WRAPF : i64 = 44i64 ; pub const OBJ_WEAKREF : i64 = 49i64 ; pub const STR_TO_VAR : i64 = 60i64 ; pub const TEXT_CHAR : i64 = 54i64 ; pub const TEXT_ORD : i64 = 67i64 ; pub const TEXT_PRINT : i64 = 56i64 ; pub const TEXT_PRINTERR : i64 = 57i64 ; pub const TEXT_PRINTRAW : i64 = 58i64 ; pub const TEXT_STR : i64 = 55i64 ; pub const TYPE_CONVERT : i64 = 51i64 ; pub const TYPE_EXISTS : i64 = 53i64 ; pub const TYPE_OF : i64 = 52i64 ; pub const VAR_TO_BYTES : i64 = 61i64 ; pub const VAR_TO_STR : i64 = 59i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_builtin_func :: BuiltinFunc (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , which) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptBuiltinFunc { } unsafe impl GodotObject for VisualScriptBuiltinFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptBuiltinFunc" } } impl std :: ops :: Deref for VisualScriptBuiltinFunc { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptBuiltinFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptBuiltinFunc { } impl Instanciable for VisualScriptBuiltinFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_func = (gd_api . godot_method_bind_get_method) (class_name , "set_func\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_builtin_func::VisualScriptBuiltinFunc;
            
            pub mod java_class {
                use super::*;
                # [doc = "`core class JavaClass` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "JavaClass" } } impl std :: ops :: Deref for JavaClass { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaClass { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for JavaClass { } unsafe impl SubClass < crate :: generated :: object :: Object > for JavaClass { } impl Instanciable for JavaClass { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::java_class::JavaClass;
            
            pub mod json {
                use super::*;
                # [doc = "`core singleton class JSON` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] containing the result."] # [doc = ""] # [inline] pub fn parse (& self , json : impl Into < GodotString >) -> Option < Ref < crate :: generated :: json_parse_result :: JSONParseResult , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , json . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: json_parse_result :: JSONParseResult , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nConverts a [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 [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.\nUse `indent` parameter to pretty print the output.\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# 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 :: icallptr_str_var_str_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , indent . into () , sort_keys) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for JSON { } unsafe impl GodotObject for JSON { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSON" } } impl std :: ops :: Deref for JSON { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSON { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . print = (gd_api . godot_method_bind_get_method) (class_name , "print\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::json::JSON;
            
            pub mod tabs {
                use super::*;
                # [doc = "`core class Tabs` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tabs { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_MAX : i64 = 3i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const CLOSE_BUTTON_MAX : i64 = 3i64 ; pub const CLOSE_BUTTON_SHOW_ACTIVE_ONLY : i64 = 1i64 ; pub const CLOSE_BUTTON_SHOW_ALWAYS : i64 = 2i64 ; pub const CLOSE_BUTTON_SHOW_NEVER : i64 = 0i64 ; } 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 , thread_access :: 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . add_tab ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "if `true`, the mouse's scroll wheel cab 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The alignment of all tabs. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tabs :: TabAlign (ret) } } # [doc = "Sets when the close button will appear on the tabs. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tabs :: CloseButtonDisplayPolicy (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ret as _ } } # [doc = "Returns the [Texture] for the tab at index `tab_idx` or `null` if the tab has no [Texture]."] # [doc = ""] # [inline] pub fn get_tab_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns tab [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 :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; mem :: transmute (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 [method set_tab_title]."] # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "if `true`, the mouse's scroll wheel cab 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The alignment of all tabs. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "Sets when the close button will appear on the tabs. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , policy) ; } } # [doc = "If `disabled` is `false`, hides the tab at index `tab_idx`.\n**Note:** Its title text will remain unless it is also removed with [method set_tab_title]."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx , disabled) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , tab_idx , title . into ()) ; } } # [doc = "Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with `set_drag_to_rearrange_enabled(true)`."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , group_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Tabs { } unsafe impl GodotObject for Tabs { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Tabs { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tabs { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Tabs { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Tabs { } unsafe impl SubClass < crate :: generated :: node :: Node > for Tabs { } unsafe impl SubClass < crate :: generated :: object :: Object > for Tabs { } impl Instanciable for Tabs { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . ensure_tab_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_tab_visible\u{0}" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\u{0}" . as_ptr () as * const c_char) ; table . get_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_scrolling_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\u{0}" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\u{0}" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\u{0}" . as_ptr () as * const c_char) ; table . get_tab_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_offset\u{0}" . as_ptr () as * const c_char) ; table . get_tab_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_rect\u{0}" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\u{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\u{0}" . as_ptr () as * const c_char) ; table . move_tab = (gd_api . godot_method_bind_get_method) (class_name , "move_tab\u{0}" . as_ptr () as * const c_char) ; table . remove_tab = (gd_api . godot_method_bind_get_method) (class_name , "remove_tab\u{0}" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_scrolling_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\u{0}" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tabs::Tabs;
            
            pub mod vehicle_wheel {
                use super::*;
                # [doc = "`core class VehicleWheel` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 damping_compression (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_damping_compression ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member damping_compression] property. For a [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 friction_slip (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_friction_slip ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 roll_influence (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_roll_influence ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 steering (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_steering ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 suspension_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_stiffness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 suspension_travel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_travel ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody.steering] and ignored if you are using the per-wheel [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody.engine_force] and ignored if you are using the per-wheel [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , brake) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 [member damping_compression] property. For a [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [doc = "Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , engine_force) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , roll_influence) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , steering) ; } } # [doc = "The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [doc = "If `true`, this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody.steering] and ignored if you are using the per-wheel [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody.engine_force] and ignored if you are using the per-wheel [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VehicleWheel { } unsafe impl GodotObject for VehicleWheel { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VehicleWheel { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VehicleWheel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VehicleWheel { } unsafe impl SubClass < crate :: generated :: node :: Node > for VehicleWheel { } unsafe impl SubClass < crate :: generated :: object :: Object > for VehicleWheel { } impl Instanciable for VehicleWheel { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_damping_compression = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_compression\u{0}" . as_ptr () as * const c_char) ; table . get_damping_relaxation = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_relaxation\u{0}" . as_ptr () as * const c_char) ; table . get_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "get_engine_force\u{0}" . as_ptr () as * const c_char) ; table . get_friction_slip = (gd_api . godot_method_bind_get_method) (class_name , "get_friction_slip\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . get_roll_influence = (gd_api . godot_method_bind_get_method) (class_name , "get_roll_influence\u{0}" . as_ptr () as * const c_char) ; table . get_rpm = (gd_api . godot_method_bind_get_method) (class_name , "get_rpm\u{0}" . as_ptr () as * const c_char) ; table . get_skidinfo = (gd_api . godot_method_bind_get_method) (class_name , "get_skidinfo\u{0}" . as_ptr () as * const c_char) ; table . get_steering = (gd_api . godot_method_bind_get_method) (class_name , "get_steering\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_suspension_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_stiffness\u{0}" . as_ptr () as * const c_char) ; table . get_suspension_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_travel\u{0}" . as_ptr () as * const c_char) ; table . is_in_contact = (gd_api . godot_method_bind_get_method) (class_name , "is_in_contact\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_brake = (gd_api . godot_method_bind_get_method) (class_name , "set_brake\u{0}" . as_ptr () as * const c_char) ; table . set_damping_compression = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_compression\u{0}" . as_ptr () as * const c_char) ; table . set_damping_relaxation = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_relaxation\u{0}" . as_ptr () as * const c_char) ; table . set_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "set_engine_force\u{0}" . as_ptr () as * const c_char) ; table . set_friction_slip = (gd_api . godot_method_bind_get_method) (class_name , "set_friction_slip\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; table . set_roll_influence = (gd_api . godot_method_bind_get_method) (class_name , "set_roll_influence\u{0}" . as_ptr () as * const c_char) ; table . set_steering = (gd_api . godot_method_bind_get_method) (class_name , "set_steering\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_suspension_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_stiffness\u{0}" . as_ptr () as * const c_char) ; table . set_suspension_travel = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_travel\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::vehicle_wheel::VehicleWheel;
            
            pub mod graph_node {
                use super::*;
                # [doc = "`core class GraphNode` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GraphNode { pub const OVERLAY_BREAKPOINT : i64 = 1i64 ; pub const OVERLAY_DISABLED : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Returns the 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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the 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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].\n**Note:** You cannot use position directly, as [GraphEdit] is a [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the overlay shown above the GraphNode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: graph_node :: Overlay (ret) } } # [doc = "Returns the color set to `idx` left (input) slot."] # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the color set to `idx` right (output) slot."] # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the (integer) type of left (input) `idx` slot."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the (integer) type of right (output) `idx` slot."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the [signal 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the [signal 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if left (input) slot `idx` is enabled, `false` otherwise."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if right (output) slot `idx` is enabled, `false` otherwise."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , comment) ; } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].\n**Note:** You cannot use position directly, as [GraphEdit] is a [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Sets the overlay shown above the GraphNode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , overlay) ; } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the [signal 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , resizable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , selected) ; } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the [signal 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } # [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]-derived child to the GraphNode.\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 :: Texture > , custom_right : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot ; let ret = crate :: icalls :: icallptr_void_i64_bool_i64_color_bool_i64_color_obj_obj (method_bind , self . this . sys () . as_ptr () , idx , enable_left , type_left , color_left , enable_right , type_right , color_right , custom_left . as_arg_ptr () , custom_right . as_arg_ptr ()) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GraphNode { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GraphNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for GraphNode { } unsafe impl SubClass < crate :: generated :: control :: Control > for GraphNode { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GraphNode { } unsafe impl SubClass < crate :: generated :: node :: Node > for GraphNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for GraphNode { } impl Instanciable for GraphNode { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_slot = (gd_api . godot_method_bind_get_method) (class_name , "clear_slot\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_overlay = (gd_api . godot_method_bind_get_method) (class_name , "get_overlay\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_comment = (gd_api . godot_method_bind_get_method) (class_name , "is_comment\u{0}" . as_ptr () as * const c_char) ; table . is_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_resizable\u{0}" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_comment = (gd_api . godot_method_bind_get_method) (class_name , "set_comment\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_overlay = (gd_api . godot_method_bind_get_method) (class_name , "set_overlay\u{0}" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\u{0}" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_slot = (gd_api . godot_method_bind_get_method) (class_name , "set_slot\u{0}" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::graph_node::GraphNode;
            
            pub mod editor_property {
                use super::*;
                # [doc = "`tools class EditorProperty` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . add_focusable ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str_var_str_bool (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant () , field . into () , changing) ; } } # [doc = "Gets the edited object."] # [doc = ""] # [inline] pub fn get_edited_object (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_edited_object ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the edited property. If your editor is for a single property (added via [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Override if you want to allow a custom tooltip over your property."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Used by the inspector, set to `true` when the property must draw with error 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adds controls with this function if you want them on the bottom (below the label)."] # [doc = ""] # [inline] pub fn set_bottom_editor (& self , editor : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_bottom_editor ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , checkable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , checked) ; } } # [doc = "Used by the inspector, set to `true` when the property must draw with error 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_red) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , keying) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , read_only) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorProperty { } unsafe impl GodotObject for EditorProperty { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorProperty { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorProperty { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for EditorProperty { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorProperty { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorProperty { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorProperty { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\u{0}" . as_ptr () as * const c_char) ; table . get_edited_object = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_object\u{0}" . as_ptr () as * const c_char) ; table . get_edited_property = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_property\u{0}" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\u{0}" . as_ptr () as * const c_char) ; table . get_tooltip_text = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip_text\u{0}" . as_ptr () as * const c_char) ; table . is_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_checkable\u{0}" . as_ptr () as * const c_char) ; table . is_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_checked\u{0}" . as_ptr () as * const c_char) ; table . is_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_red\u{0}" . as_ptr () as * const c_char) ; table . is_keying = (gd_api . godot_method_bind_get_method) (class_name , "is_keying\u{0}" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\u{0}" . as_ptr () as * const c_char) ; table . set_bottom_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_editor\u{0}" . as_ptr () as * const c_char) ; table . set_checkable = (gd_api . godot_method_bind_get_method) (class_name , "set_checkable\u{0}" . as_ptr () as * const c_char) ; table . set_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_checked\u{0}" . as_ptr () as * const c_char) ; table . set_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_red\u{0}" . as_ptr () as * const c_char) ; table . set_keying = (gd_api . godot_method_bind_get_method) (class_name , "set_keying\u{0}" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\u{0}" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_property::EditorProperty;
            
            pub mod visual_shader_node_color_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeColorUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorUniform { } unsafe impl GodotObject for VisualShaderNodeColorUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorUniform" } } impl std :: ops :: Deref for VisualShaderNodeColorUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorUniform { } impl Instanciable for VisualShaderNodeColorUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeColorUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeColorUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorUniformMethodTable = VisualShaderNodeColorUniformMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_color_uniform::VisualShaderNodeColorUniform;
            
            pub mod editor_import_plugin {
                use super::*;
                # [doc = "`tools class EditorImportPlugin` inherits `ResourceImporter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorImportPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for EditorImportPlugin { } unsafe impl GodotObject for EditorImportPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorImportPlugin" } } impl std :: ops :: Deref for EditorImportPlugin { type Target = crate :: generated :: resource_importer :: ResourceImporter ; # [inline] fn deref (& self) -> & crate :: generated :: resource_importer :: ResourceImporter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorImportPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource_importer :: ResourceImporter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource_importer :: ResourceImporter > for EditorImportPlugin { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorImportPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::editor_import_plugin::EditorImportPlugin;
            
            pub mod theme {
                use super::*;
                # [doc = "`core class Theme` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears the [Color] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn clear_color (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_color ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; } } # [doc = "Clears the constant at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn clear_constant (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_constant ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; } } # [doc = "Clears the [Font] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn clear_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_font ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; } } # [doc = "Clears the icon at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn clear_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_icon ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; } } # [doc = "Clears [StyleBox] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn clear_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_stylebox ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_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 :: icallptr_void (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 :: Theme >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . copy_theme ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , other . as_arg_ptr ()) ; } } # [doc = "Returns the [Color] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn get_color (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; mem :: transmute (ret) } } # [doc = "Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_color_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_color_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the constant at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn get_constant (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_constant_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_constant_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "The theme's default font."] # [doc = ""] # [inline] pub fn default_font (& self) -> Option < Ref < crate :: generated :: font :: Font , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_default_font ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: font :: Font , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the [Font] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn get_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: font :: Font , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: font :: Font , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_font_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_font_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the icon [Texture] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn get_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_icon_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_icon_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the icon [StyleBox] at `name` if the theme has `type`."] # [doc = ""] # [inline] pub fn get_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: style_box :: StyleBox , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox ; let ret = crate :: icalls :: icallptr_obj_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: style_box :: StyleBox , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_stylebox_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has `type`."] # [doc = ""] # [inline] pub fn get_stylebox_types (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox_types ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns all the types in `type` as a [PoolStringArray] for use in any of the `get_*` functions, if the theme has `type`."] # [doc = ""] # [inline] pub fn get_type_list (& self , node_type : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_type_list ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , node_type . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns `true` if [Color] with `name` is in `type`.\nReturns `false` if the theme does not have `type`."] # [doc = ""] # [inline] pub fn has_color (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_color ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if constant with `name` is in `type`.\nReturns `false` if the theme does not have `type`."] # [doc = ""] # [inline] pub fn has_constant (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_constant ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if [Font] with `name` is in `type`.\nReturns `false` if the theme does not have `type`."] # [doc = ""] # [inline] pub fn has_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_font ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if icon [Texture] with `name` is in `type`.\nReturns `false` if the theme does not have `type`."] # [doc = ""] # [inline] pub fn has_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_icon ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Returns `true` if [StyleBox] with `name` is in `type`.\nReturns `false` if the theme does not have `type`."] # [doc = ""] # [inline] pub fn has_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_stylebox ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into ()) ; ret as _ } } # [doc = "Sets the theme's [Color] to `color` at `name` in `type`.\nDoes nothing if the theme does not have `type`."] # [doc = ""] # [inline] pub fn set_color (& self , name : impl Into < GodotString > , node_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 :: icallptr_void_str_str_color (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into () , color) ; } } # [doc = "Sets the theme's constant to `constant` at `name` in `type`.\nDoes nothing if the theme does not have `type`."] # [doc = ""] # [inline] pub fn set_constant (& self , name : impl Into < GodotString > , node_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 :: icallptr_void_str_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into () , constant) ; } } # [doc = "The theme's default font."] # [doc = ""] # [inline] pub fn set_default_font (& self , font : impl AsArg < crate :: generated :: font :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_default_font ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Sets the theme's [Font] to `font` at `name` in `type`.\nDoes nothing if the theme does not have `type`."] # [doc = ""] # [inline] pub fn set_font (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString > , font : impl AsArg < crate :: generated :: font :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_font ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into () , font . as_arg_ptr ()) ; } } # [doc = "Sets the theme's icon [Texture] to `texture` at `name` in `type`.\nDoes nothing if the theme does not have `type`."] # [doc = ""] # [inline] pub fn set_icon (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into () , texture . as_arg_ptr ()) ; } } # [doc = "Sets theme's [StyleBox] to `stylebox` at `name` in `type`.\nDoes nothing if the theme does not have `type`."] # [doc = ""] # [inline] pub fn set_stylebox (& self , name : impl Into < GodotString > , node_type : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: style_box :: StyleBox >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_stylebox ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , node_type . into () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Theme { } unsafe impl GodotObject for Theme { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Theme" } } impl std :: ops :: Deref for Theme { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Theme { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Theme { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Theme { } unsafe impl SubClass < crate :: generated :: object :: Object > for Theme { } impl Instanciable for Theme { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Theme :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ThemeMethodTable { pub class_constructor : sys :: godot_class_constructor , 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 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_constant : * mut sys :: godot_method_bind , pub get_constant_list : * 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_icon : * mut sys :: godot_method_bind , pub get_icon_list : * 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_type_list : * mut sys :: godot_method_bind , pub has_color : * mut sys :: godot_method_bind , pub has_constant : * 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 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 } impl ThemeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ThemeMethodTable = ThemeMethodTable { class_constructor : None , 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 , 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_constant : 0 as * mut sys :: godot_method_bind , get_constant_list : 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_icon : 0 as * mut sys :: godot_method_bind , get_icon_list : 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_type_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_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 , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_color = (gd_api . godot_method_bind_get_method) (class_name , "clear_color\u{0}" . as_ptr () as * const c_char) ; table . clear_constant = (gd_api . godot_method_bind_get_method) (class_name , "clear_constant\u{0}" . as_ptr () as * const c_char) ; table . clear_font = (gd_api . godot_method_bind_get_method) (class_name , "clear_font\u{0}" . as_ptr () as * const c_char) ; table . clear_icon = (gd_api . godot_method_bind_get_method) (class_name , "clear_icon\u{0}" . as_ptr () as * const c_char) ; table . clear_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "clear_stylebox\u{0}" . as_ptr () as * const c_char) ; table . copy_default_theme = (gd_api . godot_method_bind_get_method) (class_name , "copy_default_theme\u{0}" . as_ptr () as * const c_char) ; table . copy_theme = (gd_api . godot_method_bind_get_method) (class_name , "copy_theme\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_color_list = (gd_api . godot_method_bind_get_method) (class_name , "get_color_list\u{0}" . as_ptr () as * const c_char) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\u{0}" . as_ptr () as * const c_char) ; table . get_constant_list = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_list\u{0}" . as_ptr () as * const c_char) ; table . get_default_font = (gd_api . godot_method_bind_get_method) (class_name , "get_default_font\u{0}" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\u{0}" . as_ptr () as * const c_char) ; table . get_font_list = (gd_api . godot_method_bind_get_method) (class_name , "get_font_list\u{0}" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\u{0}" . as_ptr () as * const c_char) ; table . get_icon_list = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_list\u{0}" . as_ptr () as * const c_char) ; table . get_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox\u{0}" . as_ptr () as * const c_char) ; table . get_stylebox_list = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox_list\u{0}" . as_ptr () as * const c_char) ; table . get_stylebox_types = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox_types\u{0}" . as_ptr () as * const c_char) ; table . get_type_list = (gd_api . godot_method_bind_get_method) (class_name , "get_type_list\u{0}" . as_ptr () as * const c_char) ; table . has_color = (gd_api . godot_method_bind_get_method) (class_name , "has_color\u{0}" . as_ptr () as * const c_char) ; table . has_constant = (gd_api . godot_method_bind_get_method) (class_name , "has_constant\u{0}" . as_ptr () as * const c_char) ; table . has_font = (gd_api . godot_method_bind_get_method) (class_name , "has_font\u{0}" . as_ptr () as * const c_char) ; table . has_icon = (gd_api . godot_method_bind_get_method) (class_name , "has_icon\u{0}" . as_ptr () as * const c_char) ; table . has_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; table . set_default_font = (gd_api . godot_method_bind_get_method) (class_name , "set_default_font\u{0}" . as_ptr () as * const c_char) ; table . set_font = (gd_api . godot_method_bind_get_method) (class_name , "set_font\u{0}" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\u{0}" . as_ptr () as * const c_char) ; table . set_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "set_stylebox\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::theme::Theme;
            
            pub mod external_texture {
                use super::*;
                # [doc = "`core class ExternalTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ExternalTexture { } unsafe impl GodotObject for ExternalTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ExternalTexture" } } impl std :: ops :: Deref for ExternalTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ExternalTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ExternalTexture { } impl Instanciable for ExternalTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::external_texture::ExternalTexture;
            
            pub mod audio_effect_high_pass_filter {
                use super::*;
                # [doc = "`core class AudioEffectHighPassFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectHighPassFilter" } } impl std :: ops :: Deref for AudioEffectHighPassFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectHighPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectHighPassFilter { } impl Instanciable for AudioEffectHighPassFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_high_pass_filter::AudioEffectHighPassFilter;
            
            pub mod engine {
                use super::*;
                # [doc = "`core singleton class Engine` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the total number of frames drawn. If the render loop is disabled with `--disable-render-loop` via command line, this returns `0`. See also [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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 [method get_frames_drawn]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [method 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 tunneling issues, but keep in mind doing so will increase CPU usage."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the main loop object (see [MainLoop] and [SceneTree])."] # [doc = ""] # [inline] pub fn get_main_loop (& self) -> Option < Ref < crate :: generated :: main_loop :: MainLoop , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_main_loop ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: main_loop :: MainLoop , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the total number of frames passed since engine initialization which is advanced on each **physics frame**."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 in-game clock and real clock, but allows to 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."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 time_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_time_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "If `true`, it is running inside the editor. Useful for tool scripts."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, it is running inside the editor. Useful for tool scripts."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [method 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 tunneling issues, but keep in mind doing so will increase CPU usage."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , iterations_per_second) ; } } # [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 in-game clock and real clock, but allows to 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."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , physics_jitter_fix) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , target_fps) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Engine { } unsafe impl GodotObject for Engine { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Engine" } } impl std :: ops :: Deref for Engine { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Engine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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_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 , 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_copyright_info = (gd_api . godot_method_bind_get_method) (class_name , "get_copyright_info\u{0}" . as_ptr () as * const c_char) ; table . get_donor_info = (gd_api . godot_method_bind_get_method) (class_name , "get_donor_info\u{0}" . as_ptr () as * const c_char) ; table . get_frames_drawn = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_drawn\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_idle_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_idle_frames\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_license_info = (gd_api . godot_method_bind_get_method) (class_name , "get_license_info\u{0}" . as_ptr () as * const c_char) ; table . get_license_text = (gd_api . godot_method_bind_get_method) (class_name , "get_license_text\u{0}" . as_ptr () as * const c_char) ; table . get_main_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_main_loop\u{0}" . as_ptr () as * const c_char) ; table . get_physics_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_frames\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\u{0}" . as_ptr () as * const c_char) ; table . get_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_target_fps\u{0}" . as_ptr () as * const c_char) ; table . get_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_time_scale\u{0}" . as_ptr () as * const c_char) ; table . get_version_info = (gd_api . godot_method_bind_get_method) (class_name , "get_version_info\u{0}" . as_ptr () as * const c_char) ; table . has_singleton = (gd_api . godot_method_bind_get_method) (class_name , "has_singleton\u{0}" . as_ptr () as * const c_char) ; table . is_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_hint\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_hint\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_target_fps\u{0}" . as_ptr () as * const c_char) ; table . set_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_time_scale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::engine::Engine;
            
            pub mod skeleton_ik {
                use super::*;
                # [doc = "`core class SkeletonIK` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_parent_skeleton (& self) -> Option < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_parent_skeleton ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , interpolation) ; } } # [doc = ""] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , local_position) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , iterations) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min_distance) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , root_bone . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , target) ; } } # [doc = ""] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , tip_bone . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _use) ; } } # [doc = "\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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , one_time) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SkeletonIK { } unsafe impl GodotObject for SkeletonIK { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SkeletonIK { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkeletonIK { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for SkeletonIK { } unsafe impl SubClass < crate :: generated :: object :: Object > for SkeletonIK { } impl Instanciable for SkeletonIK { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "get_magnet_position\u{0}" . as_ptr () as * const c_char) ; table . get_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "get_max_iterations\u{0}" . as_ptr () as * const c_char) ; table . get_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_min_distance\u{0}" . as_ptr () as * const c_char) ; table . get_parent_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_skeleton\u{0}" . as_ptr () as * const c_char) ; table . get_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_root_bone\u{0}" . as_ptr () as * const c_char) ; table . get_target_node = (gd_api . godot_method_bind_get_method) (class_name , "get_target_node\u{0}" . as_ptr () as * const c_char) ; table . get_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_target_transform\u{0}" . as_ptr () as * const c_char) ; table . get_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_tip_bone\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\u{0}" . as_ptr () as * const c_char) ; table . is_using_magnet = (gd_api . godot_method_bind_get_method) (class_name , "is_using_magnet\u{0}" . as_ptr () as * const c_char) ; table . set_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation\u{0}" . as_ptr () as * const c_char) ; table . set_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "set_magnet_position\u{0}" . as_ptr () as * const c_char) ; table . set_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_max_iterations\u{0}" . as_ptr () as * const c_char) ; table . set_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_min_distance\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_root_bone\u{0}" . as_ptr () as * const c_char) ; table . set_target_node = (gd_api . godot_method_bind_get_method) (class_name , "set_target_node\u{0}" . as_ptr () as * const c_char) ; table . set_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_target_transform\u{0}" . as_ptr () as * const c_char) ; table . set_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_tip_bone\u{0}" . as_ptr () as * const c_char) ; table . set_use_magnet = (gd_api . godot_method_bind_get_method) (class_name , "set_use_magnet\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::skeleton_ik::SkeletonIK;
            
            pub mod option_button {
                use super::*;
                # [doc = "`core class OptionButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: 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 :: icallptr_void_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id) ; } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all the items in the [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 :: icallptr_void (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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [PopupMenu] contained in this button."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the ID of the selected item, or `0` 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets the metadata of the selected item. Metadata for items can be set using [method 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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Selects an item by index and makes it the current item. This will work even if the item is disabled."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , disabled) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , id) ; } } # [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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OptionButton { } unsafe impl GodotObject for OptionButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for OptionButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OptionButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for OptionButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for OptionButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for OptionButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for OptionButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for OptionButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for OptionButton { } impl Instanciable for OptionButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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 } 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_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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\u{0}" . as_ptr () as * const c_char) ; table . add_separator = (gd_api . godot_method_bind_get_method) (class_name , "add_separator\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\u{0}" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\u{0}" . as_ptr () as * const c_char) ; table . get_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_item_id\u{0}" . as_ptr () as * const c_char) ; table . get_item_index = (gd_api . godot_method_bind_get_method) (class_name , "get_item_index\u{0}" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\u{0}" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\u{0}" . as_ptr () as * const c_char) ; table . get_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_selected\u{0}" . as_ptr () as * const c_char) ; table . get_selected_id = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_id\u{0}" . as_ptr () as * const c_char) ; table . get_selected_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_metadata\u{0}" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\u{0}" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\u{0}" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\u{0}" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\u{0}" . as_ptr () as * const c_char) ; table . set_item_id = (gd_api . godot_method_bind_get_method) (class_name , "set_item_id\u{0}" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::option_button::OptionButton;
            
            pub mod packet_peer {
                use super::*;
                # [doc = "`core class PacketPeer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method 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]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a raw packet."] # [doc = ""] # [inline] pub fn get_packet (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the error state of the last packet received (via [method get_packet] and [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Gets a Variant. If `allow_objects` (or [member 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 :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sends a raw packet."] # [doc = ""] # [inline] pub fn put_packet (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_packet ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sends a [Variant] as a packet. If `full_objects` (or [member 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 :: icallptr_i64_var_bool (method_bind , self . this . sys () . as_ptr () , var . owned_to_variant () , full_objects) ; GodotError :: result_from_sys (ret as _) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method 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]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeer { } unsafe impl GodotObject for PacketPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeer" } } impl std :: ops :: Deref for PacketPeer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_packet = (gd_api . godot_method_bind_get_method) (class_name , "get_packet\u{0}" . as_ptr () as * const c_char) ; table . get_packet_error = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_error\u{0}" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\u{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\u{0}" . as_ptr () as * const c_char) ; table . put_packet = (gd_api . godot_method_bind_get_method) (class_name , "put_packet\u{0}" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packet_peer::PacketPeer;
            
            pub mod visual_script_constant {
                use super::*;
                # [doc = "`core class VisualScriptConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptConstant" } } impl std :: ops :: Deref for VisualScriptConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptConstant { } impl Instanciable for VisualScriptConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_constant_value = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_value\u{0}" . as_ptr () as * const c_char) ; table . set_constant_type = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_type\u{0}" . as_ptr () as * const c_char) ; table . set_constant_value = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_value\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_constant::VisualScriptConstant;
            
            pub mod visual_script_input_action {
                use super::*;
                # [doc = "`core class VisualScriptInputAction` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptInputAction { pub const MODE_JUST_PRESSED : i64 = 2i64 ; pub const MODE_JUST_RELEASED : i64 = 3i64 ; pub const MODE_PRESSED : i64 = 0i64 ; pub const MODE_RELEASED : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_input_action :: Mode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptInputAction" } } impl std :: ops :: Deref for VisualScriptInputAction { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptInputAction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptInputAction { } impl Instanciable for VisualScriptInputAction { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_action_name\u{0}" . as_ptr () as * const c_char) ; table . set_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_action_mode\u{0}" . as_ptr () as * const c_char) ; table . set_action_name = (gd_api . godot_method_bind_get_method) (class_name , "set_action_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_input_action::VisualScriptInputAction;
            
            pub mod tree_item {
                use super::*;
                # [doc = "`core class TreeItem` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TreeItem { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const CELL_MODE_CHECK : i64 = 1i64 ; pub const CELL_MODE_CUSTOM : i64 = 4i64 ; pub const CELL_MODE_ICON : i64 = 3i64 ; pub const CELL_MODE_RANGE : i64 = 2i64 ; pub const CELL_MODE_STRING : i64 = 0i64 ; } impl TreeItem { # [doc = "Adds a button with [Texture] `button` at column `column`. The `button_idx` index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be `disabled` and have a `tooltip`.\n# Default Arguments\n* `button_idx` - `-1`\n* `disabled` - `false`\n* `tooltip` - `\"\"`"] # [doc = ""] # [inline] pub fn add_button (& self , column : i64 , button : impl AsArg < crate :: generated :: texture :: Texture > , button_idx : 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 :: icallptr_void_i64_obj_i64_bool_str (method_bind , self . this . sys () . as_ptr () , column , button . as_arg_ptr () , button_idx , disabled , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , column) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , column) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , column) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , button_idx) ; } } # [doc = "Returns the [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , button_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of buttons in column `column`. May be used to get the most recently added button's index, if no index was specified."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , button_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; crate :: generated :: tree_item :: TreeCellMode (ret) } } # [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 :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_children ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , column) ; mem :: transmute (ret) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , column) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [doc = "Returns the given column's icon [Texture]. Error if no icon is set."] # [doc = ""] # [inline] pub fn get_icon (& self , column : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [doc = "Returns the [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , column) ; mem :: transmute (ret) } } # [doc = "Returns the icon [Texture] region as [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 :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , column) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , column) ; Variant :: from_sys (ret) } } # [doc = "Returns the next TreeItem in the tree or a null object if there is none."] # [doc = ""] # [inline] pub fn get_next (& self) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_next ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the next visible 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 :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_next_visible ; let ret = crate :: icalls :: icallptr_obj_bool (method_bind , self . this . sys () . as_ptr () , wrap) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the parent TreeItem or a null object if there is none."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the previous TreeItem in the tree or a null object if there is none."] # [doc = ""] # [inline] pub fn get_prev (& self) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_prev ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the previous visible 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 :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_prev_visible ; let ret = crate :: icalls :: icallptr_obj_bool (method_bind , self . this . sys () . as_ptr () , wrap) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [doc = ""] # [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 :: icallptr_dict_i64 (method_bind , self . this . sys () . as_ptr () , column) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , column) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , column) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; crate :: generated :: tree_item :: TextAlign (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , column) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , button_idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [doc = "Moves this TreeItem to the bottom in the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Moves this TreeItem to the top in the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free]."] # [doc = ""] # [inline] pub fn remove_child (& self , child : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . remove_child ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , column) ; } } # [doc = "Sets the given column's button [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_button ; let ret = crate :: icalls :: icallptr_void_i64_i64_obj (method_bind , self . this . sys () . as_ptr () , column , button_idx , 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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , column , button_idx , disabled) ; } } # [doc = "Sets the given column's cell mode to `mode`. See [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , mode) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , checked) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , enable) ; } } # [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 :: icallptr_void_i64_color_bool (method_bind , self . this . sys () . as_ptr () , column , color , just_outline) ; } } # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , column , color) ; } } # [doc = "Sets the given column's custom draw callback to `callback` method on `object`.\nThe `callback` should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2]."] # [doc = ""] # [inline] pub fn set_custom_draw (& self , column : i64 , object : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_i64_obj_str (method_bind , self . this . sys () . as_ptr () , column , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , enabled) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , enable) ; } } # [doc = "Sets the given column's icon [Texture]."] # [doc = ""] # [inline] pub fn set_icon (& self , column : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , column , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , width) ; } } # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , column , 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 :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , column , region) ; } } # [doc = ""] # [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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , column , meta . owned_to_variant ()) ; } } # [doc = ""] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , column , value) ; } } # [doc = "\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 :: icallptr_void_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , column , min , max , step , expr) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , selectable) ; } } # [doc = ""] # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , column , text . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , column , text . into ()) ; } } # [doc = "Sets the given column's text alignment. See [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , text_align) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , column , tooltip . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TreeItem { } unsafe impl GodotObject for TreeItem { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TreeItem" } } impl std :: ops :: Deref for TreeItem { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TreeItem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_count : * 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_count : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . call_recursive = (gd_api . godot_method_bind_get_method) (class_name , "call_recursive\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "clear_custom_color\u{0}" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\u{0}" . as_ptr () as * const c_char) ; table . erase_button = (gd_api . godot_method_bind_get_method) (class_name , "erase_button\u{0}" . as_ptr () as * const c_char) ; table . get_button = (gd_api . godot_method_bind_get_method) (class_name , "get_button\u{0}" . as_ptr () as * const c_char) ; table . get_button_count = (gd_api . godot_method_bind_get_method) (class_name , "get_button_count\u{0}" . as_ptr () as * const c_char) ; table . get_button_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_button_tooltip\u{0}" . as_ptr () as * const c_char) ; table . get_cell_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_mode\u{0}" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_expand_right = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_right\u{0}" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_modulate\u{0}" . as_ptr () as * const c_char) ; table . get_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_region\u{0}" . as_ptr () as * const c_char) ; table . get_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\u{0}" . as_ptr () as * const c_char) ; table . get_next_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_next_visible\u{0}" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\u{0}" . as_ptr () as * const c_char) ; table . get_prev = (gd_api . godot_method_bind_get_method) (class_name , "get_prev\u{0}" . as_ptr () as * const c_char) ; table . get_prev_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_prev_visible\u{0}" . as_ptr () as * const c_char) ; table . get_range = (gd_api . godot_method_bind_get_method) (class_name , "get_range\u{0}" . as_ptr () as * const c_char) ; table . get_range_config = (gd_api . godot_method_bind_get_method) (class_name , "get_range_config\u{0}" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{0}" . as_ptr () as * const c_char) ; table . get_text_align = (gd_api . godot_method_bind_get_method) (class_name , "get_text_align\u{0}" . as_ptr () as * const c_char) ; table . get_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip\u{0}" . as_ptr () as * const c_char) ; table . is_button_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_button_disabled\u{0}" . as_ptr () as * const c_char) ; table . is_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_checked\u{0}" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\u{0}" . as_ptr () as * const c_char) ; table . is_folding_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_folding_disabled\u{0}" . as_ptr () as * const c_char) ; table . is_selectable = (gd_api . godot_method_bind_get_method) (class_name , "is_selectable\u{0}" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\u{0}" . as_ptr () as * const c_char) ; table . move_to_bottom = (gd_api . godot_method_bind_get_method) (class_name , "move_to_bottom\u{0}" . as_ptr () as * const c_char) ; table . move_to_top = (gd_api . godot_method_bind_get_method) (class_name , "move_to_top\u{0}" . as_ptr () as * const c_char) ; table . remove_child = (gd_api . godot_method_bind_get_method) (class_name , "remove_child\u{0}" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\u{0}" . as_ptr () as * const c_char) ; table . set_button = (gd_api . godot_method_bind_get_method) (class_name , "set_button\u{0}" . as_ptr () as * const c_char) ; table . set_button_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_button_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_cell_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_mode\u{0}" . as_ptr () as * const c_char) ; table . set_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_checked\u{0}" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_color\u{0}" . as_ptr () as * const c_char) ; table . set_custom_draw = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_draw\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_disable_folding = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_folding\u{0}" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\u{0}" . as_ptr () as * const c_char) ; table . set_expand_right = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_right\u{0}" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_modulate\u{0}" . as_ptr () as * const c_char) ; table . set_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_region\u{0}" . as_ptr () as * const c_char) ; table . set_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_metadata\u{0}" . as_ptr () as * const c_char) ; table . set_range = (gd_api . godot_method_bind_get_method) (class_name , "set_range\u{0}" . as_ptr () as * const c_char) ; table . set_range_config = (gd_api . godot_method_bind_get_method) (class_name , "set_range_config\u{0}" . as_ptr () as * const c_char) ; table . set_selectable = (gd_api . godot_method_bind_get_method) (class_name , "set_selectable\u{0}" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_text_align = (gd_api . godot_method_bind_get_method) (class_name , "set_text_align\u{0}" . as_ptr () as * const c_char) ; table . set_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_tooltip\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tree_item::TreeItem;
            
            pub mod visibility_notifier {
                use super::*;
                # [doc = "`core class VisibilityNotifier` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier { } unsafe impl GodotObject for VisibilityNotifier { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityNotifier { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityNotifier { } impl Instanciable for VisibilityNotifier { # [inline] fn construct () -> Ref < Self , thread_access :: 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 is_on_screen : * mut sys :: godot_method_bind , pub set_aabb : * 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 , is_on_screen : 0 as * mut sys :: godot_method_bind , set_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\u{0}" . as_ptr () as * const c_char) ; table . set_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_aabb\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visibility_notifier::VisibilityNotifier;
            
            pub mod audio_stream_playback {
                use super::*;
                # [doc = "`core class AudioStreamPlayback` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl AudioStreamPlayback { } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayback { } unsafe impl GodotObject for AudioStreamPlayback { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayback" } } impl std :: ops :: Deref for AudioStreamPlayback { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamPlayback { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayback { }
            }
            pub use crate::generated::audio_stream_playback::AudioStreamPlayback;
            
            pub mod input_event_with_modifiers {
                use super::*;
                # [doc = "`core class InputEventWithModifiers` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventWithModifiers { } unsafe impl GodotObject for InputEventWithModifiers { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventWithModifiers" } } impl std :: ops :: Deref for InputEventWithModifiers { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventWithModifiers { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_command = (gd_api . godot_method_bind_get_method) (class_name , "get_command\u{0}" . as_ptr () as * const c_char) ; table . get_control = (gd_api . godot_method_bind_get_method) (class_name , "get_control\u{0}" . as_ptr () as * const c_char) ; table . get_metakey = (gd_api . godot_method_bind_get_method) (class_name , "get_metakey\u{0}" . as_ptr () as * const c_char) ; table . get_shift = (gd_api . godot_method_bind_get_method) (class_name , "get_shift\u{0}" . as_ptr () as * const c_char) ; table . set_alt = (gd_api . godot_method_bind_get_method) (class_name , "set_alt\u{0}" . as_ptr () as * const c_char) ; table . set_command = (gd_api . godot_method_bind_get_method) (class_name , "set_command\u{0}" . as_ptr () as * const c_char) ; table . set_control = (gd_api . godot_method_bind_get_method) (class_name , "set_control\u{0}" . as_ptr () as * const c_char) ; table . set_metakey = (gd_api . godot_method_bind_get_method) (class_name , "set_metakey\u{0}" . as_ptr () as * const c_char) ; table . set_shift = (gd_api . godot_method_bind_get_method) (class_name , "set_shift\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_with_modifiers::InputEventWithModifiers;
            
            pub mod input_default {
                use super::*;
                # [doc = "`core class InputDefault` inherits `Input` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl InputDefault { } impl gdnative_core :: private :: godot_object :: Sealed for InputDefault { } unsafe impl GodotObject for InputDefault { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InputDefault" } } impl std :: ops :: Deref for InputDefault { type Target = crate :: generated :: input :: Input ; # [inline] fn deref (& self) -> & crate :: generated :: input :: Input { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputDefault { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input :: Input { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input :: Input > for InputDefault { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputDefault { }
            }
            pub use crate::generated::input_default::InputDefault;
            
            pub mod physics_body {
                use super::*;
                # [doc = "`core class PhysicsBody` inherits `CollisionObject` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_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 = "The physics layers this area 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 [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the [member collision_layer]."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the [member collision_mask]."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = "The physics layers this area 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 [member 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = PhysicsBodyMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Sets individual bits on the [member collision_layer] bitmask. 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 = PhysicsBodyMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 = PhysicsBodyMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Sets individual bits on the [member collision_mask] bitmask. 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 = PhysicsBodyMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsBody { } unsafe impl GodotObject for PhysicsBody { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PhysicsBody { type Target = crate :: generated :: collision_object :: CollisionObject ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: object :: 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 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 remove_collision_exception_with : * 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 } 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 , 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 , remove_collision_exception_with : 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_body::PhysicsBody;
            
            pub mod editor_plugin {
                use super::*;
                # [doc = "`tools class EditorPlugin` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorPlugin { pub const CONTAINER_CANVAS_EDITOR_BOTTOM : i64 = 8i64 ; pub const CONTAINER_CANVAS_EDITOR_MENU : i64 = 5i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_LEFT : i64 = 6i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_RIGHT : i64 = 7i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_LEFT : i64 = 10i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_RIGHT : i64 = 11i64 ; pub const CONTAINER_PROPERTY_EDITOR_BOTTOM : i64 = 9i64 ; pub const CONTAINER_SPATIAL_EDITOR_BOTTOM : i64 = 4i64 ; pub const CONTAINER_SPATIAL_EDITOR_MENU : i64 = 1i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_LEFT : i64 = 2i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT : i64 = 3i64 ; pub const CONTAINER_TOOLBAR : i64 = 0i64 ; pub const DOCK_SLOT_LEFT_BL : i64 = 1i64 ; pub const DOCK_SLOT_LEFT_BR : i64 = 3i64 ; pub const DOCK_SLOT_LEFT_UL : i64 = 0i64 ; pub const DOCK_SLOT_LEFT_UR : i64 = 2i64 ; pub const DOCK_SLOT_MAX : i64 = 8i64 ; pub const DOCK_SLOT_RIGHT_BL : i64 = 5i64 ; pub const DOCK_SLOT_RIGHT_BR : i64 = 7i64 ; pub const DOCK_SLOT_RIGHT_UL : i64 = 4i64 ; pub const DOCK_SLOT_RIGHT_UR : i64 = 6i64 ; } 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 :: icallptr_void_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 [method remove_control_from_bottom_panel] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_bottom_panel (& self , control : impl AsArg < crate :: generated :: control :: Control > , title : impl Into < GodotString >) -> Option < Ref < crate :: generated :: tool_button :: ToolButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_bottom_panel ; let ret = crate :: icalls :: icallptr_obj_obj_str (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr () , title . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tool_button :: ToolButton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Adds a custom control to a container (see [enum 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 [method remove_control_from_container] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_container (& self , container : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_container ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , container , control . as_arg_ptr ()) ; } } # [doc = "Adds the control to a specific dock slot (see [enum 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 [method remove_control_from_docks] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_dock (& self , slot : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_dock ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , slot , 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 [method 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 :: Script > , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_custom_type ; let ret = crate :: icalls :: icallptr_void_str_str_obj_obj (method_bind , self . this . sys () . as_ptr () , _type . into () , base . into () , script . as_arg_ptr () , icon . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_export_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_export_plugin :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_export_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_import_plugin (& self , importer : impl AsArg < crate :: generated :: editor_import_plugin :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_inspector_plugin :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_inspector_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: editor_scene_importer :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_scene_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallptr_void_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 :: 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 :: icallptr_void_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]. 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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_tool_submenu_item ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , submenu . as_arg_ptr ()) ; } } # [doc = "Returns the [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 :: editor_interface :: EditorInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_editor_interface ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_interface :: EditorInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the Editor's dialogue used for making scripts.\n**Note:** Users can configure it before use."] # [doc = ""] # [inline] pub fn get_script_create_dialog (& self) -> Option < Ref < crate :: generated :: script_create_dialog :: ScriptCreateDialog , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_script_create_dialog ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script_create_dialog :: ScriptCreateDialog , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: undo_redo :: UndoRedo , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_undo_redo ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: undo_redo :: UndoRedo , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn make_bottom_panel_item_visible (& self , item : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . make_bottom_panel_item_visible ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_bottom_panel (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_bottom_panel ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the specified container. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_container (& self , container : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_container ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , container , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the dock. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_docks (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_docks ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes a custom type added by [method 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_export_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_export_plugin :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_export_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_import_plugin (& self , importer : impl AsArg < crate :: generated :: editor_import_plugin :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_inspector_plugin :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_inspector_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: editor_scene_importer :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_scene_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Use this method if you always want to receive inputs from 3D view screen inside [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the overlays of the editor (2D/3D) viewport."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorPlugin { } unsafe impl GodotObject for EditorPlugin { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorPlugin { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_type\u{0}" . as_ptr () as * const c_char) ; table . add_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_export_plugin\u{0}" . as_ptr () as * const c_char) ; table . add_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_import_plugin\u{0}" . as_ptr () as * const c_char) ; table . add_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_inspector_plugin\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_editor_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_interface\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_undo_redo = (gd_api . godot_method_bind_get_method) (class_name , "get_undo_redo\u{0}" . as_ptr () as * const c_char) ; table . hide_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "hide_bottom_panel\u{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\u{0}" . as_ptr () as * const c_char) ; table . queue_save_layout = (gd_api . godot_method_bind_get_method) (class_name , "queue_save_layout\u{0}" . as_ptr () as * const c_char) ; table . remove_autoload_singleton = (gd_api . godot_method_bind_get_method) (class_name , "remove_autoload_singleton\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_type\u{0}" . as_ptr () as * const c_char) ; table . remove_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_export_plugin\u{0}" . as_ptr () as * const c_char) ; table . remove_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_import_plugin\u{0}" . as_ptr () as * const c_char) ; table . remove_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_inspector_plugin\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . update_overlays = (gd_api . godot_method_bind_get_method) (class_name , "update_overlays\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_plugin::EditorPlugin;
            
            pub mod audio_effect_pitch_shift {
                use super::*;
                # [doc = "`core class AudioEffectPitchShift` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectPitchShift { pub const FFT_SIZE_1024 : i64 = 2i64 ; pub const FFT_SIZE_2048 : i64 = 3i64 ; pub const FFT_SIZE_256 : i64 = 0i64 ; pub const FFT_SIZE_4096 : i64 = 4i64 ; pub const FFT_SIZE_512 : i64 = 1i64 ; 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 , thread_access :: 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 = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_pitch_shift :: FftSize (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves)."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves)."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rate) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPitchShift { } unsafe impl GodotObject for AudioEffectPitchShift { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPitchShift" } } impl std :: ops :: Deref for AudioEffectPitchShift { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPitchShift { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPitchShift { } impl Instanciable for AudioEffectPitchShift { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "get_oversampling\u{0}" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . set_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fft_size\u{0}" . as_ptr () as * const c_char) ; table . set_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_oversampling\u{0}" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_pitch_shift::AudioEffectPitchShift;
            
            pub mod spot_light {
                use super::*;
                # [doc = "`core class SpotLight` inherits `Light` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpotLight { type Target = crate :: generated :: light :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpotLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: light :: Light > for SpotLight { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for SpotLight { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SpotLight { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpotLight { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpotLight { } impl Instanciable for SpotLight { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::spot_light::SpotLight;
            
            pub mod navigation_2d {
                use super::*;
                # [doc = "`core class Navigation2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [doc = "Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or `null` if the `owner` parameter was omitted)."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector2) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallptr_obj_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns 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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize) ; Vector2Array :: from_sys (ret) } } # [doc = "Adds a [NavigationPolygon]. Returns an ID for use with [method navpoly_remove] or [method navpoly_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional `owner` is used as return value for [method get_closest_point_owner].\n# Default Arguments\n* `owner` - `null`"] # [doc = ""] # [inline] pub fn navpoly_add (& self , mesh : impl AsArg < crate :: generated :: navigation_polygon :: NavigationPolygon > , xform : Transform2D , owner : impl AsArg < crate :: generated :: object :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_add ; let ret = crate :: icalls :: icallptr_i64_obj_trans2D_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , xform , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "Removes the [NavigationPolygon] with the given ID."] # [doc = ""] # [inline] pub fn navpoly_remove (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the transform applied to the [NavigationPolygon] with the given ID."] # [doc = ""] # [inline] pub fn navpoly_set_transform (& self , id : i64 , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_set_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans2D (method_bind , self . this . sys () . as_ptr () , id , xform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation2D { } unsafe impl GodotObject for Navigation2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Navigation2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Navigation2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Navigation2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Navigation2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Navigation2D { } impl Instanciable for Navigation2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_closest_point : * mut sys :: godot_method_bind , pub get_closest_point_owner : * mut sys :: godot_method_bind , pub get_simple_path : * mut sys :: godot_method_bind , pub navpoly_add : * mut sys :: godot_method_bind , pub navpoly_remove : * mut sys :: godot_method_bind , pub navpoly_set_transform : * mut sys :: godot_method_bind } impl Navigation2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Navigation2DMethodTable = Navigation2DMethodTable { class_constructor : None , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_point_owner : 0 as * mut sys :: godot_method_bind , get_simple_path : 0 as * mut sys :: godot_method_bind , navpoly_add : 0 as * mut sys :: godot_method_bind , navpoly_remove : 0 as * mut sys :: godot_method_bind , navpoly_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\u{0}" . as_ptr () as * const c_char) ; table . navpoly_add = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_add\u{0}" . as_ptr () as * const c_char) ; table . navpoly_remove = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_remove\u{0}" . as_ptr () as * const c_char) ; table . navpoly_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation_2d::Navigation2D;
            
            pub mod visual_shader_node_boolean_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeBooleanUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeBooleanUniform { } unsafe impl GodotObject for VisualShaderNodeBooleanUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeBooleanUniform" } } impl std :: ops :: Deref for VisualShaderNodeBooleanUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeBooleanUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeBooleanUniform { } impl Instanciable for VisualShaderNodeBooleanUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeBooleanUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeBooleanUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeBooleanUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeBooleanUniformMethodTable = VisualShaderNodeBooleanUniformMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_boolean_uniform::VisualShaderNodeBooleanUniform;
            
            pub mod container {
                use super::*;
                # [doc = "`core class Container` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 , thread_access :: 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 :: Control > , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ContainerMethodTable :: get (get_api ()) . fit_child_in_rect ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Container { } unsafe impl GodotObject for Container { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Container { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Container { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Container { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Container { } unsafe impl SubClass < crate :: generated :: node :: Node > for Container { } unsafe impl SubClass < crate :: generated :: object :: Object > for Container { } impl Instanciable for Container { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . queue_sort = (gd_api . godot_method_bind_get_method) (class_name , "queue_sort\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::container::Container;
            
            pub mod stream_texture {
                use super::*;
                # [doc = "`core class StreamTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The StreamTexture's file path to a `.stex` file."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamTexture { } unsafe impl GodotObject for StreamTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamTexture" } } impl std :: ops :: Deref for StreamTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for StreamTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StreamTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamTexture { } impl Instanciable for StreamTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::stream_texture::StreamTexture;
            
            pub mod visual_script_deconstruct {
                use super::*;
                # [doc = "`core class VisualScriptDeconstruct` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptDeconstruct { } unsafe impl GodotObject for VisualScriptDeconstruct { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptDeconstruct" } } impl std :: ops :: Deref for VisualScriptDeconstruct { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptDeconstruct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptDeconstruct { } impl Instanciable for VisualScriptDeconstruct { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "set_deconstruct_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_deconstruct::VisualScriptDeconstruct;
            
            pub mod mesh_texture {
                use super::*;
                # [doc = "`core class MeshTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_base_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_base_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshTexture" } } impl std :: ops :: Deref for MeshTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for MeshTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MeshTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshTexture { } impl Instanciable for MeshTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_image_size = (gd_api . godot_method_bind_get_method) (class_name , "get_image_size\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_base_texture\u{0}" . as_ptr () as * const c_char) ; table . set_image_size = (gd_api . godot_method_bind_get_method) (class_name , "set_image_size\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh_texture::MeshTexture;
            
            pub mod visual_script_condition {
                use super::*;
                # [doc = "`core class VisualScriptCondition` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCondition" } } impl std :: ops :: Deref for VisualScriptCondition { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCondition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptCondition { } impl Instanciable for VisualScriptCondition { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_condition::VisualScriptCondition;
            
            pub mod audio_stream_player_3d {
                use super::*;
                # [doc = "`core class AudioStreamPlayer3D` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamPlayer3D { pub const ATTENUATION_DISABLED : i64 = 3i64 ; pub const ATTENUATION_INVERSE_DISTANCE : i64 = 0i64 ; pub const ATTENUATION_INVERSE_SQUARE_DISTANCE : i64 = 1i64 ; pub const ATTENUATION_LOGARITHMIC : i64 = 2i64 ; pub const DOPPLER_TRACKING_DISABLED : i64 = 0i64 ; pub const DOPPLER_TRACKING_IDLE_STEP : i64 = 1i64 ; pub const DOPPLER_TRACKING_PHYSICS_STEP : i64 = 2i64 ; pub const OUT_OF_RANGE_MIX : i64 = 0i64 ; pub const OUT_OF_RANGE_PAUSE : i64 = 1i64 ; } 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 , thread_access :: 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 = "Areas in which this sound plays."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Dampens audio above this frequency, in Hz."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount how much the filter affects the loudness, in dB."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_player_3d :: AttenuationModel (ret) } } # [doc = "Bus on which this audio is playing."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Decides in which step the Doppler effect should be calculated."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_player_3d :: DopplerTracking (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in dB."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the absolute maximum of the soundlevel, in dB."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the distance from which the [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Decides if audio should pause when source is outside of [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_player_3d :: OutOfRangeMode (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 = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position in the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Base sound level unaffected by dampening, in dB."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Factor for the attenuation effect."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 = AudioStreamPlayer3DMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , from_position) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "Areas in which this sound plays."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Dampens audio above this frequency, in Hz."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Amount how much the filter affects the loudness, in dB."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , db) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , model) ; } } # [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 = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bus on which this audio is playing."] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "Decides in which step the Doppler effect should be calculated."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in dB."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , db) ; } } # [doc = "Sets the absolute maximum of the soundlevel, in dB."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max_db) ; } } # [doc = "Sets the distance from which the [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , metres) ; } } # [doc = "Decides if audio should pause when source is outside of [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale) ; } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_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 = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } # [doc = "Base sound level unaffected by dampening, in dB."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , unit_db) ; } } # [doc = "Factor for the attenuation effect."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , unit_size) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer3D { } unsafe impl GodotObject for AudioStreamPlayer3D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AudioStreamPlayer3D { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for AudioStreamPlayer3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for AudioStreamPlayer3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayer3D { } impl Instanciable for AudioStreamPlayer3D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_model\u{0}" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\u{0}" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\u{0}" . as_ptr () as * const c_char) ; table . get_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_angle\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_db = (gd_api . godot_method_bind_get_method) (class_name , "get_max_db\u{0}" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\u{0}" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\u{0}" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\u{0}" . as_ptr () as * const c_char) ; table . get_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_db\u{0}" . as_ptr () as * const c_char) ; table . get_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_size\u{0}" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_model\u{0}" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\u{0}" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\u{0}" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\u{0}" . as_ptr () as * const c_char) ; table . set_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_db = (gd_api . godot_method_bind_get_method) (class_name , "set_max_db\u{0}" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\u{0}" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . set_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_db\u{0}" . as_ptr () as * const c_char) ; table . set_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_size\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_player_3d::AudioStreamPlayer3D;
            
            pub mod web_rtc_peer_connection {
                use super::*;
                # [doc = "`core class WebRTCPeerConnection` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCPeerConnection { pub const STATE_CLOSED : i64 = 5i64 ; pub const STATE_CONNECTED : i64 = 2i64 ; pub const STATE_CONNECTING : i64 = 1i64 ; pub const STATE_DISCONNECTED : i64 = 3i64 ; pub const STATE_FAILED : i64 = 4i64 ; pub const STATE_NEW : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_i64_str_i64_str (method_bind , self . this . sys () . as_ptr () , media . into () , index , name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (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 :: web_rtc_data_channel :: WebRTCDataChannel , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . create_data_channel ; let ret = crate :: icalls :: icallptr_obj_str_dict (method_bind , self . this . sys () . as_ptr () , label . into () , options) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_peer_connection :: ConnectionState (ret) } } # [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 :: icallptr_i64_dict (method_bind , self . this . sys () . as_ptr () , configuration) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , _type . into () , sdp . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , _type . into () , sdp . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCPeerConnection { } unsafe impl GodotObject for WebRTCPeerConnection { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCPeerConnection" } } impl std :: ops :: Deref for WebRTCPeerConnection { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCPeerConnection { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCPeerConnection { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCPeerConnection { } impl Instanciable for WebRTCPeerConnection { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\u{0}" . as_ptr () as * const c_char) ; table . create_data_channel = (gd_api . godot_method_bind_get_method) (class_name , "create_data_channel\u{0}" . as_ptr () as * const c_char) ; table . create_offer = (gd_api . godot_method_bind_get_method) (class_name , "create_offer\u{0}" . as_ptr () as * const c_char) ; table . get_connection_state = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_state\u{0}" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{0}" . as_ptr () as * const c_char) ; table . set_local_description = (gd_api . godot_method_bind_get_method) (class_name , "set_local_description\u{0}" . as_ptr () as * const c_char) ; table . set_remote_description = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_description\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_rtc_peer_connection::WebRTCPeerConnection;
            
            pub mod instance_placeholder {
                use super::*;
                # [doc = "`core class InstancePlaceholder` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl InstancePlaceholder { # [doc = "\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 :: packed_scene :: PackedScene >) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . create_instance ; let ret = crate :: icalls :: icallptr_obj_bool_obj (method_bind , self . this . sys () . as_ptr () , replace , custom_scene . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "\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 :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , with_order) ; Dictionary :: from_sys (ret) } } # [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 :: packed_scene :: PackedScene >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . replace_by_instance ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for InstancePlaceholder { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InstancePlaceholder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for InstancePlaceholder { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_instance_path = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_path\u{0}" . as_ptr () as * const c_char) ; table . get_stored_values = (gd_api . godot_method_bind_get_method) (class_name , "get_stored_values\u{0}" . as_ptr () as * const c_char) ; table . replace_by_instance = (gd_api . godot_method_bind_get_method) (class_name , "replace_by_instance\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::instance_placeholder::InstancePlaceholder;
            
            pub mod tile_set {
                use super::*;
                # [doc = "`core class TileSet` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TileSet { pub const ATLAS_TILE : i64 = 2i64 ; pub const AUTO_TILE : i64 = 1i64 ; pub const BIND_BOTTOM : i64 = 128i64 ; pub const BIND_BOTTOMLEFT : i64 = 64i64 ; pub const BIND_BOTTOMRIGHT : i64 = 256i64 ; pub const BIND_CENTER : i64 = 16i64 ; pub const BIND_LEFT : i64 = 8i64 ; pub const BIND_RIGHT : i64 = 32i64 ; pub const BIND_TOP : i64 = 2i64 ; pub const BIND_TOPLEFT : i64 = 1i64 ; pub const BIND_TOPRIGHT : i64 = 4i64 ; pub const BITMASK_2X2 : i64 = 0i64 ; pub const BITMASK_3X3 : i64 = 2i64 ; pub const BITMASK_3X3_MINIMAL : i64 = 1i64 ; pub const SINGLE_TILE : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Returns the bitmask of the subtile from an autotile given its coordinates.\nThe value is the sum of the values in [enum 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 :: icallptr_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , coord) ; ret as _ } } # [doc = "Returns the [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; crate :: generated :: tile_set :: BitmaskMode (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_light_occluder ; let ret = crate :: icalls :: icallptr_obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , coord) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: navigation_polygon :: NavigationPolygon , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_navigation_polygon ; let ret = crate :: icalls :: icallptr_obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , coord) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_polygon :: NavigationPolygon , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , coord) ; ret as _ } } # [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 :: icallptr_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , coord) ; ret as _ } } # [doc = "Sets the bitmask of the subtile from an autotile given its coordinates.\nThe value is the sum of the values in [enum 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 :: icallptr_void_i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id , bitmask , flag) ; } } # [doc = "Sets the [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , mode) ; } } # [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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: occluder_polygon_2d :: OccluderPolygon2D > , coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_light_occluder ; let ret = crate :: icalls :: icallptr_void_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: navigation_polygon :: NavigationPolygon > , coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_navigation_polygon ; let ret = crate :: icalls :: icallptr_void_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , spacing) ; } } # [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 :: icallptr_void_i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id , coord , priority) ; } } # [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 :: icallptr_void_i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id , coord , z_index) ; } } # [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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: shape_2d :: 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 :: icallptr_void_i64_obj_trans2D_bool_vec2 (method_bind , self . this . sys () . as_ptr () , id , shape . as_arg_ptr () , shape_transform , one_way , autotile_coord) ; } } # [doc = "Returns the tile's light occluder."] # [doc = ""] # [inline] pub fn tile_get_light_occluder (& self , id : i64) -> Option < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_light_occluder ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the tile's material."] # [doc = ""] # [inline] pub fn tile_get_material (& self , id : i64) -> Option < Ref < crate :: generated :: shader_material :: ShaderMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_material ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shader_material :: ShaderMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns the navigation polygon of the tile."] # [doc = ""] # [inline] pub fn tile_get_navigation_polygon (& self , id : i64) -> Option < Ref < crate :: generated :: navigation_polygon :: NavigationPolygon , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_navigation_polygon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_polygon :: NavigationPolygon , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "Returns the tile's normal map texture."] # [doc = ""] # [inline] pub fn tile_get_normal_map (& self , id : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_normal_map ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "Returns a tile's given shape."] # [doc = ""] # [inline] pub fn tile_get_shape (& self , id : i64 , shape_id : i64) -> Option < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , shape_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , shape_id) ; mem :: transmute (ret) } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , shape_id) ; ret as _ } } # [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 :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , shape_id) ; ret as _ } } # [doc = "Returns the [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 :: icallptr_trans2D_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , shape_id) ; mem :: transmute (ret) } } # [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) ; < 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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "Returns the tile's [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; crate :: generated :: tile_set :: TileMode (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: occluder_polygon_2d :: OccluderPolygon2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_light_occluder ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , 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 :: shader_material :: ShaderMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_material ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , material . as_arg_ptr ()) ; } } # [doc = "Sets the tile's modulation color."] # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , 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 :: navigation_polygon :: NavigationPolygon >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_navigation_polygon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_normal_map ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , id , 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 :: shape_2d :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape ; let ret = crate :: icalls :: icallptr_void_i64_i64_obj (method_bind , self . this . sys () . as_ptr () , id , shape_id , 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 :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , shape_id , 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 :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , shape_id , one_way) ; } } # [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 :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , id , shape_id , one_way) ; } } # [doc = "Sets a [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 :: icallptr_void_i64_i64_trans2D (method_bind , self . this . sys () . as_ptr () , id , shape_id , 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 :: icallptr_void_i64_arr (method_bind , self . this . sys () . as_ptr () , id , shapes) ; } } # [doc = "Sets the tile's texture."] # [doc = ""] # [inline] pub fn tile_set_texture (& self , id : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , texture_offset) ; } } # [doc = "Sets the tile's [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , tilemode) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , z_index) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TileSet { } unsafe impl GodotObject for TileSet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TileSet" } } impl std :: ops :: Deref for TileSet { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TileSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TileSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TileSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for TileSet { } impl Instanciable for TileSet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . autotile_get_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_bitmask\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . autotile_get_size = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_size\u{0}" . as_ptr () as * const c_char) ; table . autotile_get_spacing = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_spacing\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . autotile_set_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_bitmask\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . autotile_set_size = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_size\u{0}" . as_ptr () as * const c_char) ; table . autotile_set_spacing = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_spacing\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . create_tile = (gd_api . godot_method_bind_get_method) (class_name , "create_tile\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tiles_ids = (gd_api . godot_method_bind_get_method) (class_name , "get_tiles_ids\u{0}" . as_ptr () as * const c_char) ; table . remove_tile = (gd_api . godot_method_bind_get_method) (class_name , "remove_tile\u{0}" . as_ptr () as * const c_char) ; table . tile_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_add_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_get_material = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_material\u{0}" . as_ptr () as * const c_char) ; table . tile_get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_modulate\u{0}" . as_ptr () as * const c_char) ; table . tile_get_name = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_name\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_get_region = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_region\u{0}" . as_ptr () as * const c_char) ; table . tile_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_get_shapes = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shapes\u{0}" . as_ptr () as * const c_char) ; table . tile_get_texture = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_texture\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_set_material = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_material\u{0}" . as_ptr () as * const c_char) ; table . tile_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_modulate\u{0}" . as_ptr () as * const c_char) ; table . tile_set_name = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_name\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_set_region = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_region\u{0}" . as_ptr () as * const c_char) ; table . tile_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . tile_set_shapes = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shapes\u{0}" . as_ptr () as * const c_char) ; table . tile_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_texture\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tile_set::TileSet;
            
            pub mod capsule_shape_2d {
                use super::*;
                # [doc = "`core class CapsuleShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape2D { } unsafe impl GodotObject for CapsuleShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape2D" } } impl std :: ops :: Deref for CapsuleShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleShape2D { } impl Instanciable for CapsuleShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::capsule_shape_2d::CapsuleShape2D;
            
            pub mod web_socket_server {
                use super::*;
                # [doc = "`core class WebSocketServer` inherits `WebSocketMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , id , code , 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ca_chain (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ca_chain ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn private_key (& self) -> Option < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_private_key ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn ssl_certificate (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ssl_certificate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , protocols : StringArray , gd_mp_api : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallptr_i64_i64_strarr_bool (method_bind , self . this . sys () . as_ptr () , port , protocols , gd_mp_api) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_ip (& self , arg0 : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_bind_ip ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , arg0 . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ca_chain (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ca_chain ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_private_key (& self , arg0 : impl AsArg < crate :: generated :: crypto_key :: CryptoKey >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_private_key ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ssl_certificate (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ssl_certificate ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketServer { } unsafe impl GodotObject for WebSocketServer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketServer" } } impl std :: ops :: Deref for WebSocketServer { type Target = crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketServer { } impl Instanciable for WebSocketServer { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_ip\u{0}" . as_ptr () as * const c_char) ; table . get_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "get_ca_chain\u{0}" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\u{0}" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\u{0}" . as_ptr () as * const c_char) ; table . get_private_key = (gd_api . godot_method_bind_get_method) (class_name , "get_private_key\u{0}" . as_ptr () as * const c_char) ; table . get_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_ssl_certificate\u{0}" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\u{0}" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\u{0}" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\u{0}" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\u{0}" . as_ptr () as * const c_char) ; table . set_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "set_ca_chain\u{0}" . as_ptr () as * const c_char) ; table . set_private_key = (gd_api . godot_method_bind_get_method) (class_name , "set_private_key\u{0}" . as_ptr () as * const c_char) ; table . set_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_ssl_certificate\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_socket_server::WebSocketServer;
            
            pub mod visual_script_select {
                use super::*;
                # [doc = "`core class VisualScriptSelect` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSelect { } unsafe impl GodotObject for VisualScriptSelect { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSelect" } } impl std :: ops :: Deref for VisualScriptSelect { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSelect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSelect { } impl Instanciable for VisualScriptSelect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_select::VisualScriptSelect;
            
            pub mod material {
                use super::*;
                # [doc = "`core class Material` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Material { pub const RENDER_PRIORITY_MAX : i64 = 127i64 ; pub const RENDER_PRIORITY_MIN : i64 = - 128i64 ; } impl Material { # [doc = "Sets the [Material] to be used for the next pass. This renders the object again using a different material.\n**Note:** only applies to [SpatialMaterial]s and [ShaderMaterial]s with type \"Spatial\"."] # [doc = ""] # [inline] pub fn next_pass (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . get_next_pass ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the [Material] to be used for the next pass. This renders the object again using a different material.\n**Note:** only applies to [SpatialMaterial]s and [ShaderMaterial]s with type \"Spatial\"."] # [doc = ""] # [inline] pub fn set_next_pass (& self , next_pass : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . set_next_pass ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Material { } unsafe impl GodotObject for Material { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Material" } } impl std :: ops :: Deref for Material { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Material { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Material { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Material { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_render_priority\u{0}" . as_ptr () as * const c_char) ; table . set_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "set_next_pass\u{0}" . as_ptr () as * const c_char) ; table . set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_render_priority\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::material::Material;
            
            pub mod plane_shape {
                use super::*;
                # [doc = "`core class PlaneShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] used by the [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 :: icallptr_plane (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The [Plane] used by the [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 :: icallptr_void_plane (method_bind , self . this . sys () . as_ptr () , plane) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PlaneShape { } unsafe impl GodotObject for PlaneShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PlaneShape" } } impl std :: ops :: Deref for PlaneShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PlaneShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for PlaneShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PlaneShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PlaneShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for PlaneShape { } impl Instanciable for PlaneShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_plane = (gd_api . godot_method_bind_get_method) (class_name , "set_plane\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::plane_shape::PlaneShape;
            
            pub mod line_2d {
                use super::*;
                # [doc = "`core class Line2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Line2D { pub const LINE_CAP_BOX : i64 = 1i64 ; pub const LINE_CAP_NONE : i64 = 0i64 ; pub const LINE_CAP_ROUND : i64 = 2i64 ; pub const LINE_JOINT_BEVEL : i64 = 1i64 ; pub const LINE_JOINT_ROUND : i64 = 2i64 ; pub const LINE_JOINT_SHARP : i64 = 0i64 ; pub const LINE_TEXTURE_NONE : i64 = 0i64 ; pub const LINE_TEXTURE_STRETCH : i64 = 2i64 ; pub const LINE_TEXTURE_TILE : i64 = 1i64 ; } 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 , thread_access :: 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 at the `position`. Appends the point at the end of the line.\nIf `at_position` is given, the point is inserted before the point number `at_position`, moving that point (and every point after) after the inserted point. If `at_position` is not given, or is an illegal value (`at_position < 0` or `at_position >= [method get_point_count]`), the point will be appended at the end of the point list.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_vec2_i64 (method_bind , self . this . sys () . as_ptr () , position , at_position) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the line's border will be anti-aliased."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the style of the line's first point. Use [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineCapMode (ret) } } # [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 :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Controls the style of the line's last point. Use [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineCapMode (ret) } } # [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 :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineJointMode (ret) } } # [doc = "Returns the Line2D's amount of points."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns point `i`'s position."] # [doc = ""] # [inline] pub fn get_point_position (& self , i : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , i) ; mem :: transmute (ret) } } # [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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The direction difference in radians between vector points. This value is only used if `joint mode` is set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The style to render the `texture` on the line. Use [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineTextureMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes the point at index `i` from the line."] # [doc = ""] # [inline] pub fn remove_point (& self , i : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , i) ; } } # [doc = "If `true`, the line's border will be anti-aliased."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "Controls the style of the line's first point. Use [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Controls the style of the line's last point. Use [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Overwrites the position in point `i` with the supplied `position`."] # [doc = ""] # [inline] pub fn set_point_position (& self , i : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , i , 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 : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , precision) ; } } # [doc = "The direction difference in radians between vector points. This value is only used if `joint mode` is set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , limit) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The style to render the `texture` on the line. Use [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Line2D { } unsafe impl GodotObject for Line2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Line2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Line2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Line2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Line2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Line2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Line2D { } impl Instanciable for Line2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\u{0}" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\u{0}" . as_ptr () as * const c_char) ; table . get_default_color = (gd_api . godot_method_bind_get_method) (class_name , "get_default_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gradient = (gd_api . godot_method_bind_get_method) (class_name , "get_gradient\u{0}" . as_ptr () as * const c_char) ; table . get_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_mode\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{0}" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\u{0}" . as_ptr () as * const c_char) ; table . get_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_round_precision\u{0}" . as_ptr () as * const c_char) ; table . get_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_sharp_limit\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_mode\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\u{0}" . as_ptr () as * const c_char) ; table . set_default_color = (gd_api . godot_method_bind_get_method) (class_name , "set_default_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\u{0}" . as_ptr () as * const c_char) ; table . set_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_mode\u{0}" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\u{0}" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\u{0}" . as_ptr () as * const c_char) ; table . set_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_round_precision\u{0}" . as_ptr () as * const c_char) ; table . set_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_sharp_limit\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_mode\u{0}" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::line_2d::Line2D;
            
            pub mod popup_menu {
                use super::*;
                # [doc = "`core class PopupMenu` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 [method 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 :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id , accel) ; } } # [doc = "Adds a new checkable item and assigns the specified [ShortCut] to it. Sets the label of the checkbox to the [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 [method 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 :: short_cut :: 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 :: icallptr_void_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [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 [method 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 [method 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 :: 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 :: icallptr_void_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id , accel) ; } } # [doc = "Adds a new checkable item and assigns the specified [ShortCut] and icon `texture` to it. Sets the label of the checkbox to the [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 [method 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 :: Texture > , shortcut : impl AsArg < crate :: generated :: short_cut :: 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 :: icallptr_void_obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [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 [method 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 :: 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 :: icallptr_void_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id , accel) ; } } # [doc = "Same as [method 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 :: 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 :: icallptr_void_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id , accel) ; } } # [doc = "Same as [method 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 :: Texture > , shortcut : impl AsArg < crate :: generated :: short_cut :: 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 :: icallptr_void_obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [doc = "Adds a new item and assigns the specified [ShortCut] and icon `texture` to it. Sets the label of the checkbox to the [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 :: Texture > , shortcut : impl AsArg < crate :: generated :: short_cut :: 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 :: icallptr_void_obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [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 [method 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 :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id , accel) ; } } # [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 [method 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 :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , max_states , default_state , id , accel) ; } } # [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 [method 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 [method 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 :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id , accel) ; } } # [doc = "Adds a new radio check button and assigns a [ShortCut] to it. Sets the label of the checkbox to the [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 [method 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 :: short_cut :: 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 :: icallptr_void_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [doc = "Adds a separator between items. Separators also occupy an index.\n# Default Arguments\n* `label` - `\"\"`"] # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id) ; } } # [doc = "Adds a [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 :: short_cut :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_shortcut ; let ret = crate :: icalls :: icallptr_void_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id , global) ; } } # [doc = "Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The `submenu` argument is the name of the child [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 :: icallptr_void_str_str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , submenu . into () , id) ; } } # [doc = "Removes all items from the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, allows to navigate [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the number of items in the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = "Returns the metadata of the specified item, which might be of any type. You can set it with [method 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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the [ShortCut] associated with the specified `idx` item."] # [doc = ""] # [inline] pub fn get_item_shortcut (& self , idx : i64) -> Option < Ref < crate :: generated :: short_cut :: ShortCut , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_shortcut ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: short_cut :: ShortCut , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the submenu name of the item at index `idx`. See [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the tooltip associated with the specified index 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, hides the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, hides the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, hides the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 [method 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if the item is a separator. If it is, it will be displayed as a line. See [method 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "If `true`, allows to navigate [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [doc = "If `true`, hides the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, hides the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, hides the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Hides the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , accel) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , checked) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , disabled) ; } } # [doc = "Replaces the [Texture] icon of the specified `idx`."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , id) ; } } # [doc = "Sets the metadata of an item, which may be of any type. You can later get it with [method 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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , metadata . owned_to_variant ()) ; } } # [doc = "Sets the state of an multistate item. See [method 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , state) ; } } # [doc = "Sets a [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 :: short_cut :: ShortCut > , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_shortcut ; let ret = crate :: icalls :: icallptr_void_i64_obj_bool (method_bind , self . this . sys () . as_ptr () , idx , shortcut . as_arg_ptr () , global) ; } } # [doc = "Disables the [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , disabled) ; } } # [doc = "Sets the submenu of the item at index `idx`. The submenu is the name of a child [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , text . into ()) ; } } # [doc = "Sets the [String] 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Cycle to the next state of an multistate item. See [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupMenu { } unsafe impl GodotObject for PopupMenu { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PopupMenu { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupMenu { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for PopupMenu { } unsafe impl SubClass < crate :: generated :: control :: Control > for PopupMenu { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PopupMenu { } unsafe impl SubClass < crate :: generated :: node :: Node > for PopupMenu { } unsafe impl SubClass < crate :: generated :: object :: Object > for PopupMenu { } impl Instanciable for PopupMenu { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_check_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_check_shortcut\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_icon_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_item\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_icon_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_shortcut\u{0}" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\u{0}" . as_ptr () as * const c_char) ; table . add_multistate_item = (gd_api . godot_method_bind_get_method) (class_name , "add_multistate_item\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_separator = (gd_api . godot_method_bind_get_method) (class_name , "add_separator\u{0}" . as_ptr () as * const c_char) ; table . add_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_shortcut\u{0}" . as_ptr () as * const c_char) ; table . add_submenu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_submenu_item\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_allow_search = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_search\u{0}" . as_ptr () as * const c_char) ; table . get_current_index = (gd_api . godot_method_bind_get_method) (class_name , "get_current_index\u{0}" . as_ptr () as * const c_char) ; table . get_item_accelerator = (gd_api . godot_method_bind_get_method) (class_name , "get_item_accelerator\u{0}" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\u{0}" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\u{0}" . as_ptr () as * const c_char) ; table . get_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_item_id\u{0}" . as_ptr () as * const c_char) ; table . get_item_index = (gd_api . godot_method_bind_get_method) (class_name , "get_item_index\u{0}" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_item_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shortcut\u{0}" . as_ptr () as * const c_char) ; table . get_item_submenu = (gd_api . godot_method_bind_get_method) (class_name , "get_item_submenu\u{0}" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\u{0}" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_item_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_checkable\u{0}" . as_ptr () as * const c_char) ; table . is_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_item_checked\u{0}" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_item_separator = (gd_api . godot_method_bind_get_method) (class_name , "is_item_separator\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\u{0}" . as_ptr () as * const c_char) ; table . set_allow_search = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_search\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_accelerator = (gd_api . godot_method_bind_get_method) (class_name , "set_item_accelerator\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_item_checked\u{0}" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\u{0}" . as_ptr () as * const c_char) ; table . set_item_id = (gd_api . godot_method_bind_get_method) (class_name , "set_item_id\u{0}" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . set_item_multistate = (gd_api . godot_method_bind_get_method) (class_name , "set_item_multistate\u{0}" . as_ptr () as * const c_char) ; table . set_item_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shortcut\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_submenu = (gd_api . godot_method_bind_get_method) (class_name , "set_item_submenu\u{0}" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\u{0}" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\u{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\u{0}" . as_ptr () as * const c_char) ; table . toggle_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "toggle_item_checked\u{0}" . as_ptr () as * const c_char) ; table . toggle_item_multistate = (gd_api . godot_method_bind_get_method) (class_name , "toggle_item_multistate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::popup_menu::PopupMenu;
            
            pub mod bitmap_font {
                use super::*;
                # [doc = "`core class BitmapFont` inherits `Font` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_i64_i64_rect2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , character , texture , rect , align , advance) ; } } # [doc = "Adds a kerning pair to the [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 :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , char_a , char_b , kerning) ; } } # [doc = "Adds a texture to the [BitmapFont]."] # [doc = ""] # [inline] pub fn add_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . add_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "The fallback font."] # [doc = ""] # [inline] pub fn fallback (& self) -> Option < Ref < crate :: generated :: bitmap_font :: BitmapFont , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_fallback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bitmap_font :: BitmapFont , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , char_a , char_b) ; ret as _ } } # [doc = "Returns the font atlas texture at index `idx`."] # [doc = ""] # [inline] pub fn get_texture (& self , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , px) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The fallback font."] # [doc = ""] # [inline] pub fn set_fallback (& self , fallback : impl AsArg < crate :: generated :: bitmap_font :: BitmapFont >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . set_fallback ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , px) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BitmapFont { } unsafe impl GodotObject for BitmapFont { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BitmapFont" } } impl std :: ops :: Deref for BitmapFont { type Target = crate :: generated :: font :: Font ; # [inline] fn deref (& self) -> & crate :: generated :: font :: Font { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BitmapFont { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: font :: Font { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: font :: Font > for BitmapFont { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BitmapFont { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BitmapFont { } unsafe impl SubClass < crate :: generated :: object :: Object > for BitmapFont { } impl Instanciable for BitmapFont { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_kerning_pair = (gd_api . godot_method_bind_get_method) (class_name , "add_kerning_pair\u{0}" . as_ptr () as * const c_char) ; table . add_texture = (gd_api . godot_method_bind_get_method) (class_name , "add_texture\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . create_from_fnt = (gd_api . godot_method_bind_get_method) (class_name , "create_from_fnt\u{0}" . as_ptr () as * const c_char) ; table . get_fallback = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback\u{0}" . as_ptr () as * const c_char) ; table . get_kerning_pair = (gd_api . godot_method_bind_get_method) (class_name , "get_kerning_pair\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_count = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_count\u{0}" . as_ptr () as * const c_char) ; table . set_ascent = (gd_api . godot_method_bind_get_method) (class_name , "set_ascent\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_fallback = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::bitmap_font::BitmapFont;
            
            pub mod visual_shader_node_scalar_interp {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarInterp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarInterp" } } impl std :: ops :: Deref for VisualShaderNodeScalarInterp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarInterp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarInterp { } impl Instanciable for VisualShaderNodeScalarInterp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_interp::VisualShaderNodeScalarInterp;
            
            pub mod visual_shader_node_switch {
                use super::*;
                # [doc = "`core class VisualShaderNodeSwitch` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeSwitch" } } impl std :: ops :: Deref for VisualShaderNodeSwitch { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeSwitch { } impl Instanciable for VisualShaderNodeSwitch { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_switch::VisualShaderNodeSwitch;
            
            pub mod audio_stream_generator {
                use super::*;
                # [doc = "`core class AudioStreamGenerator` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGenerator { } unsafe impl GodotObject for AudioStreamGenerator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGenerator" } } impl std :: ops :: Deref for AudioStreamGenerator { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamGenerator { } impl Instanciable for AudioStreamGenerator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\u{0}" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\u{0}" . as_ptr () as * const c_char) ; table . set_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_rate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_generator::AudioStreamGenerator;
            
            pub mod hbox_container {
                use super::*;
                # [doc = "`core class HBoxContainer` inherits `BoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HBoxContainer { type Target = crate :: generated :: box_container :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HBoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: container :: Container > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for HBoxContainer { } impl Instanciable for HBoxContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::hbox_container::HBoxContainer;
            
            pub mod generic_6dof_joint {
                use super::*;
                # [doc = "`core class Generic6DOFJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Generic6DOFJoint { pub const FLAG_ENABLE_ANGULAR_LIMIT : i64 = 1i64 ; pub const FLAG_ENABLE_ANGULAR_SPRING : i64 = 2i64 ; pub const FLAG_ENABLE_LINEAR_LIMIT : i64 = 0i64 ; pub const FLAG_ENABLE_LINEAR_MOTOR : i64 = 5i64 ; pub const FLAG_ENABLE_LINEAR_SPRING : i64 = 3i64 ; pub const FLAG_ENABLE_MOTOR : i64 = 4i64 ; pub const FLAG_MAX : i64 = 6i64 ; pub const PARAM_ANGULAR_DAMPING : i64 = 13i64 ; pub const PARAM_ANGULAR_ERP : i64 = 16i64 ; pub const PARAM_ANGULAR_FORCE_LIMIT : i64 = 15i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 12i64 ; pub const PARAM_ANGULAR_LOWER_LIMIT : i64 = 10i64 ; pub const PARAM_ANGULAR_MOTOR_FORCE_LIMIT : i64 = 18i64 ; pub const PARAM_ANGULAR_MOTOR_TARGET_VELOCITY : i64 = 17i64 ; pub const PARAM_ANGULAR_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_SPRING_DAMPING : i64 = 20i64 ; pub const PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT : i64 = 21i64 ; pub const PARAM_ANGULAR_SPRING_STIFFNESS : i64 = 19i64 ; pub const PARAM_ANGULAR_UPPER_LIMIT : i64 = 11i64 ; pub const PARAM_LINEAR_DAMPING : i64 = 4i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const PARAM_LINEAR_LOWER_LIMIT : i64 = 0i64 ; pub const PARAM_LINEAR_MOTOR_FORCE_LIMIT : i64 = 6i64 ; pub const PARAM_LINEAR_MOTOR_TARGET_VELOCITY : i64 = 5i64 ; pub const PARAM_LINEAR_RESTITUTION : i64 = 3i64 ; pub const PARAM_LINEAR_SPRING_DAMPING : i64 = 8i64 ; pub const PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT : i64 = 9i64 ; pub const PARAM_LINEAR_SPRING_STIFFNESS : i64 = 7i64 ; pub const PARAM_LINEAR_UPPER_LIMIT : i64 = 1i64 ; 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 , thread_access :: 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret 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 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret 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 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Generic6DOFJoint { } unsafe impl GodotObject for Generic6DOFJoint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Generic6DOFJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Generic6DOFJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for Generic6DOFJoint { } impl Instanciable for Generic6DOFJoint { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_y\u{0}" . as_ptr () as * const c_char) ; table . get_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_z\u{0}" . as_ptr () as * const c_char) ; table . get_param_x = (gd_api . godot_method_bind_get_method) (class_name , "get_param_x\u{0}" . as_ptr () as * const c_char) ; table . get_param_y = (gd_api . godot_method_bind_get_method) (class_name , "get_param_y\u{0}" . as_ptr () as * const c_char) ; table . get_param_z = (gd_api . godot_method_bind_get_method) (class_name , "get_param_z\u{0}" . as_ptr () as * const c_char) ; table . set_flag_x = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_x\u{0}" . as_ptr () as * const c_char) ; table . set_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_y\u{0}" . as_ptr () as * const c_char) ; table . set_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_z\u{0}" . as_ptr () as * const c_char) ; table . set_param_x = (gd_api . godot_method_bind_get_method) (class_name , "set_param_x\u{0}" . as_ptr () as * const c_char) ; table . set_param_y = (gd_api . godot_method_bind_get_method) (class_name , "set_param_y\u{0}" . as_ptr () as * const c_char) ; table . set_param_z = (gd_api . godot_method_bind_get_method) (class_name , "set_param_z\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::generic_6dof_joint::Generic6DOFJoint;
            
            pub mod script {
                use super::*;
                # [doc = "`core class Script` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the script directly inherited by this script."] # [doc = ""] # [inline] pub fn get_base_script (& self) -> Option < Ref < crate :: generated :: script :: Script , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script :: Script , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the list of methods in this [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]."] # [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]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , signal_name . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . instance_has ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , base_object . as_arg_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_bool (method_bind , self . this . sys () . as_ptr () , keep_state) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Script" } } impl std :: ops :: Deref for Script { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Script { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Script { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Script { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_source_code = (gd_api . godot_method_bind_get_method) (class_name , "get_source_code\u{0}" . as_ptr () as * const c_char) ; table . has_script_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_script_signal\u{0}" . as_ptr () as * const c_char) ; table . has_source_code = (gd_api . godot_method_bind_get_method) (class_name , "has_source_code\u{0}" . as_ptr () as * const c_char) ; table . instance_has = (gd_api . godot_method_bind_get_method) (class_name , "instance_has\u{0}" . as_ptr () as * const c_char) ; table . is_tool = (gd_api . godot_method_bind_get_method) (class_name , "is_tool\u{0}" . as_ptr () as * const c_char) ; table . reload = (gd_api . godot_method_bind_get_method) (class_name , "reload\u{0}" . as_ptr () as * const c_char) ; table . set_source_code = (gd_api . godot_method_bind_get_method) (class_name , "set_source_code\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::script::Script;
            
            pub mod input_event_screen_drag {
                use super::*;
                # [doc = "`core class InputEventScreenDrag` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The drag position relative to its start position."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "The drag position relative to its start position."] # [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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , speed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenDrag { } unsafe impl GodotObject for InputEventScreenDrag { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenDrag" } } impl std :: ops :: Deref for InputEventScreenDrag { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenDrag { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventScreenDrag { } impl Instanciable for InputEventScreenDrag { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\u{0}" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\u{0}" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\u{0}" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_screen_drag::InputEventScreenDrag;
            
            pub mod collision_shape {
                use super::*;
                # [doc = "`core class CollisionShape` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the collision shape's shape to the addition of all its convexed [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 :: icallptr_void (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 :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionShape { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionShape { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionShape { } impl Instanciable for CollisionShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_shape::CollisionShape;
            
            pub mod editor_vcs_interface {
                use super::*;
                # [doc = "`tools class EditorVCSInterface` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorVCSInterface { # [doc = "Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument."] # [doc = ""] # [inline] pub fn commit (& self , msg : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , msg . into ()) ; } } # [doc = "Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file.\nEach [Dictionary] object has the line diff contents under the keys:\n- `\"content\"` to store a [String] containing the line contents\n- `\"status\"` to store a [String] which contains `\"+\"` in case the content is a line addition but it stores a `\"-\"` in case of deletion and an empty string in the case the line content is neither an addition nor a deletion.\n- `\"new_line_number\"` to store an integer containing the new line number of the line content.\n- `\"line_count\"` to store an integer containing the number of lines in the line content.\n- `\"old_line_number\"` to store an integer containing the old line number of the line content.\n- `\"offset\"` to store the offset of the line change since the first contextual line content."] # [doc = ""] # [inline] pub fn get_file_diff (& self , file_path : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_file_diff ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of a change the corresponding file has experienced.\nThe following integer values are being used to signify that the detected file is:\n- `0`: New to the VCS working directory\n- `1`: Modified\n- `2`: Renamed\n- `3`: Deleted\n- `4`: Typechanged"] # [doc = ""] # [inline] pub fn get_modified_files_data (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_modified_files_data ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the project name of the VCS working directory."] # [doc = ""] # [inline] pub fn get_project_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_project_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the VCS if the VCS has been initialized, else return an empty string."] # [doc = ""] # [inline] pub fn get_vcs_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_vcs_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns `true` if no failure occurs, else returns `false`."] # [doc = ""] # [inline] pub fn initialize (& self , project_root_path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , project_root_path . into ()) ; ret as _ } } # [doc = "Returns `true` if the addon is ready to respond to function calls, else returns `false`."] # [doc = ""] # [inline] pub fn is_addon_ready (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . is_addon_ready ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the VCS addon has been initialized, else returns `false`."] # [doc = ""] # [inline] pub fn is_vcs_initialized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . is_vcs_initialized ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Shuts down the VCS addon to allow cleanup code to run on call. Returns `true` is no failure occurs, else returns `false`."] # [doc = ""] # [inline] pub fn shut_down (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . shut_down ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path."] # [doc = ""] # [inline] pub fn stage_file (& self , file_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . stage_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; } } # [doc = "Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path."] # [doc = ""] # [inline] pub fn unstage_file (& self , file_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . unstage_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorVCSInterface { } unsafe impl GodotObject for EditorVCSInterface { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorVCSInterface" } } impl std :: ops :: Deref for EditorVCSInterface { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorVCSInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorVCSInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorVCSInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub commit : * mut sys :: godot_method_bind , pub get_file_diff : * mut sys :: godot_method_bind , pub get_modified_files_data : * mut sys :: godot_method_bind , pub get_project_name : * mut sys :: godot_method_bind , pub get_vcs_name : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub is_addon_ready : * mut sys :: godot_method_bind , pub is_vcs_initialized : * mut sys :: godot_method_bind , pub shut_down : * mut sys :: godot_method_bind , pub stage_file : * mut sys :: godot_method_bind , pub unstage_file : * mut sys :: godot_method_bind } impl EditorVCSInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorVCSInterfaceMethodTable = EditorVCSInterfaceMethodTable { class_constructor : None , commit : 0 as * mut sys :: godot_method_bind , get_file_diff : 0 as * mut sys :: godot_method_bind , get_modified_files_data : 0 as * mut sys :: godot_method_bind , get_project_name : 0 as * mut sys :: godot_method_bind , get_vcs_name : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , is_addon_ready : 0 as * mut sys :: godot_method_bind , is_vcs_initialized : 0 as * mut sys :: godot_method_bind , shut_down : 0 as * mut sys :: godot_method_bind , stage_file : 0 as * mut sys :: godot_method_bind , unstage_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\u{0}" . as_ptr () as * const c_char) ; table . get_file_diff = (gd_api . godot_method_bind_get_method) (class_name , "get_file_diff\u{0}" . as_ptr () as * const c_char) ; table . get_modified_files_data = (gd_api . godot_method_bind_get_method) (class_name , "get_modified_files_data\u{0}" . as_ptr () as * const c_char) ; table . get_project_name = (gd_api . godot_method_bind_get_method) (class_name , "get_project_name\u{0}" . as_ptr () as * const c_char) ; table . get_vcs_name = (gd_api . godot_method_bind_get_method) (class_name , "get_vcs_name\u{0}" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\u{0}" . as_ptr () as * const c_char) ; table . is_addon_ready = (gd_api . godot_method_bind_get_method) (class_name , "is_addon_ready\u{0}" . as_ptr () as * const c_char) ; table . is_vcs_initialized = (gd_api . godot_method_bind_get_method) (class_name , "is_vcs_initialized\u{0}" . as_ptr () as * const c_char) ; table . shut_down = (gd_api . godot_method_bind_get_method) (class_name , "shut_down\u{0}" . as_ptr () as * const c_char) ; table . stage_file = (gd_api . godot_method_bind_get_method) (class_name , "stage_file\u{0}" . as_ptr () as * const c_char) ; table . unstage_file = (gd_api . godot_method_bind_get_method) (class_name , "unstage_file\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_vcs_interface::EditorVCSInterface;
            
            pub mod prism_mesh {
                use super::*;
                # [doc = "`core class PrismMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , left_to_right) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PrismMesh { } unsafe impl GodotObject for PrismMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrismMesh" } } impl std :: ops :: Deref for PrismMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrismMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PrismMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PrismMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for PrismMesh { } impl Instanciable for PrismMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::prism_mesh::PrismMesh;
            
            pub mod animation_node_state_machine {
                use super::*;
                # [doc = "`core class AnimationNodeStateMachine` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: animation_node :: AnimationNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_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 :: animation_node_state_machine_transition :: AnimationNodeStateMachineTransition >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . add_transition ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the animation node with the given name."] # [doc = ""] # [inline] pub fn get_node (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the given animation node's name."] # [doc = ""] # [inline] pub fn get_node_name (& self , node : impl AsArg < crate :: generated :: animation_node :: AnimationNode >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallptr_str_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the given transition."] # [doc = ""] # [inline] pub fn get_transition (& self , idx : i64) -> Option < Ref < crate :: generated :: animation_node_state_machine_transition :: AnimationNodeStateMachineTransition , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_transition ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_node_state_machine_transition :: AnimationNodeStateMachineTransition , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [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 :: icallptr_void_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 :: animation_node :: AnimationNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . replace_node ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachine" } } impl std :: ops :: Deref for AnimationNodeStateMachine { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeStateMachine { } impl Instanciable for AnimationNodeStateMachine { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_transition = (gd_api . godot_method_bind_get_method) (class_name , "add_transition\u{0}" . as_ptr () as * const c_char) ; table . get_end_node = (gd_api . godot_method_bind_get_method) (class_name , "get_end_node\u{0}" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\u{0}" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\u{0}" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\u{0}" . as_ptr () as * const c_char) ; table . get_start_node = (gd_api . godot_method_bind_get_method) (class_name , "get_start_node\u{0}" . as_ptr () as * const c_char) ; table . get_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_transition\u{0}" . as_ptr () as * const c_char) ; table . get_transition_count = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_count\u{0}" . as_ptr () as * const c_char) ; table . get_transition_from = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_from\u{0}" . as_ptr () as * const c_char) ; table . get_transition_to = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_to\u{0}" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\u{0}" . as_ptr () as * const c_char) ; table . has_transition = (gd_api . godot_method_bind_get_method) (class_name , "has_transition\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; table . remove_transition = (gd_api . godot_method_bind_get_method) (class_name , "remove_transition\u{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\u{0}" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\u{0}" . as_ptr () as * const c_char) ; table . replace_node = (gd_api . godot_method_bind_get_method) (class_name , "replace_node\u{0}" . as_ptr () as * const c_char) ; table . set_end_node = (gd_api . godot_method_bind_get_method) (class_name , "set_end_node\u{0}" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\u{0}" . as_ptr () as * const c_char) ; table . set_start_node = (gd_api . godot_method_bind_get_method) (class_name , "set_start_node\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_state_machine::AnimationNodeStateMachine;
            
            pub mod cpu_particles {
                use super::*;
                # [doc = "`core class CPUParticles` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CPUParticles { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const EMISSION_SHAPE_BOX : i64 = 2i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const EMISSION_SHAPE_MAX : i64 = 5i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const PARAM_MAX : i64 = 12i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; } 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 , thread_access :: 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] node with an assigned [ParticlesMaterial]."] # [doc = ""] # [inline] pub fn convert_from_particles (& self , particles : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . convert_from_particles ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , particles . as_arg_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Unused for 3D particles."] # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Unused for 3D particles."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles :: DrawOrder (ret) } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_normals (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_normals ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_points (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_points ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Particles will be emitted inside this region. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles :: EmissionShape (ret) } } # [doc = "The sphere's radius if [enum EmissionShape] is set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Mesh] used for each particle. If `null`, particles will be spheres."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn param_curve (& self , param : i64) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "If `true`, particles rotate around Y axis by [member angle]."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Unused for 3D particles."] # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Unused for 3D particles."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: gradient :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant 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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_colors (& self , array : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_normals (& self , array : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_normals ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_points (& self , array : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_points ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Particles will be emitted inside this region. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The sphere's radius if [enum EmissionShape] is set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [doc = "Amount of [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , random) ; } } # [doc = "The [Mesh] used for each particle. If `null`, particles will be spheres."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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_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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn set_param_curve (& self , param : i64 , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , param , curve . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , randomness) ; } } # [doc = "If `true`, particles rotate around Y axis by [member angle]."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CPUParticles { } unsafe impl GodotObject for CPUParticles { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CPUParticles { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CPUParticles { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CPUParticles { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CPUParticles { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CPUParticles { } unsafe impl SubClass < crate :: generated :: node :: Node > for CPUParticles { } unsafe impl SubClass < crate :: generated :: object :: Object > for CPUParticles { } impl Instanciable for CPUParticles { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\u{0}" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\u{0}" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\u{0}" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\u{0}" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\u{0}" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\u{0}" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\u{0}" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\u{0}" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\u{0}" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\u{0}" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\u{0}" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\u{0}" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\u{0}" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\u{0}" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\u{0}" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\u{0}" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\u{0}" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cpu_particles::CPUParticles;
            
            pub mod sprite_frames {
                use super::*;
                # [doc = "`core class SpriteFrames` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_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 :: Texture > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . add_frame ; let ret = crate :: icalls :: icallptr_void_str_obj_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , frame . as_arg_ptr () , at_position) ; } } # [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 :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the given animation will loop."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [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) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_names ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallptr_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx) ; } } # [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 :: icallptr_void_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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , _loop) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , anim . into () , speed) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallptr_void_str_i64_obj (method_bind , self . this . sys () . as_ptr () , anim . into () , idx , txt . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteFrames { } unsafe impl GodotObject for SpriteFrames { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpriteFrames" } } impl std :: ops :: Deref for SpriteFrames { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteFrames { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpriteFrames { } impl Instanciable for SpriteFrames { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_frame = (gd_api . godot_method_bind_get_method) (class_name , "add_frame\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . clear_all = (gd_api . godot_method_bind_get_method) (class_name , "clear_all\u{0}" . as_ptr () as * const c_char) ; table . get_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_loop\u{0}" . as_ptr () as * const c_char) ; table . get_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_names\u{0}" . as_ptr () as * const c_char) ; table . get_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_speed\u{0}" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\u{0}" . as_ptr () as * const c_char) ; table . get_frame_count = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_count\u{0}" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\u{0}" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\u{0}" . as_ptr () as * const c_char) ; table . remove_frame = (gd_api . godot_method_bind_get_method) (class_name , "remove_frame\u{0}" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\u{0}" . as_ptr () as * const c_char) ; table . set_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_loop\u{0}" . as_ptr () as * const c_char) ; table . set_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_speed\u{0}" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sprite_frames::SpriteFrames;
            
            pub mod physics_server {
                use super::*;
                # [doc = "`core singleton class PhysicsServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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) ; pub const TEST_MOTION_MIN_CONTACT_DEPTH : SpaceParameter = SpaceParameter (8i64) ; } 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PhysicsServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_AXIS_ANGULAR_X : i64 = 8i64 ; pub const BODY_AXIS_ANGULAR_Y : i64 = 16i64 ; pub const BODY_AXIS_ANGULAR_Z : i64 = 32i64 ; pub const BODY_AXIS_LINEAR_X : i64 = 1i64 ; pub const BODY_AXIS_LINEAR_Y : i64 = 2i64 ; pub const BODY_AXIS_LINEAR_Z : i64 = 4i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 3i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 4i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_PARAM_MAX : i64 = 6i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CONE_TWIST_JOINT_BIAS : i64 = 2i64 ; pub const CONE_TWIST_JOINT_RELAXATION : i64 = 4i64 ; pub const CONE_TWIST_JOINT_SOFTNESS : i64 = 3i64 ; pub const CONE_TWIST_JOINT_SWING_SPAN : i64 = 0i64 ; pub const CONE_TWIST_JOINT_TWIST_SPAN : i64 = 1i64 ; pub const G6DOF_JOINT_ANGULAR_DAMPING : i64 = 13i64 ; pub const G6DOF_JOINT_ANGULAR_ERP : i64 = 16i64 ; pub const G6DOF_JOINT_ANGULAR_FORCE_LIMIT : i64 = 15i64 ; pub const G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS : i64 = 12i64 ; pub const G6DOF_JOINT_ANGULAR_LOWER_LIMIT : i64 = 10i64 ; pub const G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT : i64 = 18i64 ; pub const G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY : i64 = 17i64 ; pub const G6DOF_JOINT_ANGULAR_RESTITUTION : i64 = 14i64 ; pub const G6DOF_JOINT_ANGULAR_UPPER_LIMIT : i64 = 11i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT : i64 = 1i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT : i64 = 0i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR : i64 = 5i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_MOTOR : i64 = 4i64 ; pub const G6DOF_JOINT_LINEAR_DAMPING : i64 = 4i64 ; pub const G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const G6DOF_JOINT_LINEAR_LOWER_LIMIT : i64 = 0i64 ; pub const G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT : i64 = 6i64 ; pub const G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY : i64 = 5i64 ; pub const G6DOF_JOINT_LINEAR_RESTITUTION : i64 = 3i64 ; pub const G6DOF_JOINT_LINEAR_UPPER_LIMIT : i64 = 1i64 ; pub const HINGE_JOINT_BIAS : i64 = 0i64 ; pub const HINGE_JOINT_FLAG_ENABLE_MOTOR : i64 = 1i64 ; pub const HINGE_JOINT_FLAG_USE_LIMIT : i64 = 0i64 ; pub const HINGE_JOINT_LIMIT_BIAS : i64 = 3i64 ; pub const HINGE_JOINT_LIMIT_LOWER : i64 = 2i64 ; pub const HINGE_JOINT_LIMIT_RELAXATION : i64 = 5i64 ; pub const HINGE_JOINT_LIMIT_SOFTNESS : i64 = 4i64 ; pub const HINGE_JOINT_LIMIT_UPPER : i64 = 1i64 ; pub const HINGE_JOINT_MOTOR_MAX_IMPULSE : i64 = 7i64 ; pub const HINGE_JOINT_MOTOR_TARGET_VELOCITY : i64 = 6i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_6DOF : i64 = 4i64 ; pub const JOINT_CONE_TWIST : i64 = 3i64 ; pub const JOINT_HINGE : i64 = 1i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const JOINT_SLIDER : i64 = 2i64 ; pub const PIN_JOINT_BIAS : i64 = 0i64 ; pub const PIN_JOINT_DAMPING : i64 = 1i64 ; pub const PIN_JOINT_IMPULSE_CLAMP : i64 = 2i64 ; pub const SHAPE_BOX : i64 = 3i64 ; pub const SHAPE_CAPSULE : i64 = 4i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SHAPE_CUSTOM : i64 = 9i64 ; pub const SHAPE_CYLINDER : i64 = 5i64 ; pub const SHAPE_HEIGHTMAP : i64 = 8i64 ; pub const SHAPE_PLANE : i64 = 0i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SHAPE_SPHERE : i64 = 2i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_DAMPING : i64 = 15i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_LOWER : i64 = 12i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION : i64 = 14i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS : i64 = 13i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_UPPER : i64 = 11i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_DAMPING : i64 = 18i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION : i64 = 17i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS : i64 = 16i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING : i64 = 21i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION : i64 = 20i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS : i64 = 19i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_DAMPING : i64 = 4i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_LOWER : i64 = 1i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION : i64 = 3i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_UPPER : i64 = 0i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_DAMPING : i64 = 7i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_RESTITUTION : i64 = 6i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_SOFTNESS : i64 = 5i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING : i64 = 10i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION : i64 = 9i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS : i64 = 8i64 ; pub const SLIDER_JOINT_MAX : i64 = 22i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO : i64 = 6i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 7i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH : i64 = 8i64 ; } 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\u{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 = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param) ; Variant :: from_sys (ret) } } # [doc = "Returns the [RID] of the nth shape of an area."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the space assigned to the area."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , area) ; Rid :: from_sys (ret) } } # [doc = "Returns the space override mode for the area."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; crate :: generated :: physics_server :: AreaSpaceOverrideMode (ret) } } # [doc = "Returns the transform matrix for an area."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid (method_bind , self . this . sys () . as_ptr () , area) ; mem :: transmute (ret) } } # [doc = "If `true`, area collides with rays."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask) ; } } # [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: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [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 = ""] # [inline] pub fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable) ; } } # [doc = "Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param , value . owned_to_variant ()) ; } } # [doc = "Sets object pickable with rays."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , area , enable) ; } } # [doc = "Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx , shape) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx , disabled) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , area , shape_idx , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 [enum AreaSpaceOverrideMode] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_rid_trans_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , torque) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = "Gives the body a push to rotate it."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Removes all shapes from a body."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , body) ; } } # [doc = "Creates a physics body. The first parameter can be any value from [enum 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 :: icallptr_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , mode , init_sleeping) ; Rid :: from_sys (ret) } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body can collide with.\n-"] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the [PhysicsDirectBodyState] of the body."] # [doc = ""] # [inline] pub fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , body) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_direct_body_state :: PhysicsDirectBodyState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the body mode."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_server :: BodyMode (ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param) ; ret as _ } } # [doc = "Returns the [RID] of the nth shape of a body."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the transform matrix of a body shape."] # [doc = ""] # [inline] pub 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 :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the [RID] of the space assigned to a body."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , body) ; Rid :: from_sys (ret) } } # [doc = "Returns a body state."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , axis) ; ret as _ } } # [doc = "If `true`, the continuous collision detection mode is enabled."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "If `true`, the body can be detected by rays."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [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 = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , axis , lock) ; } } # [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 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask) ; } } # [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 = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = ""] # [inline] pub fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , body , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , margin) ; } } # [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 = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount) ; } } # [doc = "Sets the body mode, from one of the [enum BodyMode] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param , value) ; } } # [doc = "Sets the body pickable with rays if `enabled` is set."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx , shape) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx , disabled) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , body , shape_idx , transform) ; } } # [doc = "Assigns a space to the body (see [method space_create])."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state (see [enum BodyState] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state , value . owned_to_variant ()) ; } } # [doc = "Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = "Destroys any of the objects created by PhysicsServer. If the [RID] passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , joint , axis , flag) ; ret as _ } } # [doc = "Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , joint , axis , param) ; ret as _ } } # [doc = "Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , joint , axis , flag , enable) ; } } # [doc = "Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , axis , param , value) ; } } # [doc = "Returns an Info defined by the [enum ProcessInfo] input given."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , process_info) ; ret as _ } } # [doc = "Gets a hinge_joint flag (see [enum HingeJointFlag] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , flag) ; ret as _ } } # [doc = "Gets a hinge_joint parameter (see [enum HingeJointParam])."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets a hinge_joint flag (see [enum HingeJointFlag] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , joint , flag , enabled) ; } } # [doc = "Sets a hinge_joint parameter (see [enum HingeJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = "Creates a [ConeTwistJoint]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; Rid :: from_sys (ret) } } # [doc = "Creates a [Generic6DOFJoint]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; Rid :: from_sys (ret) } } # [doc = "Creates a [HingeJoint]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , hinge_A , body_B , hinge_B) ; Rid :: from_sys (ret) } } # [doc = "Creates a [PinJoint]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_vec3_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body_A , local_A , body_B , local_B) ; Rid :: from_sys (ret) } } # [doc = "Creates a [SliderJoint]."] # [doc = ""] # [inline] pub 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 :: icallptr_rid_rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; Rid :: from_sys (ret) } } # [doc = "Gets the priority value of the Joint."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , joint) ; ret as _ } } # [doc = "Returns the type of the Joint."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , joint) ; crate :: generated :: physics_server :: JointType (ret) } } # [doc = "Sets the priority value of the Joint."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , priority) ; } } # [doc = "Returns position of the joint in the local space of body a of the joint."] # [doc = ""] # [inline] pub 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 :: icallptr_vec3_rid (method_bind , self . this . sys () . as_ptr () , joint) ; mem :: transmute (ret) } } # [doc = "Returns position of the joint in the local space of body b of the joint."] # [doc = ""] # [inline] pub 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 :: icallptr_vec3_rid (method_bind , self . this . sys () . as_ptr () , joint) ; mem :: transmute (ret) } } # [doc = "Gets a pin_joint parameter (see [enum PinJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets position of the joint in the local space of body a of the joint."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 = ""] # [inline] pub 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 :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , joint , local_B) ; } } # [doc = "Sets a pin_joint parameter (see [enum PinJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method 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 :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; Rid :: from_sys (ret) } } # [doc = "Returns the shape data."] # [doc = ""] # [inline] pub 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 :: icallptr_var_rid (method_bind , self . this . sys () . as_ptr () , shape) ; Variant :: from_sys (ret) } } # [doc = "Returns the type of shape (see [enum ShapeType] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , shape) ; crate :: generated :: physics_server :: ShapeType (ret) } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_var (method_bind , self . this . sys () . as_ptr () , shape , data . owned_to_variant ()) ; } } # [doc = "Gets a slider_joint parameter (see [enum SliderJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Gets a slider_joint parameter (see [enum SliderJointParam] constants)."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [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 [method area_set_space], or to a body with [method 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the state of a space, a [PhysicsDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = ""] # [inline] pub fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , space) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the value of a space parameter."] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param) ; ret as _ } } # [doc = "Returns whether the space is active."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , space) ; ret as _ } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , space , active) ; } } # [doc = "Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsServer { } unsafe impl GodotObject for PhysicsServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsServer" } } impl std :: ops :: Deref for PhysicsServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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 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 , 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 , 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\u{0}" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\u{0}" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\u{0}" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\u{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\u{0}" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\u{0}" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\u{0}" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\u{0}" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\u{0}" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\u{0}" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\u{0}" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . joint_create_hinge = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_hinge\u{0}" . as_ptr () as * const c_char) ; table . joint_create_pin = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_pin\u{0}" . as_ptr () as * const c_char) ; table . joint_create_slider = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_slider\u{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\u{0}" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{0}" . as_ptr () as * const c_char) ; table . shape_create = (gd_api . godot_method_bind_get_method) (class_name , "shape_create\u{0}" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\u{0}" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\u{0}" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\u{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\u{0}" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\u{0}" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\u{0}" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\u{0}" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_server::PhysicsServer;
            
            pub mod visual_instance {
                use super::*;
                # [doc = "`core class VisualInstance` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl VisualInstance { # [doc = "Returns the [AABB] (also known as the bounding box) for this [VisualInstance]. See also [method 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the RID of the resource associated with this [VisualInstance]. For example, if the Node is a [MeshInstance], this will return the RID of the associated [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the RID of this instance. This RID is the same as the RID returned by [method VisualServer.instance_create]. This RID is needed if you want to call [VisualServer] functions directly on this [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The render layer(s) this [VisualInstance] is drawn on.\nThis object will only be visible for [Camera]s whose cull mask includes the render object this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` when the specified layer is enabled in [member 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; ret as _ } } # [doc = "Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance].\nTransformed in this case means the [AABB] plus the position, rotation, and scale of the [Spatial]'s [Transform]. See also [method 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the resource that is instantiated by this [VisualInstance], which changes how the engine handles the [VisualInstance] under the hood. Equivalent to [method VisualServer.instance_set_base]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , base) ; } } # [doc = "The render layer(s) this [VisualInstance] is drawn on.\nThis object will only be visible for [Camera]s whose cull mask includes the render object this [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Enables a particular layer in [member 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , layer , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualInstance { } unsafe impl GodotObject for VisualInstance { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisualInstance { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VisualInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisualInstance { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\u{0}" . as_ptr () as * const c_char) ; table . get_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_instance\u{0}" . as_ptr () as * const c_char) ; table . get_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_transformed_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_transformed_aabb\u{0}" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\u{0}" . as_ptr () as * const c_char) ; table . set_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_mask\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_instance::VisualInstance;
            
            pub mod visual_script_class_constant {
                use super::*;
                # [doc = "`core class VisualScriptClassConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptClassConstant" } } impl std :: ops :: Deref for VisualScriptClassConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptClassConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptClassConstant { } impl Instanciable for VisualScriptClassConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_class_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_class_constant\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_class_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_class_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_class_constant::VisualScriptClassConstant;
            
            pub mod video_stream_gdnative {
                use super::*;
                # [doc = "`core class VideoStreamGDNative` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamGDNative" } } impl std :: ops :: Deref for VideoStreamGDNative { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamGDNative { } impl Instanciable for VideoStreamGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::video_stream_gdnative::VideoStreamGDNative;
            
            pub mod sprite_base_3d {
                use super::*;
                # [doc = "`core class SpriteBase3D` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 MAX : DrawFlags = DrawFlags (3i64) ; } 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SpriteBase3D { pub const ALPHA_CUT_DISABLED : i64 = 0i64 ; pub const ALPHA_CUT_DISCARD : i64 = 1i64 ; pub const ALPHA_CUT_OPAQUE_PREPASS : i64 = 2i64 ; pub const FLAG_DOUBLE_SIDED : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_SHADED : i64 = 1i64 ; pub const FLAG_TRANSPARENT : i64 = 0i64 ; } impl SpriteBase3D { # [doc = ""] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: sprite_base_3d :: AlphaCutMode (ret) } } # [doc = "The direction in which the front of the texture faces."] # [doc = ""] # [inline] pub fn axis (& self) -> vector3 :: Axis { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret as u32) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: BillboardMode (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 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light."] # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The objects visibility on a scale from `0` fully invisible to `1` fully visible."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [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_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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [doc = "A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light."] # [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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The objects visibility on a scale from `0` fully invisible to `1` fully visible."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , opacity) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixel_size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteBase3D { } unsafe impl GodotObject for SpriteBase3D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpriteBase3D { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteBase3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: object :: 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 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 } 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 , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\u{0}" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\u{0}" . as_ptr () as * const c_char) ; table . get_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_flag\u{0}" . as_ptr () as * const c_char) ; table . get_item_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_item_rect\u{0}" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_opacity\u{0}" . as_ptr () as * const c_char) ; table . get_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel_size\u{0}" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\u{0}" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\u{0}" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\u{0}" . as_ptr () as * const c_char) ; table . set_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_flag\u{0}" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\u{0}" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\u{0}" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_opacity\u{0}" . as_ptr () as * const c_char) ; table . set_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sprite_base_3d::SpriteBase3D;
            
            pub mod texture_array {
                use super::*;
                # [doc = "`core class TextureArray` inherits `TextureLayered` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureArray { } unsafe impl GodotObject for TextureArray { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextureArray" } } impl std :: ops :: Deref for TextureArray { type Target = crate :: generated :: texture_layered :: TextureLayered ; # [inline] fn deref (& self) -> & crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureArray { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture_layered :: TextureLayered > for TextureArray { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TextureArray { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TextureArray { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureArray { } impl Instanciable for TextureArray { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { TextureArray :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureArrayMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl TextureArrayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureArrayMethodTable = TextureArrayMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::texture_array::TextureArray;
            
            pub mod upnp {
                use super::*;
                # [doc = "`core class UPNP` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNP { pub const UPNP_RESULT_ACTION_FAILED : i64 = 5i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING : i64 = 13i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM : i64 = 12i64 ; pub const UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD : i64 = 10i64 ; pub const UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED : i64 = 7i64 ; pub const UPNP_RESULT_HTTP_ERROR : i64 = 23i64 ; pub const UPNP_RESULT_INCONSISTENT_PARAMETERS : i64 = 3i64 ; pub const UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED : i64 = 8i64 ; pub const UPNP_RESULT_INVALID_ARGS : i64 = 20i64 ; pub const UPNP_RESULT_INVALID_DURATION : i64 = 19i64 ; pub const UPNP_RESULT_INVALID_GATEWAY : i64 = 16i64 ; pub const UPNP_RESULT_INVALID_PARAM : i64 = 22i64 ; pub const UPNP_RESULT_INVALID_PORT : i64 = 17i64 ; pub const UPNP_RESULT_INVALID_PROTOCOL : i64 = 18i64 ; pub const UPNP_RESULT_INVALID_RESPONSE : i64 = 21i64 ; pub const UPNP_RESULT_MEM_ALLOC_ERROR : i64 = 25i64 ; pub const UPNP_RESULT_NOT_AUTHORIZED : i64 = 1i64 ; pub const UPNP_RESULT_NO_DEVICES : i64 = 27i64 ; pub const UPNP_RESULT_NO_GATEWAY : i64 = 26i64 ; pub const UPNP_RESULT_NO_PORT_MAPS_AVAILABLE : i64 = 11i64 ; pub const UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY : i64 = 4i64 ; pub const UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED : i64 = 15i64 ; pub const UPNP_RESULT_PORT_MAPPING_NOT_FOUND : i64 = 2i64 ; pub const UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD : i64 = 9i64 ; pub const UPNP_RESULT_SAME_PORT_VALUES_REQUIRED : i64 = 14i64 ; pub const UPNP_RESULT_SOCKET_ERROR : i64 = 24i64 ; pub const UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED : i64 = 6i64 ; pub const UPNP_RESULT_SUCCESS : i64 = 0i64 ; 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 , thread_access :: 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 :: upnp_device :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . add_device ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [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 :: icallptr_i64_i64_i64_str (method_bind , self . this . sys () . as_ptr () , timeout , ttl , device_filter . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_device (& self , index : i64) -> Option < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_gateway (& self) -> Option < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_gateway ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_device (& self , index : i64 , device : impl AsArg < crate :: generated :: upnp_device :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , index , 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ipv6) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , port) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNP" } } impl std :: ops :: Deref for UPNP { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNP { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNP { } impl Instanciable for UPNP { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\u{0}" . as_ptr () as * const c_char) ; table . clear_devices = (gd_api . godot_method_bind_get_method) (class_name , "clear_devices\u{0}" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\u{0}" . as_ptr () as * const c_char) ; table . discover = (gd_api . godot_method_bind_get_method) (class_name , "discover\u{0}" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\u{0}" . as_ptr () as * const c_char) ; table . get_device_count = (gd_api . godot_method_bind_get_method) (class_name , "get_device_count\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_gateway = (gd_api . godot_method_bind_get_method) (class_name , "get_gateway\u{0}" . as_ptr () as * const c_char) ; table . is_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "is_discover_ipv6\u{0}" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\u{0}" . as_ptr () as * const c_char) ; table . remove_device = (gd_api . godot_method_bind_get_method) (class_name , "remove_device\u{0}" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\u{0}" . as_ptr () as * const c_char) ; table . set_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_ipv6\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::upnp::UPNP;
            
            pub mod bullet_physics_server {
                use super::*;
                # [doc = "`core class BulletPhysicsServer` inherits `PhysicsServer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl BulletPhysicsServer { } impl gdnative_core :: private :: godot_object :: Sealed for BulletPhysicsServer { } unsafe impl GodotObject for BulletPhysicsServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BulletPhysicsServer" } } impl std :: ops :: Deref for BulletPhysicsServer { type Target = crate :: generated :: physics_server :: PhysicsServer ; # [inline] fn deref (& self) -> & crate :: generated :: physics_server :: PhysicsServer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BulletPhysicsServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_server :: PhysicsServer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_server :: PhysicsServer > for BulletPhysicsServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for BulletPhysicsServer { }
            }
            pub use crate::generated::bullet_physics_server::BulletPhysicsServer;
            
            pub mod window_dialog {
                use super::*;
                # [doc = "`core class WindowDialog` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]."] # [doc = ""] # [inline] pub fn get_close_button (& self) -> Option < Ref < crate :: generated :: texture_button :: TextureButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_close_button ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture_button :: TextureButton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , resizable) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for WindowDialog { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WindowDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for WindowDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for WindowDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for WindowDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for WindowDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for WindowDialog { } impl Instanciable for WindowDialog { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_resizable = (gd_api . godot_method_bind_get_method) (class_name , "get_resizable\u{0}" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\u{0}" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\u{0}" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::window_dialog::WindowDialog;
            
            pub mod touch_screen_button {
                use super::*;
                # [doc = "`core class TouchScreenButton` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The button's bitmask."] # [doc = ""] # [inline] pub fn bitmask (& self) -> Option < Ref < crate :: generated :: bit_map :: BitMap , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_bitmask ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bit_map :: BitMap , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The button's shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The button's texture for the normal state."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The button's texture for the pressed state."] # [doc = ""] # [inline] pub fn texture_pressed (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_texture_pressed ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The button's visibility mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: touch_screen_button :: VisibilityMode (ret) } } # [doc = "If `true`, pass-by presses are enabled."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The button's action. Actions can be handled with [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 :: icallptr_void_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 :: bit_map :: BitMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_bitmask ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , bitmask . as_arg_ptr ()) ; } } # [doc = "If `true`, pass-by presses are enabled."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The button's shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape_2d :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , bool) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , bool) ; } } # [doc = "The button's texture for the normal state."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_texture_pressed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture_pressed . as_arg_ptr ()) ; } } # [doc = "The button's visibility mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TouchScreenButton { } unsafe impl GodotObject for TouchScreenButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TouchScreenButton { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TouchScreenButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for TouchScreenButton { } impl Instanciable for TouchScreenButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "get_bitmask\u{0}" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_pressed\u{0}" . as_ptr () as * const c_char) ; table . get_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\u{0}" . as_ptr () as * const c_char) ; table . is_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_centered\u{0}" . as_ptr () as * const c_char) ; table . is_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_visible\u{0}" . as_ptr () as * const c_char) ; table . set_action = (gd_api . godot_method_bind_get_method) (class_name , "set_action\u{0}" . as_ptr () as * const c_char) ; table . set_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "set_bitmask\u{0}" . as_ptr () as * const c_char) ; table . set_passby_press = (gd_api . godot_method_bind_get_method) (class_name , "set_passby_press\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; table . set_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_centered\u{0}" . as_ptr () as * const c_char) ; table . set_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_visible\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::touch_screen_button::TouchScreenButton;
            
            pub mod resource_preloader {
                use super::*;
                # [doc = "`core class ResourcePreloader` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . add_resource ; let ret = crate :: icalls :: icallptr_void_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 :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . get_resource ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the list of resources inside the preloader."] # [doc = ""] # [inline] pub fn get_resource_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . get_resource_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ResourcePreloader { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourcePreloader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for ResourcePreloader { } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourcePreloader { } impl Instanciable for ResourcePreloader { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_resource\u{0}" . as_ptr () as * const c_char) ; table . get_resource_list = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_list\u{0}" . as_ptr () as * const c_char) ; table . has_resource = (gd_api . godot_method_bind_get_method) (class_name , "has_resource\u{0}" . as_ptr () as * const c_char) ; table . remove_resource = (gd_api . godot_method_bind_get_method) (class_name , "remove_resource\u{0}" . as_ptr () as * const c_char) ; table . rename_resource = (gd_api . godot_method_bind_get_method) (class_name , "rename_resource\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::resource_preloader::ResourcePreloader;
            
            pub mod pin_joint_2d {
                use super::*;
                # [doc = "`core class PinJoint2D` inherits `Joint2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , softness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint2D { } unsafe impl GodotObject for PinJoint2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PinJoint2D { type Target = crate :: generated :: joint_2d :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint_2d :: Joint2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for PinJoint2D { } impl Instanciable for PinJoint2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_softness = (gd_api . godot_method_bind_get_method) (class_name , "set_softness\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::pin_joint_2d::PinJoint2D;
            
            pub mod editor_spatial_gizmo_plugin {
                use super::*;
                # [doc = "`tools class EditorSpatialGizmoPlugin` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorSpatialGizmoPlugin { # [doc = "Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden."] # [doc = ""] # [inline] pub fn add_material (& self , name : impl Into < GodotString > , material : impl AsArg < crate :: generated :: spatial_material :: SpatialMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . add_material ; let ret = crate :: icalls :: icallptr_void_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 [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden.\n# Default Arguments\n* `billboard` - `false`"] # [doc = ""] # [inline] pub fn create_handle_material (& self , name : impl Into < GodotString > , billboard : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_handle_material ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , billboard) ; } } # [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 [method get_material] and used in [method 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 :: 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 :: icallptr_void_str_obj_bool_color (method_bind , self . this . sys () . as_ptr () , name . into () , texture . as_arg_ptr () , on_top , 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 [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method 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 :: icallptr_void_str_color_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , name . into () , color , billboard , on_top , use_vertex_color) ; } } # [doc = "Gets material from the internal list of materials. If an [EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable)."] # [doc = ""] # [inline] pub fn get_material (& self , name : impl Into < GodotString > , gizmo : impl AsArg < crate :: generated :: editor_spatial_gizmo :: EditorSpatialGizmo >) -> Option < Ref < crate :: generated :: spatial_material :: SpatialMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , gizmo . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial_material :: SpatialMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpatialGizmoPlugin { } unsafe impl GodotObject for EditorSpatialGizmoPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmoPlugin" } } impl std :: ops :: Deref for EditorSpatialGizmoPlugin { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmoPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_handle_material = (gd_api . godot_method_bind_get_method) (class_name , "create_handle_material\u{0}" . as_ptr () as * const c_char) ; table . create_icon_material = (gd_api . godot_method_bind_get_method) (class_name , "create_icon_material\u{0}" . as_ptr () as * const c_char) ; table . create_material = (gd_api . godot_method_bind_get_method) (class_name , "create_material\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_spatial_gizmo_plugin::EditorSpatialGizmoPlugin;
            
            pub mod audio_effect_distortion {
                use super::*;
                # [doc = "`core class AudioEffectDistortion` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectDistortion { pub const MODE_ATAN : i64 = 1i64 ; pub const MODE_CLIP : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_distortion :: Mode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , drive) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , keep_hf_hz) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , post_gain) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pre_gain) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectDistortion { } unsafe impl GodotObject for AudioEffectDistortion { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectDistortion" } } impl std :: ops :: Deref for AudioEffectDistortion { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectDistortion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectDistortion { } impl Instanciable for AudioEffectDistortion { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{0}" . as_ptr () as * const c_char) ; table . get_post_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_post_gain\u{0}" . as_ptr () as * const c_char) ; table . get_pre_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_gain\u{0}" . as_ptr () as * const c_char) ; table . set_drive = (gd_api . godot_method_bind_get_method) (class_name , "set_drive\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{0}" . as_ptr () as * const c_char) ; table . set_post_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_post_gain\u{0}" . as_ptr () as * const c_char) ; table . set_pre_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_gain\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_distortion::AudioEffectDistortion;
            
            pub mod encoded_object_as_id {
                use super::*;
                # [doc = "`core class EncodedObjectAsID` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] identifier stored in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Object] identifier stored in this [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EncodedObjectAsID { } unsafe impl GodotObject for EncodedObjectAsID { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EncodedObjectAsID" } } impl std :: ops :: Deref for EncodedObjectAsID { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EncodedObjectAsID { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EncodedObjectAsID { } unsafe impl SubClass < crate :: generated :: object :: Object > for EncodedObjectAsID { } impl Instanciable for EncodedObjectAsID { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_object_id = (gd_api . godot_method_bind_get_method) (class_name , "set_object_id\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::encoded_object_as_id::EncodedObjectAsID;
            
            pub mod http_client {
                use super::*;
                # [doc = "`core class HTTPClient` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HTTPClient { pub const METHOD_CONNECT : i64 = 7i64 ; pub const METHOD_DELETE : i64 = 4i64 ; pub const METHOD_GET : i64 = 0i64 ; pub const METHOD_HEAD : i64 = 1i64 ; pub const METHOD_MAX : i64 = 9i64 ; pub const METHOD_OPTIONS : i64 = 5i64 ; pub const METHOD_PATCH : i64 = 8i64 ; pub const METHOD_POST : i64 = 2i64 ; pub const METHOD_PUT : i64 = 3i64 ; pub const METHOD_TRACE : i64 = 6i64 ; pub const RESPONSE_ACCEPTED : i64 = 202i64 ; pub const RESPONSE_ALREADY_REPORTED : i64 = 208i64 ; pub const RESPONSE_BAD_GATEWAY : i64 = 502i64 ; pub const RESPONSE_BAD_REQUEST : i64 = 400i64 ; pub const RESPONSE_CONFLICT : i64 = 409i64 ; pub const RESPONSE_CONTINUE : i64 = 100i64 ; pub const RESPONSE_CREATED : i64 = 201i64 ; pub const RESPONSE_EXPECTATION_FAILED : i64 = 417i64 ; pub const RESPONSE_FAILED_DEPENDENCY : i64 = 424i64 ; pub const RESPONSE_FORBIDDEN : i64 = 403i64 ; pub const RESPONSE_FOUND : i64 = 302i64 ; pub const RESPONSE_GATEWAY_TIMEOUT : i64 = 504i64 ; pub const RESPONSE_GONE : i64 = 410i64 ; pub const RESPONSE_HTTP_VERSION_NOT_SUPPORTED : i64 = 505i64 ; pub const RESPONSE_IM_A_TEAPOT : i64 = 418i64 ; pub const RESPONSE_IM_USED : i64 = 226i64 ; pub const RESPONSE_INSUFFICIENT_STORAGE : i64 = 507i64 ; pub const RESPONSE_INTERNAL_SERVER_ERROR : i64 = 500i64 ; pub const RESPONSE_LENGTH_REQUIRED : i64 = 411i64 ; pub const RESPONSE_LOCKED : i64 = 423i64 ; pub const RESPONSE_LOOP_DETECTED : i64 = 508i64 ; pub const RESPONSE_METHOD_NOT_ALLOWED : i64 = 405i64 ; pub const RESPONSE_MISDIRECTED_REQUEST : i64 = 421i64 ; pub const RESPONSE_MOVED_PERMANENTLY : i64 = 301i64 ; pub const RESPONSE_MULTIPLE_CHOICES : i64 = 300i64 ; pub const RESPONSE_MULTI_STATUS : i64 = 207i64 ; pub const RESPONSE_NETWORK_AUTH_REQUIRED : i64 = 511i64 ; pub const RESPONSE_NON_AUTHORITATIVE_INFORMATION : i64 = 203i64 ; pub const RESPONSE_NOT_ACCEPTABLE : i64 = 406i64 ; pub const RESPONSE_NOT_EXTENDED : i64 = 510i64 ; pub const RESPONSE_NOT_FOUND : i64 = 404i64 ; pub const RESPONSE_NOT_IMPLEMENTED : i64 = 501i64 ; pub const RESPONSE_NOT_MODIFIED : i64 = 304i64 ; pub const RESPONSE_NO_CONTENT : i64 = 204i64 ; pub const RESPONSE_OK : i64 = 200i64 ; pub const RESPONSE_PARTIAL_CONTENT : i64 = 206i64 ; pub const RESPONSE_PAYMENT_REQUIRED : i64 = 402i64 ; pub const RESPONSE_PERMANENT_REDIRECT : i64 = 308i64 ; pub const RESPONSE_PRECONDITION_FAILED : i64 = 412i64 ; pub const RESPONSE_PRECONDITION_REQUIRED : i64 = 428i64 ; pub const RESPONSE_PROCESSING : i64 = 102i64 ; pub const RESPONSE_PROXY_AUTHENTICATION_REQUIRED : i64 = 407i64 ; pub const RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE : i64 = 416i64 ; pub const RESPONSE_REQUEST_ENTITY_TOO_LARGE : i64 = 413i64 ; pub const RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE : i64 = 431i64 ; pub const RESPONSE_REQUEST_TIMEOUT : i64 = 408i64 ; pub const RESPONSE_REQUEST_URI_TOO_LONG : i64 = 414i64 ; pub const RESPONSE_RESET_CONTENT : i64 = 205i64 ; pub const RESPONSE_SEE_OTHER : i64 = 303i64 ; pub const RESPONSE_SERVICE_UNAVAILABLE : i64 = 503i64 ; pub const RESPONSE_SWITCHING_PROTOCOLS : i64 = 101i64 ; pub const RESPONSE_SWITCH_PROXY : i64 = 306i64 ; pub const RESPONSE_TEMPORARY_REDIRECT : i64 = 307i64 ; pub const RESPONSE_TOO_MANY_REQUESTS : i64 = 429i64 ; pub const RESPONSE_UNAUTHORIZED : i64 = 401i64 ; pub const RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS : i64 = 451i64 ; pub const RESPONSE_UNPROCESSABLE_ENTITY : i64 = 422i64 ; pub const RESPONSE_UNSUPPORTED_MEDIA_TYPE : i64 = 415i64 ; pub const RESPONSE_UPGRADE_REQUIRED : i64 = 426i64 ; pub const RESPONSE_USE_PROXY : i64 = 305i64 ; pub const RESPONSE_VARIANT_ALSO_NEGOTIATES : i64 = 506i64 ; pub const STATUS_BODY : i64 = 7i64 ; pub const STATUS_CANT_CONNECT : i64 = 4i64 ; pub const STATUS_CANT_RESOLVE : i64 = 2i64 ; pub const STATUS_CONNECTED : i64 = 5i64 ; pub const STATUS_CONNECTING : i64 = 3i64 ; pub const STATUS_CONNECTION_ERROR : i64 = 8i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_REQUESTING : i64 = 6i64 ; pub const STATUS_RESOLVING : i64 = 1i64 ; pub const STATUS_SSL_HANDSHAKE_ERROR : i64 = 9i64 ; } 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 , thread_access :: 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]."] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void (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 :: icallptr_i64_str_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , host . into () , port , use_ssl , verify_host) ; GodotError :: result_from_sys (ret as _) } } # [doc = "The connection to use for this client."] # [doc = ""] # [inline] pub fn connection (& self) -> Option < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_connection ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the response headers."] # [doc = ""] # [inline] pub fn get_response_headers (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_response_headers ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns a [enum Status] constant. Need to call [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: http_client :: Status (ret) } } # [doc = "If `true`, this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "This needs to be called in order to have any request processed. Check results with [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_str_dict (method_bind , self . this . sys () . as_ptr () , fields) ; GodotString :: from_sys (ret) } } # [doc = "Reads one chunk from the response."] # [doc = ""] # [inline] pub fn read_response_body_chunk (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . read_response_body_chunk ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSends a request to the connected host. The URL parameter is just the part after the host, so for `http://somehost.com/index.php`, it is `index.php`.\nHeaders are HTTP request headers. For available HTTP methods, see [enum 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 [constant 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 [method String.http_escape] for an example.\n# Default Arguments\n* `body` - `\"\"`"] # [doc = ""] # [inline] pub fn request (& self , method : i64 , url : impl Into < GodotString > , headers : StringArray , body : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . request ; let ret = crate :: icalls :: icallptr_i64_i64_str_strarr_str (method_bind , self . this . sys () . as_ptr () , method , url . into () , headers , body . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sends a raw request to the connected host. The URL parameter is just the part after the host, so for `http://somehost.com/index.php`, it is `index.php`.\nHeaders are HTTP request headers. For available HTTP methods, see [enum 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 : StringArray , body : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . request_raw ; let ret = crate :: icalls :: icallptr_i64_i64_str_strarr_bytearr (method_bind , self . this . sys () . as_ptr () , method , url . into () , headers , body) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The connection to use for this client."] # [doc = ""] # [inline] pub fn set_connection (& self , connection : impl AsArg < crate :: generated :: stream_peer :: StreamPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_connection ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , connection . as_arg_ptr ()) ; } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HTTPClient { } unsafe impl GodotObject for HTTPClient { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HTTPClient" } } impl std :: ops :: Deref for HTTPClient { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HTTPClient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for HTTPClient { } unsafe impl SubClass < crate :: generated :: object :: Object > for HTTPClient { } impl Instanciable for HTTPClient { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\u{0}" . as_ptr () as * const c_char) ; table . get_connection = (gd_api . godot_method_bind_get_method) (class_name , "get_connection\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_response_code = (gd_api . godot_method_bind_get_method) (class_name , "get_response_code\u{0}" . as_ptr () as * const c_char) ; table . get_response_headers = (gd_api . godot_method_bind_get_method) (class_name , "get_response_headers\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\u{0}" . as_ptr () as * const c_char) ; table . has_response = (gd_api . godot_method_bind_get_method) (class_name , "has_response\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_response_chunked = (gd_api . godot_method_bind_get_method) (class_name , "is_response_chunked\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . request = (gd_api . godot_method_bind_get_method) (class_name , "request\u{0}" . as_ptr () as * const c_char) ; table . request_raw = (gd_api . godot_method_bind_get_method) (class_name , "request_raw\u{0}" . as_ptr () as * const c_char) ; table . set_blocking_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blocking_mode\u{0}" . as_ptr () as * const c_char) ; table . set_connection = (gd_api . godot_method_bind_get_method) (class_name , "set_connection\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::http_client::HTTPClient;
            
            pub mod native_script {
                use super::*;
                # [doc = "`core class NativeScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , signal_name . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: gdnative_library :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NativeScript" } } impl std :: ops :: Deref for NativeScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NativeScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for NativeScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NativeScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NativeScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for NativeScript { } impl Instanciable for NativeScript { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_class_name\u{0}" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\u{0}" . as_ptr () as * const c_char) ; table . get_method_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_method_documentation\u{0}" . as_ptr () as * const c_char) ; table . get_property_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_property_documentation\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_signal_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_documentation\u{0}" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\u{0}" . as_ptr () as * const c_char) ; table . set_class_name = (gd_api . godot_method_bind_get_method) (class_name , "set_class_name\u{0}" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::native_script::NativeScript;
            
            pub mod animation_tree_player {
                use super::*;
                # [doc = "`core class AnimationTreePlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationTreePlayer { pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; pub const NODE_ANIMATION : i64 = 1i64 ; pub const NODE_BLEND2 : i64 = 4i64 ; pub const NODE_BLEND3 : i64 = 5i64 ; pub const NODE_BLEND4 : i64 = 6i64 ; pub const NODE_MIX : i64 = 3i64 ; pub const NODE_ONESHOT : i64 = 2i64 ; pub const NODE_OUTPUT : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , _type , 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; } } # [doc = "Returns the [AnimationPlayer]'s [Animation] bound to the [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 :: Animation , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_animation ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the name of the [member master_player]'s [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Binds a new [Animation] from the [member master_player] to the [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 :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_animation ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [doc = "Binds the [Animation] named `source` from [member 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 :: icallptr_void_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 :: icallptr_bool_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [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 :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_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 :: icallptr_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_input_idx) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_tree_player :: AnimationProcessMode (ret) } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [Animation] nodes can be added to the [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Returns a [PoolStringArray] containing the name of all nodes."] # [doc = ""] # [inline] pub fn get_node_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_node_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , ratio) ; } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , node . into ()) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; mem :: transmute (ret) } } # [doc = "Gets the node type, will return from [enum 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; crate :: generated :: animation_tree_player :: NodeType (ret) } } # [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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , node . into () , new_name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , id . into () , enable) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , delay_sec) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , rand_sec) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } # [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 :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Resets this [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [Animation] nodes can be added to the [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 :: icallptr_void_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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the time scale of the TimeScale node with name `id` to `scale`.\nThe TimeScale node is used to speed [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , scale) ; } } # [doc = "Sets the time seek value of the TimeSeek node with name `id` to `seconds`.\nThis functions as a seek in the [Animation] or the blend or mix of [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , seconds) ; } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; ret as _ } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; } } # [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 :: icallptr_void_str_i64_bool (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx , enable) ; } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , count) ; } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTreePlayer { } unsafe impl GodotObject for AnimationTreePlayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimationTreePlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTreePlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimationTreePlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationTreePlayer { } impl Instanciable for AnimationTreePlayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . are_nodes_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_nodes_connected\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes\u{0}" . as_ptr () as * const c_char) ; table . disconnect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_nodes\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\u{0}" . as_ptr () as * const c_char) ; table . get_master_player = (gd_api . godot_method_bind_get_method) (class_name , "get_master_player\u{0}" . as_ptr () as * const c_char) ; table . get_node_list = (gd_api . godot_method_bind_get_method) (class_name , "get_node_list\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . node_exists = (gd_api . godot_method_bind_get_method) (class_name , "node_exists\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . node_get_position = (gd_api . godot_method_bind_get_method) (class_name , "node_get_position\u{0}" . as_ptr () as * const c_char) ; table . node_get_type = (gd_api . godot_method_bind_get_method) (class_name , "node_get_type\u{0}" . as_ptr () as * const c_char) ; table . node_rename = (gd_api . godot_method_bind_get_method) (class_name , "node_rename\u{0}" . as_ptr () as * const c_char) ; table . node_set_position = (gd_api . godot_method_bind_get_method) (class_name , "node_set_position\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . oneshot_node_start = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_start\u{0}" . as_ptr () as * const c_char) ; table . oneshot_node_stop = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_stop\u{0}" . as_ptr () as * const c_char) ; table . recompute_caches = (gd_api . godot_method_bind_get_method) (class_name , "recompute_caches\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\u{0}" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\u{0}" . as_ptr () as * const c_char) ; table . set_master_player = (gd_api . godot_method_bind_get_method) (class_name , "set_master_player\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . timeseek_node_seek = (gd_api . godot_method_bind_get_method) (class_name , "timeseek_node_seek\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_tree_player::AnimationTreePlayer;
            
            pub mod curve_texture {
                use super::*;
                # [doc = "`core class CurveTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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` rendered onto the texture."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The `curve` rendered onto the texture."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } # [doc = "The width of the texture."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CurveTexture { } unsafe impl GodotObject for CurveTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CurveTexture" } } impl std :: ops :: Deref for CurveTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CurveTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for CurveTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CurveTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CurveTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for CurveTexture { } impl Instanciable for CurveTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\u{0}" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::curve_texture::CurveTexture;
            
            pub mod animation_node_state_machine_playback {
                use super::*;
                # [doc = "`core class AnimationNodeStateMachinePlayback` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current travel path as computed internally by the A* algorithm."] # [doc = ""] # [inline] pub fn get_travel_path (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . get_travel_path ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachinePlayback" } } impl std :: ops :: Deref for AnimationNodeStateMachinePlayback { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachinePlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeStateMachinePlayback { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeStateMachinePlayback { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeStateMachinePlayback { } impl Instanciable for AnimationNodeStateMachinePlayback { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_current_node = (gd_api . godot_method_bind_get_method) (class_name , "get_current_node\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_travel_path = (gd_api . godot_method_bind_get_method) (class_name , "get_travel_path\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; table . travel = (gd_api . godot_method_bind_get_method) (class_name , "travel\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_state_machine_playback::AnimationNodeStateMachinePlayback;
            
            pub mod global_constants {
                use super::*;
                # [doc = "`core singleton class GlobalConstants` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GlobalConstants { pub const BUTTON_LEFT : i64 = 1i64 ; pub const BUTTON_MASK_LEFT : i64 = 1i64 ; pub const BUTTON_MASK_MIDDLE : i64 = 4i64 ; pub const BUTTON_MASK_RIGHT : i64 = 2i64 ; pub const BUTTON_MASK_XBUTTON1 : i64 = 128i64 ; pub const BUTTON_MASK_XBUTTON2 : i64 = 256i64 ; pub const BUTTON_MIDDLE : i64 = 3i64 ; pub const BUTTON_RIGHT : i64 = 2i64 ; pub const BUTTON_WHEEL_DOWN : i64 = 5i64 ; pub const BUTTON_WHEEL_LEFT : i64 = 6i64 ; pub const BUTTON_WHEEL_RIGHT : i64 = 7i64 ; pub const BUTTON_WHEEL_UP : i64 = 4i64 ; pub const BUTTON_XBUTTON1 : i64 = 8i64 ; pub const BUTTON_XBUTTON2 : i64 = 9i64 ; pub const CORNER_BOTTOM_LEFT : i64 = 3i64 ; pub const CORNER_BOTTOM_RIGHT : i64 = 2i64 ; pub const CORNER_TOP_LEFT : i64 = 0i64 ; pub const CORNER_TOP_RIGHT : i64 = 1i64 ; pub const ERR_ALREADY_EXISTS : i64 = 32i64 ; pub const ERR_ALREADY_IN_USE : i64 = 22i64 ; pub const ERR_BUG : i64 = 47i64 ; pub const ERR_BUSY : i64 = 44i64 ; pub const ERR_CANT_ACQUIRE_RESOURCE : i64 = 28i64 ; pub const ERR_CANT_CONNECT : i64 = 25i64 ; pub const ERR_CANT_CREATE : i64 = 20i64 ; pub const ERR_CANT_FORK : i64 = 29i64 ; pub const ERR_CANT_OPEN : i64 = 19i64 ; pub const ERR_CANT_RESOLVE : i64 = 26i64 ; pub const ERR_COMPILATION_FAILED : i64 = 36i64 ; pub const ERR_CONNECTION_ERROR : i64 = 27i64 ; pub const ERR_CYCLIC_LINK : i64 = 40i64 ; pub const ERR_DATABASE_CANT_READ : i64 = 34i64 ; pub const ERR_DATABASE_CANT_WRITE : i64 = 35i64 ; pub const ERR_DOES_NOT_EXIST : i64 = 33i64 ; pub const ERR_DUPLICATE_SYMBOL : i64 = 42i64 ; pub const ERR_FILE_ALREADY_IN_USE : i64 = 11i64 ; pub const ERR_FILE_BAD_DRIVE : i64 = 8i64 ; pub const ERR_FILE_BAD_PATH : i64 = 9i64 ; pub const ERR_FILE_CANT_OPEN : i64 = 12i64 ; pub const ERR_FILE_CANT_READ : i64 = 14i64 ; pub const ERR_FILE_CANT_WRITE : i64 = 13i64 ; pub const ERR_FILE_CORRUPT : i64 = 16i64 ; pub const ERR_FILE_EOF : i64 = 18i64 ; pub const ERR_FILE_MISSING_DEPENDENCIES : i64 = 17i64 ; pub const ERR_FILE_NOT_FOUND : i64 = 7i64 ; pub const ERR_FILE_NO_PERMISSION : i64 = 10i64 ; pub const ERR_FILE_UNRECOGNIZED : i64 = 15i64 ; pub const ERR_HELP : i64 = 46i64 ; pub const ERR_INVALID_DATA : i64 = 30i64 ; pub const ERR_INVALID_DECLARATION : i64 = 41i64 ; pub const ERR_INVALID_PARAMETER : i64 = 31i64 ; pub const ERR_LINK_FAILED : i64 = 38i64 ; pub const ERR_LOCKED : i64 = 23i64 ; pub const ERR_METHOD_NOT_FOUND : i64 = 37i64 ; pub const ERR_OUT_OF_MEMORY : i64 = 6i64 ; pub const ERR_PARAMETER_RANGE_ERROR : i64 = 5i64 ; pub const ERR_PARSE_ERROR : i64 = 43i64 ; pub const ERR_PRINTER_ON_FIRE : i64 = 48i64 ; pub const ERR_QUERY_FAILED : i64 = 21i64 ; pub const ERR_SCRIPT_FAILED : i64 = 39i64 ; pub const ERR_SKIP : i64 = 45i64 ; pub const ERR_TIMEOUT : i64 = 24i64 ; pub const ERR_UNAUTHORIZED : i64 = 4i64 ; pub const ERR_UNAVAILABLE : i64 = 2i64 ; pub const ERR_UNCONFIGURED : i64 = 3i64 ; pub const FAILED : i64 = 1i64 ; pub const HALIGN_CENTER : i64 = 1i64 ; pub const HALIGN_LEFT : i64 = 0i64 ; pub const HALIGN_RIGHT : i64 = 2i64 ; pub const HORIZONTAL : i64 = 0i64 ; pub const JOY_ANALOG_L2 : i64 = 6i64 ; pub const JOY_ANALOG_LX : i64 = 0i64 ; pub const JOY_ANALOG_LY : i64 = 1i64 ; pub const JOY_ANALOG_R2 : i64 = 7i64 ; pub const JOY_ANALOG_RX : i64 = 2i64 ; pub const JOY_ANALOG_RY : i64 = 3i64 ; pub const JOY_AXIS_0 : i64 = 0i64 ; pub const JOY_AXIS_1 : i64 = 1i64 ; pub const JOY_AXIS_2 : i64 = 2i64 ; pub const JOY_AXIS_3 : i64 = 3i64 ; pub const JOY_AXIS_4 : i64 = 4i64 ; pub const JOY_AXIS_5 : i64 = 5i64 ; pub const JOY_AXIS_6 : i64 = 6i64 ; pub const JOY_AXIS_7 : i64 = 7i64 ; pub const JOY_AXIS_8 : i64 = 8i64 ; pub const JOY_AXIS_9 : i64 = 9i64 ; pub const JOY_AXIS_MAX : i64 = 10i64 ; pub const JOY_BUTTON_0 : i64 = 0i64 ; pub const JOY_BUTTON_1 : i64 = 1i64 ; pub const JOY_BUTTON_10 : i64 = 10i64 ; pub const JOY_BUTTON_11 : i64 = 11i64 ; pub const JOY_BUTTON_12 : i64 = 12i64 ; pub const JOY_BUTTON_13 : i64 = 13i64 ; pub const JOY_BUTTON_14 : i64 = 14i64 ; pub const JOY_BUTTON_15 : i64 = 15i64 ; pub const JOY_BUTTON_16 : i64 = 16i64 ; pub const JOY_BUTTON_17 : i64 = 17i64 ; pub const JOY_BUTTON_18 : i64 = 18i64 ; pub const JOY_BUTTON_19 : i64 = 19i64 ; pub const JOY_BUTTON_2 : i64 = 2i64 ; pub const JOY_BUTTON_20 : i64 = 20i64 ; pub const JOY_BUTTON_21 : i64 = 21i64 ; pub const JOY_BUTTON_3 : i64 = 3i64 ; pub const JOY_BUTTON_4 : i64 = 4i64 ; pub const JOY_BUTTON_5 : i64 = 5i64 ; pub const JOY_BUTTON_6 : i64 = 6i64 ; pub const JOY_BUTTON_7 : i64 = 7i64 ; pub const JOY_BUTTON_8 : i64 = 8i64 ; pub const JOY_BUTTON_9 : i64 = 9i64 ; pub const JOY_BUTTON_MAX : i64 = 22i64 ; pub const JOY_DPAD_DOWN : i64 = 13i64 ; pub const JOY_DPAD_LEFT : i64 = 14i64 ; pub const JOY_DPAD_RIGHT : i64 = 15i64 ; pub const JOY_DPAD_UP : i64 = 12i64 ; pub const JOY_DS_A : i64 = 1i64 ; pub const JOY_DS_B : i64 = 0i64 ; pub const JOY_DS_X : i64 = 3i64 ; pub const JOY_DS_Y : i64 = 2i64 ; pub const JOY_INVALID_OPTION : i64 = - 1i64 ; pub const JOY_L : i64 = 4i64 ; pub const JOY_L2 : i64 = 6i64 ; pub const JOY_L3 : i64 = 8i64 ; pub const JOY_MISC1 : i64 = 16i64 ; pub const JOY_OCULUS_AX : i64 = 7i64 ; pub const JOY_OCULUS_BY : i64 = 1i64 ; pub const JOY_OCULUS_MENU : i64 = 3i64 ; pub const JOY_OPENVR_MENU : i64 = 1i64 ; pub const JOY_OPENVR_TOUCHPADX : i64 = 0i64 ; pub const JOY_OPENVR_TOUCHPADY : i64 = 1i64 ; pub const JOY_PADDLE1 : i64 = 17i64 ; pub const JOY_PADDLE2 : i64 = 18i64 ; pub const JOY_PADDLE3 : i64 = 19i64 ; pub const JOY_PADDLE4 : i64 = 20i64 ; pub const JOY_R : i64 = 5i64 ; pub const JOY_R2 : i64 = 7i64 ; pub const JOY_R3 : i64 = 9i64 ; pub const JOY_SELECT : i64 = 10i64 ; pub const JOY_SONY_CIRCLE : i64 = 1i64 ; pub const JOY_SONY_SQUARE : i64 = 2i64 ; pub const JOY_SONY_TRIANGLE : i64 = 3i64 ; pub const JOY_SONY_X : i64 = 0i64 ; pub const JOY_START : i64 = 11i64 ; pub const JOY_TOUCHPAD : i64 = 21i64 ; pub const JOY_VR_ANALOG_GRIP : i64 = 4i64 ; pub const JOY_VR_ANALOG_TRIGGER : i64 = 2i64 ; pub const JOY_VR_GRIP : i64 = 2i64 ; pub const JOY_VR_PAD : i64 = 14i64 ; pub const JOY_VR_TRIGGER : i64 = 15i64 ; pub const JOY_XBOX_A : i64 = 0i64 ; pub const JOY_XBOX_B : i64 = 1i64 ; pub const JOY_XBOX_X : i64 = 2i64 ; pub const JOY_XBOX_Y : i64 = 3i64 ; 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_A : i64 = 65i64 ; pub const KEY_AACUTE : i64 = 193i64 ; pub const KEY_ACIRCUMFLEX : i64 = 194i64 ; pub const KEY_ACUTE : i64 = 180i64 ; pub const KEY_ADIAERESIS : i64 = 196i64 ; pub const KEY_AE : i64 = 198i64 ; pub const KEY_AGRAVE : i64 = 192i64 ; pub const KEY_ALT : i64 = 16777240i64 ; pub const KEY_AMPERSAND : i64 = 38i64 ; pub const KEY_APOSTROPHE : i64 = 39i64 ; pub const KEY_ARING : i64 = 197i64 ; pub const KEY_ASCIICIRCUM : i64 = 94i64 ; pub const KEY_ASCIITILDE : i64 = 126i64 ; pub const KEY_ASTERISK : i64 = 42i64 ; pub const KEY_AT : i64 = 64i64 ; pub const KEY_ATILDE : i64 = 195i64 ; pub const KEY_B : i64 = 66i64 ; pub const KEY_BACK : i64 = 16777280i64 ; pub const KEY_BACKSLASH : i64 = 92i64 ; pub const KEY_BACKSPACE : i64 = 16777220i64 ; pub const KEY_BACKTAB : i64 = 16777219i64 ; pub const KEY_BAR : i64 = 124i64 ; pub const KEY_BASSBOOST : i64 = 16777287i64 ; pub const KEY_BASSDOWN : i64 = 16777289i64 ; pub const KEY_BASSUP : i64 = 16777288i64 ; pub const KEY_BRACELEFT : i64 = 123i64 ; pub const KEY_BRACERIGHT : i64 = 125i64 ; pub const KEY_BRACKETLEFT : i64 = 91i64 ; pub const KEY_BRACKETRIGHT : i64 = 93i64 ; pub const KEY_BROKENBAR : i64 = 166i64 ; pub const KEY_C : i64 = 67i64 ; pub const KEY_CAPSLOCK : i64 = 16777241i64 ; pub const KEY_CCEDILLA : i64 = 199i64 ; pub const KEY_CEDILLA : i64 = 184i64 ; pub const KEY_CENT : i64 = 162i64 ; pub const KEY_CLEAR : i64 = 16777228i64 ; pub const KEY_CODE_MASK : i64 = 33554431i64 ; pub const KEY_COLON : i64 = 58i64 ; pub const KEY_COMMA : i64 = 44i64 ; pub const KEY_CONTROL : i64 = 16777238i64 ; pub const KEY_COPYRIGHT : i64 = 169i64 ; pub const KEY_CURRENCY : i64 = 164i64 ; pub const KEY_D : i64 = 68i64 ; pub const KEY_DEGREE : i64 = 176i64 ; pub const KEY_DELETE : i64 = 16777224i64 ; pub const KEY_DIAERESIS : i64 = 168i64 ; pub const KEY_DIRECTION_L : i64 = 16777266i64 ; pub const KEY_DIRECTION_R : i64 = 16777267i64 ; pub const KEY_DIVISION : i64 = 247i64 ; pub const KEY_DOLLAR : i64 = 36i64 ; pub const KEY_DOWN : i64 = 16777234i64 ; pub const KEY_E : i64 = 69i64 ; pub const KEY_EACUTE : i64 = 201i64 ; pub const KEY_ECIRCUMFLEX : i64 = 202i64 ; pub const KEY_EDIAERESIS : i64 = 203i64 ; pub const KEY_EGRAVE : i64 = 200i64 ; pub const KEY_END : i64 = 16777230i64 ; pub const KEY_ENTER : i64 = 16777221i64 ; pub const KEY_EQUAL : i64 = 61i64 ; pub const KEY_ESCAPE : i64 = 16777217i64 ; pub const KEY_ETH : i64 = 208i64 ; pub const KEY_EXCLAM : i64 = 33i64 ; pub const KEY_EXCLAMDOWN : i64 = 161i64 ; pub const KEY_F : i64 = 70i64 ; pub const KEY_F1 : i64 = 16777244i64 ; 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_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_FAVORITES : i64 = 16777298i64 ; pub const KEY_FORWARD : i64 = 16777281i64 ; pub const KEY_G : i64 = 71i64 ; pub const KEY_GREATER : i64 = 62i64 ; pub const KEY_GUILLEMOTLEFT : i64 = 171i64 ; pub const KEY_GUILLEMOTRIGHT : i64 = 187i64 ; pub const KEY_H : i64 = 72i64 ; pub const KEY_HELP : i64 = 16777265i64 ; pub const KEY_HOME : i64 = 16777229i64 ; pub const KEY_HOMEPAGE : i64 = 16777297i64 ; pub const KEY_HYPER_L : i64 = 16777263i64 ; pub const KEY_HYPER_R : i64 = 16777264i64 ; pub const KEY_HYPHEN : i64 = 173i64 ; pub const KEY_I : i64 = 73i64 ; pub const KEY_IACUTE : i64 = 205i64 ; pub const KEY_ICIRCUMFLEX : i64 = 206i64 ; pub const KEY_IDIAERESIS : i64 = 207i64 ; pub const KEY_IGRAVE : i64 = 204i64 ; pub const KEY_INSERT : i64 = 16777223i64 ; pub const KEY_J : i64 = 74i64 ; pub const KEY_K : i64 = 75i64 ; 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_KP_ADD : i64 = 16777349i64 ; pub const KEY_KP_DIVIDE : i64 = 16777346i64 ; pub const KEY_KP_ENTER : i64 = 16777222i64 ; pub const KEY_KP_MULTIPLY : i64 = 16777345i64 ; pub const KEY_KP_PERIOD : i64 = 16777348i64 ; pub const KEY_KP_SUBTRACT : i64 = 16777347i64 ; pub const KEY_L : i64 = 76i64 ; 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_LAUNCHMAIL : i64 = 16777302i64 ; pub const KEY_LAUNCHMEDIA : i64 = 16777303i64 ; pub const KEY_LEFT : i64 = 16777231i64 ; pub const KEY_LESS : i64 = 60i64 ; pub const KEY_M : i64 = 77i64 ; pub const KEY_MACRON : i64 = 175i64 ; pub const KEY_MASCULINE : i64 = 186i64 ; pub const KEY_MASK_ALT : i64 = 67108864i64 ; pub const KEY_MASK_CMD : i64 = 134217728i64 ; pub const KEY_MASK_CTRL : i64 = 268435456i64 ; pub const KEY_MASK_GROUP_SWITCH : i64 = 1073741824i64 ; pub const KEY_MASK_KPAD : i64 = 536870912i64 ; pub const KEY_MASK_META : i64 = 134217728i64 ; pub const KEY_MASK_SHIFT : i64 = 33554432i64 ; pub const KEY_MEDIANEXT : i64 = 16777295i64 ; pub const KEY_MEDIAPLAY : i64 = 16777292i64 ; pub const KEY_MEDIAPREVIOUS : i64 = 16777294i64 ; pub const KEY_MEDIARECORD : i64 = 16777296i64 ; pub const KEY_MEDIASTOP : i64 = 16777293i64 ; pub const KEY_MENU : i64 = 16777262i64 ; pub const KEY_META : i64 = 16777239i64 ; pub const KEY_MINUS : i64 = 45i64 ; pub const KEY_MODIFIER_MASK : i64 = - 16777216i64 ; pub const KEY_MU : i64 = 181i64 ; pub const KEY_MULTIPLY : i64 = 215i64 ; pub const KEY_N : i64 = 78i64 ; pub const KEY_NOBREAKSPACE : i64 = 160i64 ; pub const KEY_NOTSIGN : i64 = 172i64 ; pub const KEY_NTILDE : i64 = 209i64 ; pub const KEY_NUMBERSIGN : i64 = 35i64 ; pub const KEY_NUMLOCK : i64 = 16777242i64 ; pub const KEY_O : i64 = 79i64 ; pub const KEY_OACUTE : i64 = 211i64 ; pub const KEY_OCIRCUMFLEX : i64 = 212i64 ; pub const KEY_ODIAERESIS : i64 = 214i64 ; pub const KEY_OGRAVE : i64 = 210i64 ; pub const KEY_ONEHALF : i64 = 189i64 ; pub const KEY_ONEQUARTER : i64 = 188i64 ; pub const KEY_ONESUPERIOR : i64 = 185i64 ; pub const KEY_OOBLIQUE : i64 = 216i64 ; pub const KEY_OPENURL : i64 = 16777301i64 ; pub const KEY_ORDFEMININE : i64 = 170i64 ; pub const KEY_OTILDE : i64 = 213i64 ; pub const KEY_P : i64 = 80i64 ; pub const KEY_PAGEDOWN : i64 = 16777236i64 ; pub const KEY_PAGEUP : i64 = 16777235i64 ; pub const KEY_PARAGRAPH : i64 = 182i64 ; pub const KEY_PARENLEFT : i64 = 40i64 ; pub const KEY_PARENRIGHT : i64 = 41i64 ; pub const KEY_PAUSE : i64 = 16777225i64 ; pub const KEY_PERCENT : i64 = 37i64 ; pub const KEY_PERIOD : i64 = 46i64 ; pub const KEY_PERIODCENTERED : i64 = 183i64 ; pub const KEY_PLUS : i64 = 43i64 ; pub const KEY_PLUSMINUS : i64 = 177i64 ; pub const KEY_PRINT : i64 = 16777226i64 ; pub const KEY_Q : i64 = 81i64 ; pub const KEY_QUESTION : i64 = 63i64 ; pub const KEY_QUESTIONDOWN : i64 = 191i64 ; pub const KEY_QUOTEDBL : i64 = 34i64 ; pub const KEY_QUOTELEFT : i64 = 96i64 ; pub const KEY_R : i64 = 82i64 ; pub const KEY_REFRESH : i64 = 16777283i64 ; pub const KEY_REGISTERED : i64 = 174i64 ; pub const KEY_RIGHT : i64 = 16777233i64 ; pub const KEY_S : i64 = 83i64 ; pub const KEY_SCROLLLOCK : i64 = 16777243i64 ; pub const KEY_SEARCH : i64 = 16777299i64 ; pub const KEY_SECTION : i64 = 167i64 ; pub const KEY_SEMICOLON : i64 = 59i64 ; pub const KEY_SHIFT : i64 = 16777237i64 ; pub const KEY_SLASH : i64 = 47i64 ; pub const KEY_SPACE : i64 = 32i64 ; pub const KEY_SSHARP : i64 = 223i64 ; pub const KEY_STANDBY : i64 = 16777300i64 ; pub const KEY_STERLING : i64 = 163i64 ; pub const KEY_STOP : i64 = 16777282i64 ; pub const KEY_SUPER_L : i64 = 16777260i64 ; pub const KEY_SUPER_R : i64 = 16777261i64 ; pub const KEY_SYSREQ : i64 = 16777227i64 ; pub const KEY_T : i64 = 84i64 ; pub const KEY_TAB : i64 = 16777218i64 ; pub const KEY_THORN : i64 = 222i64 ; pub const KEY_THREEQUARTERS : i64 = 190i64 ; pub const KEY_THREESUPERIOR : i64 = 179i64 ; pub const KEY_TREBLEDOWN : i64 = 16777291i64 ; pub const KEY_TREBLEUP : i64 = 16777290i64 ; pub const KEY_TWOSUPERIOR : i64 = 178i64 ; pub const KEY_U : i64 = 85i64 ; pub const KEY_UACUTE : i64 = 218i64 ; pub const KEY_UCIRCUMFLEX : i64 = 219i64 ; pub const KEY_UDIAERESIS : i64 = 220i64 ; pub const KEY_UGRAVE : i64 = 217i64 ; pub const KEY_UNDERSCORE : i64 = 95i64 ; pub const KEY_UNKNOWN : i64 = 33554431i64 ; pub const KEY_UP : i64 = 16777232i64 ; pub const KEY_V : i64 = 86i64 ; pub const KEY_VOLUMEDOWN : i64 = 16777284i64 ; pub const KEY_VOLUMEMUTE : i64 = 16777285i64 ; pub const KEY_VOLUMEUP : i64 = 16777286i64 ; pub const KEY_W : i64 = 87i64 ; pub const KEY_X : i64 = 88i64 ; pub const KEY_Y : i64 = 89i64 ; pub const KEY_YACUTE : i64 = 221i64 ; pub const KEY_YDIAERESIS : i64 = 255i64 ; pub const KEY_YEN : i64 = 165i64 ; pub const KEY_Z : i64 = 90i64 ; pub const MARGIN_BOTTOM : i64 = 3i64 ; pub const MARGIN_LEFT : i64 = 0i64 ; pub const MARGIN_RIGHT : i64 = 2i64 ; pub const MARGIN_TOP : i64 = 1i64 ; pub const METHOD_FLAGS_DEFAULT : i64 = 1i64 ; pub const METHOD_FLAG_CONST : i64 = 8i64 ; pub const METHOD_FLAG_EDITOR : i64 = 2i64 ; pub const METHOD_FLAG_FROM_SCRIPT : i64 = 64i64 ; pub const METHOD_FLAG_NORMAL : i64 = 1i64 ; pub const METHOD_FLAG_NOSCRIPT : i64 = 4i64 ; pub const METHOD_FLAG_REVERSE : i64 = 16i64 ; pub const METHOD_FLAG_VIRTUAL : i64 = 32i64 ; pub const MIDI_MESSAGE_AFTERTOUCH : i64 = 10i64 ; pub const MIDI_MESSAGE_CHANNEL_PRESSURE : i64 = 13i64 ; pub const MIDI_MESSAGE_CONTROL_CHANGE : i64 = 11i64 ; pub const MIDI_MESSAGE_NOTE_OFF : i64 = 8i64 ; pub const MIDI_MESSAGE_NOTE_ON : i64 = 9i64 ; pub const MIDI_MESSAGE_PITCH_BEND : i64 = 14i64 ; pub const MIDI_MESSAGE_PROGRAM_CHANGE : i64 = 12i64 ; pub const OK : i64 = 0i64 ; pub const OP_ADD : i64 = 6i64 ; pub const OP_AND : i64 = 20i64 ; pub const OP_BIT_AND : i64 = 16i64 ; pub const OP_BIT_NEGATE : i64 = 19i64 ; pub const OP_BIT_OR : i64 = 17i64 ; pub const OP_BIT_XOR : i64 = 18i64 ; pub const OP_DIVIDE : i64 = 9i64 ; pub const OP_EQUAL : i64 = 0i64 ; pub const OP_GREATER : i64 = 4i64 ; pub const OP_GREATER_EQUAL : i64 = 5i64 ; pub const OP_IN : i64 = 24i64 ; pub const OP_LESS : i64 = 2i64 ; pub const OP_LESS_EQUAL : i64 = 3i64 ; pub const OP_MAX : i64 = 25i64 ; pub const OP_MODULE : i64 = 12i64 ; pub const OP_MULTIPLY : i64 = 8i64 ; pub const OP_NEGATE : i64 = 10i64 ; pub const OP_NOT : i64 = 23i64 ; pub const OP_NOT_EQUAL : i64 = 1i64 ; pub const OP_OR : i64 = 21i64 ; pub const OP_POSITIVE : i64 = 11i64 ; pub const OP_SHIFT_LEFT : i64 = 14i64 ; pub const OP_SHIFT_RIGHT : i64 = 15i64 ; pub const OP_STRING_CONCAT : i64 = 13i64 ; pub const OP_SUBTRACT : i64 = 7i64 ; pub const OP_XOR : i64 = 22i64 ; pub const PROPERTY_HINT_COLOR_NO_ALPHA : i64 = 20i64 ; pub const PROPERTY_HINT_DIR : i64 = 14i64 ; pub const PROPERTY_HINT_ENUM : i64 = 3i64 ; pub const PROPERTY_HINT_EXP_EASING : i64 = 4i64 ; pub const PROPERTY_HINT_EXP_RANGE : i64 = 2i64 ; pub const PROPERTY_HINT_FILE : i64 = 13i64 ; pub const PROPERTY_HINT_FLAGS : i64 = 8i64 ; pub const PROPERTY_HINT_GLOBAL_DIR : i64 = 16i64 ; pub const PROPERTY_HINT_GLOBAL_FILE : i64 = 15i64 ; pub const PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS : i64 = 22i64 ; pub const PROPERTY_HINT_IMAGE_COMPRESS_LOSSY : i64 = 21i64 ; pub const PROPERTY_HINT_KEY_ACCEL : i64 = 7i64 ; pub const PROPERTY_HINT_LAYERS_2D_PHYSICS : i64 = 10i64 ; pub const PROPERTY_HINT_LAYERS_2D_RENDER : i64 = 9i64 ; pub const PROPERTY_HINT_LAYERS_3D_PHYSICS : i64 = 12i64 ; pub const PROPERTY_HINT_LAYERS_3D_RENDER : i64 = 11i64 ; pub const PROPERTY_HINT_LENGTH : i64 = 5i64 ; pub const PROPERTY_HINT_MULTILINE_TEXT : i64 = 18i64 ; pub const PROPERTY_HINT_NONE : i64 = 0i64 ; pub const PROPERTY_HINT_PLACEHOLDER_TEXT : i64 = 19i64 ; pub const PROPERTY_HINT_RANGE : i64 = 1i64 ; pub const PROPERTY_HINT_RESOURCE_TYPE : i64 = 17i64 ; pub const PROPERTY_USAGE_CATEGORY : i64 = 256i64 ; pub const PROPERTY_USAGE_CHECKABLE : i64 = 16i64 ; pub const PROPERTY_USAGE_CHECKED : i64 = 32i64 ; pub const PROPERTY_USAGE_DEFAULT : i64 = 7i64 ; pub const PROPERTY_USAGE_DEFAULT_INTL : i64 = 71i64 ; pub const PROPERTY_USAGE_EDITOR : i64 = 2i64 ; pub const PROPERTY_USAGE_EDITOR_HELPER : i64 = 8i64 ; pub const PROPERTY_USAGE_GROUP : i64 = 128i64 ; pub const PROPERTY_USAGE_INTERNATIONALIZED : i64 = 64i64 ; pub const PROPERTY_USAGE_NETWORK : i64 = 4i64 ; pub const PROPERTY_USAGE_NOEDITOR : i64 = 5i64 ; 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 PROPERTY_USAGE_STORAGE : i64 = 1i64 ; pub const SPKEY : i64 = 16777216i64 ; pub const TYPE_AABB : i64 = 11i64 ; pub const TYPE_ARRAY : i64 = 19i64 ; pub const TYPE_BASIS : i64 = 12i64 ; pub const TYPE_BOOL : i64 = 1i64 ; pub const TYPE_COLOR : i64 = 14i64 ; pub const TYPE_COLOR_ARRAY : i64 = 26i64 ; pub const TYPE_DICTIONARY : i64 = 18i64 ; pub const TYPE_INT : i64 = 2i64 ; pub const TYPE_INT_ARRAY : i64 = 21i64 ; pub const TYPE_MAX : i64 = 27i64 ; pub const TYPE_NIL : i64 = 0i64 ; pub const TYPE_NODE_PATH : i64 = 15i64 ; pub const TYPE_OBJECT : i64 = 17i64 ; pub const TYPE_PLANE : i64 = 9i64 ; pub const TYPE_QUAT : i64 = 10i64 ; pub const TYPE_RAW_ARRAY : i64 = 20i64 ; pub const TYPE_REAL : i64 = 3i64 ; pub const TYPE_REAL_ARRAY : i64 = 22i64 ; pub const TYPE_RECT2 : i64 = 6i64 ; pub const TYPE_RID : i64 = 16i64 ; pub const TYPE_STRING : i64 = 4i64 ; pub const TYPE_STRING_ARRAY : i64 = 23i64 ; pub const TYPE_TRANSFORM : i64 = 13i64 ; pub const TYPE_TRANSFORM2D : i64 = 8i64 ; pub const TYPE_VECTOR2 : i64 = 5i64 ; pub const TYPE_VECTOR2_ARRAY : i64 = 24i64 ; pub const TYPE_VECTOR3 : i64 = 7i64 ; pub const TYPE_VECTOR3_ARRAY : i64 = 25i64 ; pub const VALIGN_BOTTOM : i64 = 2i64 ; pub const VALIGN_CENTER : i64 = 1i64 ; pub const VALIGN_TOP : i64 = 0i64 ; pub const VERTICAL : i64 = 1i64 ; } 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\u{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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GlobalConstants" } } unsafe impl Send for GlobalConstants { } unsafe impl Sync for GlobalConstants { }
            }
            pub use crate::generated::global_constants::GlobalConstants;
            
            pub mod button {
                use super::*;
                # [doc = "`core class Button` inherits `BaseButton` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Button { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; 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 , thread_access :: 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."] # [doc = ""] # [inline] pub fn button_icon (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_button_icon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Text alignment policy for the button's text, use one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: button :: TextAlign (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Button's icon, if text is present the icon will be placed before the text."] # [doc = ""] # [inline] pub fn set_button_icon (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_button_icon ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_expand_icon ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Text alignment policy for the button's text, use one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Button { } unsafe impl GodotObject for Button { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Button { type Target = crate :: generated :: base_button :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Button { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for Button { } unsafe impl SubClass < crate :: generated :: control :: Control > for Button { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Button { } unsafe impl SubClass < crate :: generated :: node :: Node > for Button { } unsafe impl SubClass < crate :: generated :: object :: Object > for Button { } impl Instanciable for Button { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_text\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{0}" . as_ptr () as * const c_char) ; table . get_text_align = (gd_api . godot_method_bind_get_method) (class_name , "get_text_align\u{0}" . as_ptr () as * const c_char) ; table . is_expand_icon = (gd_api . godot_method_bind_get_method) (class_name , "is_expand_icon\u{0}" . as_ptr () as * const c_char) ; table . is_flat = (gd_api . godot_method_bind_get_method) (class_name , "is_flat\u{0}" . as_ptr () as * const c_char) ; table . set_button_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_button_icon\u{0}" . as_ptr () as * const c_char) ; table . set_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_text\u{0}" . as_ptr () as * const c_char) ; table . set_expand_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_icon\u{0}" . as_ptr () as * const c_char) ; table . set_flat = (gd_api . godot_method_bind_get_method) (class_name , "set_flat\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_text_align = (gd_api . godot_method_bind_get_method) (class_name , "set_text_align\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::button::Button;
            
            pub mod grid_container {
                use super::*;
                # [doc = "`core class GridContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]. If modified, [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of columns in the [GridContainer]. If modified, [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , columns) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GridContainer { } unsafe impl GodotObject for GridContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GridContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for GridContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for GridContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GridContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for GridContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for GridContainer { } impl Instanciable for GridContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::grid_container::GridContainer;
            
            pub mod light {
                use super::*;
                # [doc = "`core class Light` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 SPECULAR : Param = Param (2i64) ; pub const RANGE : Param = Param (3i64) ; pub const ATTENUATION : Param = Param (4i64) ; pub const SPOT_ANGLE : Param = Param (5i64) ; pub const SPOT_ATTENUATION : Param = Param (6i64) ; pub const CONTACT_SHADOW_SIZE : Param = Param (7i64) ; pub const SHADOW_MAX_DISTANCE : Param = Param (8i64) ; pub const SHADOW_SPLIT_1_OFFSET : Param = Param (9i64) ; pub const SHADOW_SPLIT_2_OFFSET : Param = Param (10i64) ; pub const SHADOW_SPLIT_3_OFFSET : Param = Param (11i64) ; pub const SHADOW_NORMAL_BIAS : Param = Param (12i64) ; pub const SHADOW_BIAS : Param = Param (13i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : Param = Param (14i64) ; pub const MAX : Param = Param (15i64) ; } 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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light { pub const BAKE_ALL : i64 = 2i64 ; pub const BAKE_DISABLED : i64 = 0i64 ; pub const BAKE_INDIRECT : i64 = 1i64 ; pub const PARAM_ATTENUATION : i64 = 4i64 ; pub const PARAM_CONTACT_SHADOW_SIZE : i64 = 7i64 ; pub const PARAM_ENERGY : i64 = 0i64 ; pub const PARAM_INDIRECT_ENERGY : i64 = 1i64 ; pub const PARAM_MAX : i64 = 15i64 ; pub const PARAM_RANGE : i64 = 3i64 ; pub const PARAM_SHADOW_BIAS : i64 = 13i64 ; pub const PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 14i64 ; pub const PARAM_SHADOW_MAX_DISTANCE : i64 = 8i64 ; pub const PARAM_SHADOW_NORMAL_BIAS : i64 = 12i64 ; pub const PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 9i64 ; pub const PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 10i64 ; pub const PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 11i64 ; pub const PARAM_SPECULAR : i64 = 2i64 ; pub const PARAM_SPOT_ANGLE : i64 = 5i64 ; pub const PARAM_SPOT_ATTENUATION : i64 = 6i64 ; } impl Light { # [doc = "The light's bake mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light :: BakeMode (ret) } } # [doc = "The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Attempts to reduce [member shadow_bias] gap."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 [constant 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The light's bake mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bake_mode) ; } } # [doc = "The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cull_mask) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editor_only) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Attempts to reduce [member shadow_bias] gap."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_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 [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light { } unsafe impl GodotObject for Light { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Light { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for Light { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Light { } unsafe impl SubClass < crate :: generated :: node :: Node > for Light { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\u{0}" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_shadow = (gd_api . godot_method_bind_get_method) (class_name , "has_shadow\u{0}" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\u{0}" . as_ptr () as * const c_char) ; table . is_negative = (gd_api . godot_method_bind_get_method) (class_name , "is_negative\u{0}" . as_ptr () as * const c_char) ; table . set_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_mode\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\u{0}" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\u{0}" . as_ptr () as * const c_char) ; table . set_negative = (gd_api . godot_method_bind_get_method) (class_name , "set_negative\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; table . set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::light::Light;
            
            pub mod rectangle_shape_2d {
                use super::*;
                # [doc = "`core class RectangleShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RectangleShape2D { } unsafe impl GodotObject for RectangleShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RectangleShape2D" } } impl std :: ops :: Deref for RectangleShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RectangleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RectangleShape2D { } impl Instanciable for RectangleShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::rectangle_shape_2d::RectangleShape2D;
            
            pub mod style_box_line {
                use super::*;
                # [doc = "`core class StyleBoxLine` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , thickness) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , vertical) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxLine { } unsafe impl GodotObject for StyleBoxLine { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxLine" } } impl std :: ops :: Deref for StyleBoxLine { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxLine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxLine { } impl Instanciable for StyleBoxLine { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_begin\u{0}" . as_ptr () as * const c_char) ; table . get_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_end\u{0}" . as_ptr () as * const c_char) ; table . get_thickness = (gd_api . godot_method_bind_get_method) (class_name , "get_thickness\u{0}" . as_ptr () as * const c_char) ; table . is_vertical = (gd_api . godot_method_bind_get_method) (class_name , "is_vertical\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_begin\u{0}" . as_ptr () as * const c_char) ; table . set_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_end\u{0}" . as_ptr () as * const c_char) ; table . set_thickness = (gd_api . godot_method_bind_get_method) (class_name , "set_thickness\u{0}" . as_ptr () as * const c_char) ; table . set_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_vertical\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::style_box_line::StyleBoxLine;
            
            pub mod vslider {
                use super::*;
                # [doc = "`core class VSlider` inherits `Slider` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VSlider { type Target = crate :: generated :: slider :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: slider :: Slider > for VSlider { } unsafe impl SubClass < crate :: generated :: range :: Range > for VSlider { } unsafe impl SubClass < crate :: generated :: control :: Control > for VSlider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VSlider { } unsafe impl SubClass < crate :: generated :: node :: Node > for VSlider { } unsafe impl SubClass < crate :: generated :: object :: Object > for VSlider { } impl Instanciable for VSlider { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::vslider::VSlider;
            
            pub mod semaphore {
                use super::*;
                # [doc = "`core class Semaphore` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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], allowing one more thread in. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Semaphore { } unsafe impl GodotObject for Semaphore { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Semaphore" } } impl std :: ops :: Deref for Semaphore { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Semaphore { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Semaphore { } unsafe impl SubClass < crate :: generated :: object :: Object > for Semaphore { } impl Instanciable for Semaphore { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::semaphore::Semaphore;
            
            pub mod visual_shader_node_transform_constant {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformConstant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A [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 :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformConstant { } unsafe impl GodotObject for VisualShaderNodeTransformConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformConstant" } } impl std :: ops :: Deref for VisualShaderNodeTransformConstant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformConstant { } impl Instanciable for VisualShaderNodeTransformConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_constant::VisualShaderNodeTransformConstant;
            
            pub mod particles {
                use super::*;
                # [doc = "`core class Particles` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Number of particles to emit."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: particles :: DrawOrder (ret) } } # [doc = "[Mesh] that is drawn for the fourth draw pass."] # [doc = ""] # [inline] pub fn draw_pass_mesh (& self , pass : i64) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , pass) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn process_material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_process_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active.\n**Note:** If the [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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 = ParticlesMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles to emit."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Particle draw order. Uses [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [doc = "[Mesh] that is drawn for the fourth draw pass."] # [doc = ""] # [inline] pub fn set_draw_pass_mesh (& self , pass : i64 , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , pass , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , passes) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Amount of time each particle will exist."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn set_process_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_process_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active.\n**Note:** If the [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 :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Particles { } unsafe impl GodotObject for Particles { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Particles { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Particles { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for Particles { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for Particles { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Particles { } unsafe impl SubClass < crate :: generated :: node :: Node > for Particles { } unsafe impl SubClass < crate :: generated :: object :: Object > for Particles { } impl Instanciable for Particles { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\u{0}" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_passes\u{0}" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\u{0}" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_process_material = (gd_api . godot_method_bind_get_method) (class_name , "get_process_material\u{0}" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_visibility_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_aabb\u{0}" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\u{0}" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\u{0}" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\u{0}" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_passes\u{0}" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\u{0}" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\u{0}" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\u{0}" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "set_process_material\u{0}" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_visibility_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_aabb\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::particles::Particles;
            
            pub mod visual_script_operator {
                use super::*;
                # [doc = "`core class VisualScriptOperator` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantOperator :: try_from_sys (ret as _) . 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptOperator { } unsafe impl GodotObject for VisualScriptOperator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptOperator" } } impl std :: ops :: Deref for VisualScriptOperator { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptOperator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptOperator { } impl Instanciable for VisualScriptOperator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_typed = (gd_api . godot_method_bind_get_method) (class_name , "get_typed\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_operator::VisualScriptOperator;
            
            pub mod visual_script_function_call {
                use super::*;
                # [doc = "`core class VisualScriptFunctionCall` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptFunctionCall { pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; pub const CALL_MODE_SINGLETON : i64 = 4i64 ; pub const RPC_DISABLED : i64 = 0i64 ; pub const RPC_RELIABLE : i64 = 1i64 ; pub const RPC_RELIABLE_TO_ID : i64 = 3i64 ; pub const RPC_UNRELIABLE : i64 = 2i64 ; 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 , thread_access :: 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_function_call :: CallMode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_function_call :: RpcCallMode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , basic_type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionCall { } unsafe impl GodotObject for VisualScriptFunctionCall { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionCall" } } impl std :: ops :: Deref for VisualScriptFunctionCall { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunctionCall { } impl Instanciable for VisualScriptFunctionCall { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\u{0}" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\u{0}" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\u{0}" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\u{0}" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_validate = (gd_api . godot_method_bind_get_method) (class_name , "get_validate\u{0}" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\u{0}" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\u{0}" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_validate = (gd_api . godot_method_bind_get_method) (class_name , "set_validate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_function_call::VisualScriptFunctionCall;
            
            pub mod texture_button {
                use super::*;
                # [doc = "`core class TextureButton` inherits `BaseButton` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureButton { pub const STRETCH_KEEP : i64 = 2i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 4i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 6i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 3i64 ; pub const STRETCH_SCALE : i64 = 0i64 ; pub const STRETCH_TILE : i64 = 1i64 ; } 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 , thread_access :: 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] 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 :: bit_map :: BitMap , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_click_mask ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bit_map :: BitMap , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display when the node is disabled. See [member BaseButton.disabled]."] # [doc = ""] # [inline] pub fn disabled_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_disabled_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the texture stretches to the edges of the node's bounding rectangle using the [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Texture to display when the node has mouse or keyboard focus."] # [doc = ""] # [inline] pub fn focused_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_focused_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display when the mouse hovers the node."] # [doc = ""] # [inline] pub fn hover_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_hover_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_normal_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 [member BaseButton.shortcut] key."] # [doc = ""] # [inline] pub fn pressed_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_pressed_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Controls the texture's behavior when you resize the node's bounding rectangle, **only if** [member expand] is `true`. Set it to one of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: texture_button :: StretchMode (ret) } } # [doc = "Pure black and white [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 :: bit_map :: BitMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_click_mask ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mask . as_arg_ptr ()) ; } } # [doc = "Texture to display when the node is disabled. See [member BaseButton.disabled]."] # [doc = ""] # [inline] pub fn set_disabled_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_disabled_texture ; let ret = crate :: icalls :: icallptr_void_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 [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , p_expand) ; } } # [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_focused_texture ; let ret = crate :: icalls :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_hover_texture ; let ret = crate :: icalls :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_normal_texture ; let ret = crate :: icalls :: icallptr_void_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 [member BaseButton.shortcut] key."] # [doc = ""] # [inline] pub fn set_pressed_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_pressed_texture ; let ret = crate :: icalls :: icallptr_void_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** [member expand] is `true`. Set it to one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , p_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureButton { } unsafe impl GodotObject for TextureButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextureButton { type Target = crate :: generated :: base_button :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for TextureButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for TextureButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextureButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextureButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureButton { } impl Instanciable for TextureButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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 , 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_disabled_texture\u{0}" . as_ptr () as * const c_char) ; table . get_expand = (gd_api . godot_method_bind_get_method) (class_name , "get_expand\u{0}" . as_ptr () as * const c_char) ; table . get_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_focused_texture\u{0}" . as_ptr () as * const c_char) ; table . get_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_hover_texture\u{0}" . as_ptr () as * const c_char) ; table . get_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_texture\u{0}" . as_ptr () as * const c_char) ; table . get_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_texture\u{0}" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\u{0}" . as_ptr () as * const c_char) ; table . set_click_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_click_mask\u{0}" . as_ptr () as * const c_char) ; table . set_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled_texture\u{0}" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\u{0}" . as_ptr () as * const c_char) ; table . set_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_focused_texture\u{0}" . as_ptr () as * const c_char) ; table . set_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_hover_texture\u{0}" . as_ptr () as * const c_char) ; table . set_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_texture\u{0}" . as_ptr () as * const c_char) ; table . set_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed_texture\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::texture_button::TextureButton;
            
            pub mod visual_script_while {
                use super::*;
                # [doc = "`core class VisualScriptWhile` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptWhile" } } impl std :: ops :: Deref for VisualScriptWhile { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptWhile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptWhile { } impl Instanciable for VisualScriptWhile { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_while::VisualScriptWhile;
            
            pub mod weak_ref {
                use super::*;
                # [doc = "`core class WeakRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] this weakref is referring to."] # [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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for WeakRef { } unsafe impl GodotObject for WeakRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WeakRef" } } impl std :: ops :: Deref for WeakRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WeakRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WeakRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for WeakRef { } impl Instanciable for WeakRef { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::weak_ref::WeakRef;
            
            pub mod web_rtc_multiplayer {
                use super::*;
                # [doc = "`core class WebRTCMultiplayer` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: web_rtc_peer_connection :: 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 :: icallptr_i64_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr () , peer_id , unreliable_lifetime) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (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 :: icallptr_dict_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; ret as _ } } # [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 :: icallptr_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , peer_id , server_compatibility) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCMultiplayer { } unsafe impl GodotObject for WebRTCMultiplayer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCMultiplayer" } } impl std :: ops :: Deref for WebRTCMultiplayer { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCMultiplayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCMultiplayer { } impl Instanciable for WebRTCMultiplayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\u{0}" . as_ptr () as * const c_char) ; table . get_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_peer\u{0}" . as_ptr () as * const c_char) ; table . get_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_peers\u{0}" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\u{0}" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\u{0}" . as_ptr () as * const c_char) ; table . remove_peer = (gd_api . godot_method_bind_get_method) (class_name , "remove_peer\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_rtc_multiplayer::WebRTCMultiplayer;
            
            pub mod curve_2d {
                use super::*;
                # [doc = "`core class Curve2D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 to a curve at `position`, with control points `in` and `out`.\nIf `at_position` is given, the point is inserted before the point number `at_position`, moving that point (and every point after) after the inserted point. If `at_position` is not given, or is an illegal value (`at_position <0` or `at_position >= [method get_point_count]`), the point will be appended at the end of the point list.\n# Default Arguments\n* `in` - `Vector2( 0, 0 )`\n* `out` - `Vector2( 0, 0 )`\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , _in : Vector2 , out : Vector2 , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_vec2_vec2_vec2_i64 (method_bind , self . this . sys () . as_ptr () , position , _in , out , at_position) ; } } # [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 :: icallptr_void (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 [method get_baked_points] or [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total length of the curve, based on the cached points. Given enough density (see [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the cache of points as a [PoolVector2Array]."] # [doc = ""] # [inline] pub fn get_baked_points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_baked_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Returns the closest offset to `to_point`. This offset is meant to be used in [method 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 :: icallptr_f64_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; ret as _ } } # [doc = "Returns the closest 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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (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 = Curve2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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, 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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns 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, 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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (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)`."] # [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 :: icallptr_vec2_i64_f64 (method_bind , self . this . sys () . as_ptr () , idx , t) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_f64_bool (method_bind , self . this . sys () . as_ptr () , offset , cubic) ; mem :: transmute (ret) } } # [doc = "Returns the position at the vertex `fofs`. It calls [method 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 :: icallptr_vec2_f64 (method_bind , self . this . sys () . as_ptr () , fofs) ; mem :: transmute (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 = Curve2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [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."] # [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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , 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."] # [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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , 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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . tessellate ; let ret = crate :: icalls :: icallptr_vec2arr_i64_f64 (method_bind , self . this . sys () . as_ptr () , max_stages , tolerance_degrees) ; Vector2Array :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve2D { } unsafe impl GodotObject for Curve2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve2D" } } impl std :: ops :: Deref for Curve2D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Curve2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Curve2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Curve2D { } impl Instanciable for Curve2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\u{0}" . as_ptr () as * const c_char) ; table . get_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_interval\u{0}" . as_ptr () as * const c_char) ; table . get_baked_length = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_length\u{0}" . as_ptr () as * const c_char) ; table . get_baked_points = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_points\u{0}" . as_ptr () as * const c_char) ; table . get_closest_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_offset\u{0}" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . get_point_in = (gd_api . godot_method_bind_get_method) (class_name , "get_point_in\u{0}" . as_ptr () as * const c_char) ; table . get_point_out = (gd_api . godot_method_bind_get_method) (class_name , "get_point_out\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{0}" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\u{0}" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\u{0}" . as_ptr () as * const c_char) ; table . interpolatef = (gd_api . godot_method_bind_get_method) (class_name , "interpolatef\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . set_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_interval\u{0}" . as_ptr () as * const c_char) ; table . set_point_in = (gd_api . godot_method_bind_get_method) (class_name , "set_point_in\u{0}" . as_ptr () as * const c_char) ; table . set_point_out = (gd_api . godot_method_bind_get_method) (class_name , "set_point_out\u{0}" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\u{0}" . as_ptr () as * const c_char) ; table . tessellate = (gd_api . godot_method_bind_get_method) (class_name , "tessellate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::curve_2d::Curve2D;
            
            pub mod remote_transform_2d {
                use super::*;
                # [doc = "`core class RemoteTransform2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] caches the remote node. It may not notice if the remote node disappears; [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_position) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform2D { } unsafe impl GodotObject for RemoteTransform2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RemoteTransform2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RemoteTransform2D { } impl Instanciable for RemoteTransform2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "get_remote_node\u{0}" . as_ptr () as * const c_char) ; table . get_update_position = (gd_api . godot_method_bind_get_method) (class_name , "get_update_position\u{0}" . as_ptr () as * const c_char) ; table . get_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_update_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_update_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_node\u{0}" . as_ptr () as * const c_char) ; table . set_update_position = (gd_api . godot_method_bind_get_method) (class_name , "set_update_position\u{0}" . as_ptr () as * const c_char) ; table . set_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_update_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_update_scale\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::remote_transform_2d::RemoteTransform2D;
            
            pub mod animation_node_state_machine_transition {
                use super::*;
                # [doc = "`core class AnimationNodeStateMachineTransition` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeStateMachineTransition { pub const SWITCH_MODE_AT_END : i64 = 2i64 ; pub const SWITCH_MODE_IMMEDIATE : i64 = 0i64 ; pub const SWITCH_MODE_SYNC : i64 = 1i64 ; } 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 , thread_access :: 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] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_node_state_machine_transition :: SwitchMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Turn on the transition automatically when this state is reached. This works best with [constant 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member 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 :: icallptr_void_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 [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , auto_advance) ; } } # [doc = "Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeStateMachineTransition { } unsafe impl GodotObject for AnimationNodeStateMachineTransition { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachineTransition" } } impl std :: ops :: Deref for AnimationNodeStateMachineTransition { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachineTransition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeStateMachineTransition { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeStateMachineTransition { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeStateMachineTransition { } impl Instanciable for AnimationNodeStateMachineTransition { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\u{0}" . as_ptr () as * const c_char) ; table . get_switch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_switch_mode\u{0}" . as_ptr () as * const c_char) ; table . get_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "get_xfade_time\u{0}" . as_ptr () as * const c_char) ; table . has_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "has_auto_advance\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_advance_condition = (gd_api . godot_method_bind_get_method) (class_name , "set_advance_condition\u{0}" . as_ptr () as * const c_char) ; table . set_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_advance\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\u{0}" . as_ptr () as * const c_char) ; table . set_switch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_switch_mode\u{0}" . as_ptr () as * const c_char) ; table . set_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "set_xfade_time\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_state_machine_transition::AnimationNodeStateMachineTransition;
            
            pub mod reg_ex {
                use super::*;
                # [doc = "`core class RegEx` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void (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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , pattern . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn search (& self , subject : impl Into < GodotString > , offset : i64 , end : i64) -> Option < Ref < crate :: generated :: reg_ex_match :: RegExMatch , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . search ; let ret = crate :: icalls :: icallptr_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , offset , end) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: reg_ex_match :: RegExMatch , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 , end) ; < 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 :: icallptr_str_str_str_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , replacement . into () , all , offset , end) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RegEx { } unsafe impl GodotObject for RegEx { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegEx" } } impl std :: ops :: Deref for RegEx { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegEx { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RegEx { } unsafe impl SubClass < crate :: generated :: object :: Object > for RegEx { } impl Instanciable for RegEx { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . compile = (gd_api . godot_method_bind_get_method) (class_name , "compile\u{0}" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\u{0}" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\u{0}" . as_ptr () as * const c_char) ; table . get_pattern = (gd_api . godot_method_bind_get_method) (class_name , "get_pattern\u{0}" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\u{0}" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\u{0}" . as_ptr () as * const c_char) ; table . search_all = (gd_api . godot_method_bind_get_method) (class_name , "search_all\u{0}" . as_ptr () as * const c_char) ; table . sub = (gd_api . godot_method_bind_get_method) (class_name , "sub\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::reg_ex::RegEx;
            
            pub mod visual_script_property_set {
                use super::*;
                # [doc = "`core class VisualScriptPropertySet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptPropertySet { pub const ASSIGN_OP_ADD : i64 = 1i64 ; pub const ASSIGN_OP_BIT_AND : i64 = 8i64 ; pub const ASSIGN_OP_BIT_OR : i64 = 9i64 ; pub const ASSIGN_OP_BIT_XOR : i64 = 10i64 ; pub const ASSIGN_OP_DIV : i64 = 4i64 ; pub const ASSIGN_OP_MOD : i64 = 5i64 ; pub const ASSIGN_OP_MUL : i64 = 3i64 ; pub const ASSIGN_OP_NONE : i64 = 0i64 ; pub const ASSIGN_OP_SHIFT_LEFT : i64 = 6i64 ; pub const ASSIGN_OP_SHIFT_RIGHT : i64 = 7i64 ; pub const ASSIGN_OP_SUB : i64 = 2i64 ; pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_property_set :: AssignOp (ret) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_property_set :: CallMode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , assign_op) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , basic_type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPropertySet" } } impl std :: ops :: Deref for VisualScriptPropertySet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPropertySet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptPropertySet { } impl Instanciable for VisualScriptPropertySet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\u{0}" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\u{0}" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\u{0}" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\u{0}" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\u{0}" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\u{0}" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\u{0}" . as_ptr () as * const c_char) ; table . set_assign_op = (gd_api . godot_method_bind_get_method) (class_name , "set_assign_op\u{0}" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\u{0}" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\u{0}" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\u{0}" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\u{0}" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_property_set::VisualScriptPropertySet;
            
            pub mod object {
                use super::*;
                # [doc = "The base class of most Godot classes."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Object { pub const CONNECT_DEFERRED : i64 = 1i64 ; pub const CONNECT_ONESHOT : i64 = 4i64 ; pub const CONNECT_PERSIST : i64 = 2i64 ; pub const CONNECT_REFERENCE_COUNTED : i64 = 8i64 ; pub const NOTIFICATION_POSTINITIALIZE : i64 = 0i64 ; pub const NOTIFICATION_PREDELETE : i64 = 1i64 ; } 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 , thread_access :: 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] 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 :: icallptr_void_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 [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].\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 :: icallptr_var_str_arr (method_bind , self . this . sys () . as_ptr () , method . into () , arg_array) ; Variant :: from_sys (ret) } } # [doc = "Returns `true` if the object can translate strings. See [method set_message_translation] and [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use `flags` to set deferred or one-shot connections. See [enum ConnectFlags] constants.\nA `signal` can only be connected once to a `method`. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method 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 [method connect] and parameters used when calling [method 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 :: 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 :: icallptr_i64_str_obj_str_arr_i64 (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into () , binds , flags) ; GodotError :: result_from_sys (ret as _) } } # [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 throw an error. Use [method is_connected] to ensure that the connection exists."] # [doc = ""] # [inline] pub fn disconnect (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . disconnect ; let ret = crate :: icalls :: icallptr_void_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] 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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's class as a [String]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns an [Array] of dictionaries with information about signals that are connected to the object.\nEach [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]. 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\"`."] # [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 :: icallptr_var_nodepath (method_bind , self . this . sys () . as_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's unique instance ID.\nThis ID can be saved in [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the object's metadata entry for the given `name`."] # [doc = ""] # [inline] pub fn get_meta (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's metadata as a [PoolStringArray]."] # [doc = ""] # [inline] pub fn get_meta_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the object's methods and their signatures as an [Array]."] # [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] of dictionaries.\nEach property's [Dictionary] contain at least `name: String` and `type: int` (see [enum Variant.Type]) entries. Optionally, it can also include `hint: int` (see [enum PropertyHint]), `hint_string: String`, and `usage: int` (see [enum 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] instance, or `null` if none is assigned."] # [doc = ""] # [inline] pub fn get_script (& self) -> Option < Ref < crate :: generated :: reference :: Reference , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: reference :: Reference , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an [Array] 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] 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; ret as _ } } # [doc = "Returns `true` if the given user-defined `signal` exists. Only signals added using [method 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the object inherits from the given `class`."] # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [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 :: 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 :: icallptr_bool_str_obj_str (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into ()) ; ret as _ } } # [doc = "Returns `true` if the [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from.\nIf `reversed` is `true`, [method _notification] is called first on the object's own class, and then up to its successive parent classes. If `reversed` is `false`, [method _notification] is called first on the highest ancestor ([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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , what , reversed) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a given entry from the object's metadata. See also [method 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 :: icallptr_void_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, 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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method 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 :: icallptr_void_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]. 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 :: icallptr_void_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 [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value.\nTo remove a given entry from the object's metadata, use [method 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 :: icallptr_void_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 [method _init] method will be called."] # [doc = ""] # [inline] pub fn set_script (& self , script : impl AsArg < crate :: generated :: reference :: Reference >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_script ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , script . as_arg_ptr ()) ; } } # [doc = "Returns a [String] representing the object. If not overridden, defaults to `\"[ClassName:RID]\"`.\nOverride the method [method _to_string] to customize the [String] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 [method 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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Object { } unsafe impl GodotObject for Object { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Object" } } impl Instanciable for Object { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . call = (gd_api . godot_method_bind_get_method) (class_name , "call\u{0}" . as_ptr () as * const c_char) ; table . call_deferred = (gd_api . godot_method_bind_get_method) (class_name , "call_deferred\u{0}" . as_ptr () as * const c_char) ; table . callv = (gd_api . godot_method_bind_get_method) (class_name , "callv\u{0}" . as_ptr () as * const c_char) ; table . can_translate_messages = (gd_api . godot_method_bind_get_method) (class_name , "can_translate_messages\u{0}" . as_ptr () as * const c_char) ; table . connect = (gd_api . godot_method_bind_get_method) (class_name , "connect\u{0}" . as_ptr () as * const c_char) ; table . disconnect = (gd_api . godot_method_bind_get_method) (class_name , "disconnect\u{0}" . as_ptr () as * const c_char) ; table . emit_signal = (gd_api . godot_method_bind_get_method) (class_name , "emit_signal\u{0}" . as_ptr () as * const c_char) ; table . get = (gd_api . godot_method_bind_get_method) (class_name , "get\u{0}" . as_ptr () as * const c_char) ; table . get_class = (gd_api . godot_method_bind_get_method) (class_name , "get_class\u{0}" . as_ptr () as * const c_char) ; table . get_incoming_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_incoming_connections\u{0}" . as_ptr () as * const c_char) ; table . get_indexed = (gd_api . godot_method_bind_get_method) (class_name , "get_indexed\u{0}" . as_ptr () as * const c_char) ; table . get_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_id\u{0}" . as_ptr () as * const c_char) ; table . get_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_meta\u{0}" . as_ptr () as * const c_char) ; table . get_meta_list = (gd_api . godot_method_bind_get_method) (class_name , "get_meta_list\u{0}" . as_ptr () as * const c_char) ; table . get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "get_method_list\u{0}" . as_ptr () as * const c_char) ; table . get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "get_property_list\u{0}" . as_ptr () as * const c_char) ; table . get_script = (gd_api . godot_method_bind_get_method) (class_name , "get_script\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_list\u{0}" . as_ptr () as * const c_char) ; table . has_meta = (gd_api . godot_method_bind_get_method) (class_name , "has_meta\u{0}" . as_ptr () as * const c_char) ; table . has_method = (gd_api . godot_method_bind_get_method) (class_name , "has_method\u{0}" . as_ptr () as * const c_char) ; table . has_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_signal\u{0}" . as_ptr () as * const c_char) ; table . has_user_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_user_signal\u{0}" . as_ptr () as * const c_char) ; table . is_blocking_signals = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_signals\u{0}" . as_ptr () as * const c_char) ; table . is_class = (gd_api . godot_method_bind_get_method) (class_name , "is_class\u{0}" . as_ptr () as * const c_char) ; table . is_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_connected\u{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\u{0}" . as_ptr () as * const c_char) ; table . notification = (gd_api . godot_method_bind_get_method) (class_name , "notification\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_meta = (gd_api . godot_method_bind_get_method) (class_name , "remove_meta\u{0}" . as_ptr () as * const c_char) ; table . set = (gd_api . godot_method_bind_get_method) (class_name , "set\u{0}" . as_ptr () as * const c_char) ; table . set_block_signals = (gd_api . godot_method_bind_get_method) (class_name , "set_block_signals\u{0}" . as_ptr () as * const c_char) ; table . set_deferred = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred\u{0}" . as_ptr () as * const c_char) ; table . set_indexed = (gd_api . godot_method_bind_get_method) (class_name , "set_indexed\u{0}" . as_ptr () as * const c_char) ; table . set_message_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_message_translation\u{0}" . as_ptr () as * const c_char) ; table . set_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_meta\u{0}" . as_ptr () as * const c_char) ; table . set_script = (gd_api . godot_method_bind_get_method) (class_name , "set_script\u{0}" . as_ptr () as * const c_char) ; table . to_string = (gd_api . godot_method_bind_get_method) (class_name , "to_string\u{0}" . as_ptr () as * const c_char) ; table . tr = (gd_api . godot_method_bind_get_method) (class_name , "tr\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::object::Object;
            
            pub mod jsonrpc {
                use super::*;
                # [doc = "`core class JSONRPC` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl JSONRPC { pub const INTERNAL_ERROR : i64 = - 32603i64 ; pub const INVALID_PARAMS : i64 = - 32602i64 ; pub const INVALID_REQUEST : i64 = - 32600i64 ; pub const METHOD_NOT_FOUND : i64 = - 32601i64 ; pub const PARSE_ERROR : i64 = - 32700i64 ; } 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 , thread_access :: 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 = ""] # [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 :: icallptr_dict_str_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_dict_str_var_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_dict_var_var (method_bind , self . this . sys () . as_ptr () , result . owned_to_variant () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = "\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 :: icallptr_dict_i64_str_var (method_bind , self . this . sys () . as_ptr () , code , message . into () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = "\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 :: icallptr_var_var_bool (method_bind , self . this . sys () . as_ptr () , action . owned_to_variant () , recurse) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_scope (& self , scope : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . set_scope ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSONRPC" } } impl std :: ops :: Deref for JSONRPC { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSONRPC { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for JSONRPC { } impl Instanciable for JSONRPC { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . make_request = (gd_api . godot_method_bind_get_method) (class_name , "make_request\u{0}" . as_ptr () as * const c_char) ; table . make_response = (gd_api . godot_method_bind_get_method) (class_name , "make_response\u{0}" . as_ptr () as * const c_char) ; table . make_response_error = (gd_api . godot_method_bind_get_method) (class_name , "make_response_error\u{0}" . as_ptr () as * const c_char) ; table . process_action = (gd_api . godot_method_bind_get_method) (class_name , "process_action\u{0}" . as_ptr () as * const c_char) ; table . process_string = (gd_api . godot_method_bind_get_method) (class_name , "process_string\u{0}" . as_ptr () as * const c_char) ; table . set_scope = (gd_api . godot_method_bind_get_method) (class_name , "set_scope\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::jsonrpc::JSONRPC;
            
            pub mod stream_peer_gdnative {
                use super::*;
                # [doc = "`core class StreamPeerGDNative` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerGDNative" } } impl std :: ops :: Deref for StreamPeerGDNative { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerGDNative { } impl Instanciable for StreamPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::stream_peer_gdnative::StreamPeerGDNative;
            
            pub mod visual_shader_node_boolean_constant {
                use super::*;
                # [doc = "`core class VisualShaderNodeBooleanConstant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeBooleanConstant { } unsafe impl GodotObject for VisualShaderNodeBooleanConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeBooleanConstant" } } impl std :: ops :: Deref for VisualShaderNodeBooleanConstant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeBooleanConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeBooleanConstant { } impl Instanciable for VisualShaderNodeBooleanConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_boolean_constant::VisualShaderNodeBooleanConstant;
            
            pub mod color_rect {
                use super::*;
                # [doc = "`core class ColorRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorRect { } unsafe impl GodotObject for ColorRect { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ColorRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ColorRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ColorRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for ColorRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for ColorRect { } impl Instanciable for ColorRect { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_frame_color = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_color\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::color_rect::ColorRect;
            
            pub mod audio_effect_notch_filter {
                use super::*;
                # [doc = "`core class AudioEffectNotchFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectNotchFilter" } } impl std :: ops :: Deref for AudioEffectNotchFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectNotchFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectNotchFilter { } impl Instanciable for AudioEffectNotchFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_notch_filter::AudioEffectNotchFilter;
            
            pub mod box_shape {
                use super::*;
                # [doc = "`core class BoxShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxShape { } unsafe impl GodotObject for BoxShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BoxShape" } } impl std :: ops :: Deref for BoxShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for BoxShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BoxShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BoxShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for BoxShape { } impl Instanciable for BoxShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::box_shape::BoxShape;
            
            pub mod path_2d {
                use super::*;
                # [doc = "`core class Path2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] describing the path."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve_2d :: Curve2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Path2DMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve_2d :: Curve2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A [Curve2D] describing the path."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve_2d :: Curve2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Path2DMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Path2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Path2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Path2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Path2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Path2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Path2D { } impl Instanciable for Path2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::path_2d::Path2D;
            
            pub mod atlas_texture {
                use super::*;
                # [doc = "`core class AtlasTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] subtype."] # [doc = ""] # [inline] pub fn atlas (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_atlas ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The margin around the region. The [Rect2]'s [member 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture that contains the atlas. Can be any [Texture] subtype."] # [doc = ""] # [inline] pub fn set_atlas (& self , atlas : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_atlas ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The margin around the region. The [Rect2]'s [member 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 :: icallptr_void_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 :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , region) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AtlasTexture { } unsafe impl GodotObject for AtlasTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AtlasTexture" } } impl std :: ops :: Deref for AtlasTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AtlasTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AtlasTexture { } impl Instanciable for AtlasTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_region = (gd_api . godot_method_bind_get_method) (class_name , "get_region\u{0}" . as_ptr () as * const c_char) ; table . has_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "has_filter_clip\u{0}" . as_ptr () as * const c_char) ; table . set_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_atlas\u{0}" . as_ptr () as * const c_char) ; table . set_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_clip\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::atlas_texture::AtlasTexture;
            
            pub mod sprite {
                use super::*;
                # [doc = "`core class Sprite` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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. [member vframes] or [member hframes] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The region of the atlas texture to display. [member 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "[Texture] object to draw."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , pos) ; ret as _ } } # [doc = "If `true`, texture is cut from a larger atlas texture. See [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [doc = "Current frame to display from sprite sheet. [member vframes] or [member hframes] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , hframes) ; } } # [doc = "The normal map gives depth to the Sprite.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "If `true`, texture is cut from a larger atlas texture. See [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The region of the atlas texture to display. [member 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 :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "[Texture] object to draw."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , vframes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sprite { } unsafe impl GodotObject for Sprite { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Sprite { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Sprite { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Sprite { } unsafe impl SubClass < crate :: generated :: node :: Node > for Sprite { } unsafe impl SubClass < crate :: generated :: object :: Object > for Sprite { } impl Instanciable for Sprite { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_coords\u{0}" . as_ptr () as * const c_char) ; table . get_hframes = (gd_api . godot_method_bind_get_method) (class_name , "get_hframes\u{0}" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\u{0}" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_vframes = (gd_api . godot_method_bind_get_method) (class_name , "get_vframes\u{0}" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\u{0}" . as_ptr () as * const c_char) ; table . is_pixel_opaque = (gd_api . godot_method_bind_get_method) (class_name , "is_pixel_opaque\u{0}" . as_ptr () as * const c_char) ; table . is_region = (gd_api . godot_method_bind_get_method) (class_name , "is_region\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\u{0}" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\u{0}" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\u{0}" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\u{0}" . as_ptr () as * const c_char) ; table . set_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_coords\u{0}" . as_ptr () as * const c_char) ; table . set_hframes = (gd_api . godot_method_bind_get_method) (class_name , "set_hframes\u{0}" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_vframes = (gd_api . godot_method_bind_get_method) (class_name , "set_vframes\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sprite::Sprite;
            
            pub mod cube_map {
                use super::*;
                # [doc = "`core class CubeMap` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CubeMap { pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const SIDE_BACK : i64 = 5i64 ; pub const SIDE_BOTTOM : i64 = 2i64 ; pub const SIDE_FRONT : i64 = 4i64 ; pub const SIDE_LEFT : i64 = 0i64 ; pub const SIDE_RIGHT : i64 = 1i64 ; pub const SIDE_TOP : i64 = 3i64 ; pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const STORAGE_RAW : i64 = 0i64 ; } 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 , thread_access :: 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]. See the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The lossy storage quality of the [CubeMap] if the storage mode is set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants."] # [doc = ""] # [inline] pub fn get_side (& self , side : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_side ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , side) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [CubeMap]'s storage mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cube_map :: Storage (ret) } } # [doc = "Returns the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The render flags for the [CubeMap]. See the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [doc = "The lossy storage quality of the [CubeMap] if the storage mode is set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = "Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants."] # [doc = ""] # [inline] pub fn set_side (& self , side : i64 , image : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_side ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , side , image . as_arg_ptr ()) ; } } # [doc = "The [CubeMap]'s storage mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMap { } unsafe impl GodotObject for CubeMap { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMap" } } impl std :: ops :: Deref for CubeMap { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CubeMap { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CubeMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for CubeMap { } impl Instanciable for CubeMap { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_side = (gd_api . godot_method_bind_get_method) (class_name , "get_side\u{0}" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_side = (gd_api . godot_method_bind_get_method) (class_name , "set_side\u{0}" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cube_map::CubeMap;
            
            pub mod physics_shape_query_result {
                use super::*;
                # [doc = "`core class PhysicsShapeQueryResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physicsshapequeryresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysicsShapeQueryResult 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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsShapeQueryResult { this : RawObject < Self > , } impl PhysicsShapeQueryResult { # [doc = "Returns the number of objects that intersected with the shape."] # [doc = ""] # [inline] pub fn get_result_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryResultMethodTable :: get (get_api ()) . get_result_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object (& self , idx : i64) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryResultMethodTable :: get (get_api ()) . get_result_object ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the instance ID of the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_id (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_id ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the child index of the object's [Shape] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_shape (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_shape ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the [RID] of the object that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_rid (& self , idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryResultMethodTable :: get (get_api ()) . get_result_rid ; let ret = crate :: icalls :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsShapeQueryResult { } unsafe impl GodotObject for PhysicsShapeQueryResult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsShapeQueryResult" } } impl std :: ops :: Deref for PhysicsShapeQueryResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsShapeQueryResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PhysicsShapeQueryResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicsShapeQueryResult { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsShapeQueryResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_result_count : * mut sys :: godot_method_bind , pub get_result_object : * mut sys :: godot_method_bind , pub get_result_object_id : * mut sys :: godot_method_bind , pub get_result_object_shape : * mut sys :: godot_method_bind , pub get_result_rid : * mut sys :: godot_method_bind } impl PhysicsShapeQueryResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsShapeQueryResultMethodTable = PhysicsShapeQueryResultMethodTable { class_constructor : None , get_result_count : 0 as * mut sys :: godot_method_bind , get_result_object : 0 as * mut sys :: godot_method_bind , get_result_object_id : 0 as * mut sys :: godot_method_bind , get_result_object_shape : 0 as * mut sys :: godot_method_bind , get_result_rid : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PhysicsShapeQueryResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsShapeQueryResult\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_result_count = (gd_api . godot_method_bind_get_method) (class_name , "get_result_count\u{0}" . as_ptr () as * const c_char) ; table . get_result_object = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object\u{0}" . as_ptr () as * const c_char) ; table . get_result_object_id = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_id\u{0}" . as_ptr () as * const c_char) ; table . get_result_object_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_shape\u{0}" . as_ptr () as * const c_char) ; table . get_result_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_result_rid\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_shape_query_result::PhysicsShapeQueryResult;
            
            pub mod visual_shader_node_transform_mult {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformMult` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformMult { pub const OP_AxB : i64 = 0i64 ; pub const OP_AxB_COMP : i64 = 2i64 ; pub const OP_BxA : i64 = 1i64 ; 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_transform_mult :: Operator (ret) } } # [doc = "The multiplication type to be performed on the transforms. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformMult { } unsafe impl GodotObject for VisualShaderNodeTransformMult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformMult" } } impl std :: ops :: Deref for VisualShaderNodeTransformMult { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformMult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformMult { } impl Instanciable for VisualShaderNodeTransformMult { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_mult::VisualShaderNodeTransformMult;
            
            pub mod ray_shape_2d {
                use super::*;
                # [doc = "`core class RayShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayShape2D { } unsafe impl GodotObject for RayShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RayShape2D" } } impl std :: ops :: Deref for RayShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for RayShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RayShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RayShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayShape2D { } impl Instanciable for RayShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ray_shape_2d::RayShape2D;
            
            pub mod visual_shader_node_color_func {
                use super::*;
                # [doc = "`core class VisualShaderNodeColorFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_color_func :: Function (ret) } } # [doc = "A function to be applied to the input color. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorFunc { } unsafe impl GodotObject for VisualShaderNodeColorFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorFunc" } } impl std :: ops :: Deref for VisualShaderNodeColorFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorFunc { } impl Instanciable for VisualShaderNodeColorFunc { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_color_func::VisualShaderNodeColorFunc;
            
            pub mod visual_shader_node_scalar_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarUniform { } unsafe impl GodotObject for VisualShaderNodeScalarUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarUniform" } } impl std :: ops :: Deref for VisualShaderNodeScalarUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarUniform { } impl Instanciable for VisualShaderNodeScalarUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarUniformMethodTable = VisualShaderNodeScalarUniformMethodTable { 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_uniform::VisualShaderNodeScalarUniform;
            
            pub mod kinematic_collision {
                use super::*;
                # [doc = "`core class KinematicCollision` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 colliding body."] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding body's unique instance ID. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The colliding body's metadata. See [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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "The colliding body's shape."] # [doc = ""] # [inline] pub fn collider_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding shape's index. See [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The moving object's colliding shape."] # [doc = ""] # [inline] pub fn local_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_local_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicCollision { } unsafe impl GodotObject for KinematicCollision { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "KinematicCollision" } } impl std :: ops :: Deref for KinematicCollision { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicCollision { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for KinematicCollision { } unsafe impl SubClass < crate :: generated :: object :: Object > for KinematicCollision { } impl Instanciable for KinematicCollision { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\u{0}" . as_ptr () as * const c_char) ; table . get_collider_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_local_shape\u{0}" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_remainder\u{0}" . as_ptr () as * const c_char) ; table . get_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_travel\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::kinematic_collision::KinematicCollision;
            
            pub mod physical_bone {
                use super::*;
                # [doc = "`core class PhysicalBone` inherits `PhysicsBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PhysicalBone { pub const JOINT_TYPE_6DOF : i64 = 5i64 ; pub const JOINT_TYPE_CONE : i64 = 2i64 ; pub const JOINT_TYPE_HINGE : i64 = 3i64 ; pub const JOINT_TYPE_NONE : i64 = 0i64 ; pub const JOINT_TYPE_PIN : i64 = 1i64 ; pub const JOINT_TYPE_SLIDER : i64 = 4i64 ; } 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 , thread_access :: 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: physical_bone :: JointType (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale) ; } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , joint_type) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , weight) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicalBone { } unsafe impl GodotObject for PhysicalBone { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PhysicalBone { type Target = crate :: generated :: physics_body :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicalBone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: node :: Node > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicalBone { } impl Instanciable for PhysicalBone { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\u{0}" . as_ptr () as * const c_char) ; table . get_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_body_offset\u{0}" . as_ptr () as * const c_char) ; table . get_bone_id = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_id\u{0}" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{0}" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\u{0}" . as_ptr () as * const c_char) ; table . get_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_offset\u{0}" . as_ptr () as * const c_char) ; table . get_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_type\u{0}" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\u{0}" . as_ptr () as * const c_char) ; table . get_simulate_physics = (gd_api . godot_method_bind_get_method) (class_name , "get_simulate_physics\u{0}" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\u{0}" . as_ptr () as * const c_char) ; table . is_simulating_physics = (gd_api . godot_method_bind_get_method) (class_name , "is_simulating_physics\u{0}" . as_ptr () as * const c_char) ; table . is_static_body = (gd_api . godot_method_bind_get_method) (class_name , "is_static_body\u{0}" . as_ptr () as * const c_char) ; table . set_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_body_offset\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{0}" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\u{0}" . as_ptr () as * const c_char) ; table . set_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_offset\u{0}" . as_ptr () as * const c_char) ; table . set_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_type\u{0}" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\u{0}" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physical_bone::PhysicalBone;
            
            pub mod grid_map {
                use super::*;
                # [doc = "`core class GridMap` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 , thread_access :: 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Rid :: from_sys (ret) } } # [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 :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; ret as _ } } # [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 :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh_library (& self) -> Option < Ref < crate :: generated :: mesh_library :: MeshLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_mesh_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh_library :: MeshLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 octant_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_octant_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 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 :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , gen_lightmap_uv , lightmap_uv_texel_size) ; } } # [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 :: icallptr_vec3_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [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 :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z , item , orientation) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , enabled , clipabove , floor , axis) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh_library (& self , mesh_library : impl AsArg < crate :: generated :: mesh_library :: MeshLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_mesh_library ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh_library . as_arg_ptr ()) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_in_baked_light) ; } } # [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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , pos) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GridMap { } unsafe impl GodotObject for GridMap { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GridMap { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for GridMap { } unsafe impl SubClass < crate :: generated :: node :: Node > for GridMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for GridMap { } impl Instanciable for GridMap { # [inline] fn construct () -> Ref < Self , thread_access :: 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_octant_size : * 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 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_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_octant_size : * 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_octant_size : 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 , 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_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_octant_size : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "clear_baked_meshes\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bake_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_meshes\u{0}" . as_ptr () as * const c_char) ; table . get_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_item\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_scale\u{0}" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\u{0}" . as_ptr () as * const c_char) ; table . get_center_x = (gd_api . godot_method_bind_get_method) (class_name , "get_center_x\u{0}" . as_ptr () as * const c_char) ; table . get_center_y = (gd_api . godot_method_bind_get_method) (class_name , "get_center_y\u{0}" . as_ptr () as * const c_char) ; table . get_center_z = (gd_api . godot_method_bind_get_method) (class_name , "get_center_z\u{0}" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_library\u{0}" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\u{0}" . as_ptr () as * const c_char) ; table . get_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_octant_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\u{0}" . as_ptr () as * const c_char) ; table . make_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "make_baked_meshes\u{0}" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\u{0}" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\u{0}" . as_ptr () as * const c_char) ; table . set_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_item\u{0}" . as_ptr () as * const c_char) ; table . set_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_scale\u{0}" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\u{0}" . as_ptr () as * const c_char) ; table . set_center_x = (gd_api . godot_method_bind_get_method) (class_name , "set_center_x\u{0}" . as_ptr () as * const c_char) ; table . set_center_y = (gd_api . godot_method_bind_get_method) (class_name , "set_center_y\u{0}" . as_ptr () as * const c_char) ; table . set_center_z = (gd_api . godot_method_bind_get_method) (class_name , "set_center_z\u{0}" . as_ptr () as * const c_char) ; table . set_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_clip\u{0}" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh_library\u{0}" . as_ptr () as * const c_char) ; table . set_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_octant_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::grid_map::GridMap;
            
            pub mod editor_spin_slider {
                use super::*;
                # [doc = "`tools class EditorSpinSlider` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flat) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , read_only) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpinSlider { } unsafe impl GodotObject for EditorSpinSlider { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorSpinSlider { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpinSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: object :: 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_read_only : * mut sys :: godot_method_bind , pub set_flat : * 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_read_only : 0 as * mut sys :: godot_method_bind , set_flat : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_flat = (gd_api . godot_method_bind_get_method) (class_name , "is_flat\u{0}" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\u{0}" . as_ptr () as * const c_char) ; table . set_flat = (gd_api . godot_method_bind_get_method) (class_name , "set_flat\u{0}" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\u{0}" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_spin_slider::EditorSpinSlider;
            
            pub mod editor_file_system_directory {
                use super::*;
                # [doc = "`tools class EditorFileSystemDirectory` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the file extension of the file at index `idx`."] # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the subdirectory at index `idx`."] # [doc = ""] # [inline] pub fn get_subdir (& self , idx : i64) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_subdir ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystemDirectory { } unsafe impl GodotObject for EditorFileSystemDirectory { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileSystemDirectory" } } impl std :: ops :: Deref for EditorFileSystemDirectory { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystemDirectory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . find_file_index = (gd_api . godot_method_bind_get_method) (class_name , "find_file_index\u{0}" . as_ptr () as * const c_char) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\u{0}" . as_ptr () as * const c_char) ; table . get_file_count = (gd_api . godot_method_bind_get_method) (class_name , "get_file_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_file_path = (gd_api . godot_method_bind_get_method) (class_name , "get_file_path\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_file_type = (gd_api . godot_method_bind_get_method) (class_name , "get_file_type\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\u{0}" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\u{0}" . as_ptr () as * const c_char) ; table . get_subdir = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir\u{0}" . as_ptr () as * const c_char) ; table . get_subdir_count = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir_count\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_file_system_directory::EditorFileSystemDirectory;
            
            pub mod hashing_context {
                use super::*;
                # [doc = "`core class HashingContext` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = HashingContextMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Starts a new hash computation of the given `type` (e.g. [constant 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Updates the computation with the given `chunk` of data."] # [doc = ""] # [inline] pub fn update (& self , chunk : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HashingContextMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , chunk) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for HashingContext { } unsafe impl GodotObject for HashingContext { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HashingContext" } } impl std :: ops :: Deref for HashingContext { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HashingContext { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for HashingContext { } unsafe impl SubClass < crate :: generated :: object :: Object > for HashingContext { } impl Instanciable for HashingContext { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::hashing_context::HashingContext;
            
            pub mod texture_progress {
                use super::*;
                # [doc = "`core class TextureProgress` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureProgress { pub const FILL_BILINEAR_LEFT_AND_RIGHT : i64 = 6i64 ; pub const FILL_BILINEAR_TOP_AND_BOTTOM : i64 = 7i64 ; pub const FILL_BOTTOM_TO_TOP : i64 = 3i64 ; pub const FILL_CLOCKWISE : i64 = 4i64 ; pub const FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE : i64 = 8i64 ; pub const FILL_COUNTER_CLOCKWISE : i64 = 5i64 ; pub const FILL_LEFT_TO_RIGHT : i64 = 0i64 ; pub const FILL_RIGHT_TO_LEFT : i64 = 1i64 ; pub const FILL_TOP_TO_BOTTOM : i64 = 2i64 ; } 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 , thread_access :: 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 [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `max_value`, the texture fills up to this angle.\nSee [member Range.value], [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The fill direction. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, Godot treats the bar's textures like in [NinePatchRect]. Use the `stretch_margin_*` properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]."] # [doc = ""] # [inline] pub fn over_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_over_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "[Texture] that clips based on the node's `value` and [member 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]. See [member Range.value], [member Range.min_value], [member Range.max_value]."] # [doc = ""] # [inline] pub fn progress_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_progress_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant 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 [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Multiplies the color of the bar's `texture_over` texture. The effect is similar to [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "[Texture] that draws under the progress bar. The bar's background."] # [doc = ""] # [inline] pub fn under_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_under_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Upper limit for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `max_value`, the texture fills up to this angle.\nSee [member Range.value], [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The fill direction. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, Godot treats the bar's textures like in [NinePatchRect]. Use the `stretch_margin_*` properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , stretch) ; } } # [doc = "[Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]."] # [doc = ""] # [inline] pub fn set_over_texture (& self , tex : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_over_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } # [doc = "[Texture] that clips based on the node's `value` and [member 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]. See [member Range.value], [member Range.min_value], [member Range.max_value]."] # [doc = ""] # [inline] pub fn set_progress_texture (& self , tex : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_progress_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } # [doc = "Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant 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 [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , value) ; } } # [doc = "Multiplies the color of the bar's `texture_over` texture. The effect is similar to [member 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , tint) ; } } # [doc = "[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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_under_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureProgress { } unsafe impl GodotObject for TextureProgress { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextureProgress { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureProgress { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for TextureProgress { } unsafe impl SubClass < crate :: generated :: control :: Control > for TextureProgress { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextureProgress { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextureProgress { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureProgress { } impl Instanciable for TextureProgress { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_fill_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_fill_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_over_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_over_texture\u{0}" . as_ptr () as * const c_char) ; table . get_progress_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_progress_texture\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_stretch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_margin\u{0}" . as_ptr () as * const c_char) ; table . get_tint_over = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_over\u{0}" . as_ptr () as * const c_char) ; table . get_tint_progress = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_progress\u{0}" . as_ptr () as * const c_char) ; table . get_tint_under = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_under\u{0}" . as_ptr () as * const c_char) ; table . get_under_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_under_texture\u{0}" . as_ptr () as * const c_char) ; table . set_fill_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_fill_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_over_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_over_texture\u{0}" . as_ptr () as * const c_char) ; table . set_progress_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_progress_texture\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_margin\u{0}" . as_ptr () as * const c_char) ; table . set_tint_over = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_over\u{0}" . as_ptr () as * const c_char) ; table . set_tint_progress = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_progress\u{0}" . as_ptr () as * const c_char) ; table . set_tint_under = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_under\u{0}" . as_ptr () as * const c_char) ; table . set_under_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_under_texture\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::texture_progress::TextureProgress;
            
            pub mod panel_container {
                use super::*;
                # [doc = "`core class PanelContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PanelContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanelContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for PanelContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for PanelContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PanelContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for PanelContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for PanelContainer { } impl Instanciable for PanelContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::panel_container::PanelContainer;
            
            pub mod kinematic_collision_2d {
                use super::*;
                # [doc = "`core class KinematicCollision2D` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 colliding body."] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding body's unique instance ID. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The colliding body's metadata. See [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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "The colliding body's shape."] # [doc = ""] # [inline] pub fn collider_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding shape's index. See [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The moving object's colliding shape."] # [doc = ""] # [inline] pub fn local_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_local_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicCollision2D { } unsafe impl GodotObject for KinematicCollision2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "KinematicCollision2D" } } impl std :: ops :: Deref for KinematicCollision2D { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicCollision2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for KinematicCollision2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for KinematicCollision2D { } impl Instanciable for KinematicCollision2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\u{0}" . as_ptr () as * const c_char) ; table . get_collider_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_local_shape\u{0}" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_remainder\u{0}" . as_ptr () as * const c_char) ; table . get_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_travel\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::kinematic_collision_2d::KinematicCollision2D;
            
            pub mod skeleton_2d {
                use super::*;
                # [doc = "`core class Skeleton2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: bone_2d :: Bone2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_bone ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bone_2d :: Bone2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton2D { } unsafe impl GodotObject for Skeleton2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Skeleton2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Skeleton2D { } impl Instanciable for Skeleton2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\u{0}" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::skeleton_2d::Skeleton2D;
            
            pub mod xml_parser {
                use super::*;
                # [doc = "`core class XMLParser` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl XMLParser { pub const NODE_CDATA : i64 = 5i64 ; pub const NODE_COMMENT : i64 = 4i64 ; pub const NODE_ELEMENT : i64 = 1i64 ; pub const NODE_ELEMENT_END : i64 = 2i64 ; pub const NODE_NONE : i64 = 0i64 ; pub const NODE_TEXT : i64 = 3i64 ; 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the value of a certain attribute of the current element by name. This will return an empty [String] 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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the name of the current element node. This will raise an error if the current node type is neither [constant NODE_ELEMENT] nor [constant 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets the type of the current node. Compare with [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: xml_parser :: NodeType (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Opens an XML raw buffer for parsing. This returns an error code."] # [doc = ""] # [inline] pub fn open_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . open_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , position) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for XMLParser { } unsafe impl GodotObject for XMLParser { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "XMLParser" } } impl std :: ops :: Deref for XMLParser { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for XMLParser { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for XMLParser { } unsafe impl SubClass < crate :: generated :: object :: Object > for XMLParser { } impl Instanciable for XMLParser { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_attribute_name = (gd_api . godot_method_bind_get_method) (class_name , "get_attribute_name\u{0}" . as_ptr () as * const c_char) ; table . get_attribute_value = (gd_api . godot_method_bind_get_method) (class_name , "get_attribute_value\u{0}" . as_ptr () as * const c_char) ; table . get_current_line = (gd_api . godot_method_bind_get_method) (class_name , "get_current_line\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_data = (gd_api . godot_method_bind_get_method) (class_name , "get_node_data\u{0}" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\u{0}" . as_ptr () as * const c_char) ; table . get_node_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_node_offset\u{0}" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\u{0}" . as_ptr () as * const c_char) ; table . has_attribute = (gd_api . godot_method_bind_get_method) (class_name , "has_attribute\u{0}" . as_ptr () as * const c_char) ; table . is_empty = (gd_api . godot_method_bind_get_method) (class_name , "is_empty\u{0}" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\u{0}" . as_ptr () as * const c_char) ; table . open_buffer = (gd_api . godot_method_bind_get_method) (class_name , "open_buffer\u{0}" . as_ptr () as * const c_char) ; table . read = (gd_api . godot_method_bind_get_method) (class_name , "read\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . skip_section = (gd_api . godot_method_bind_get_method) (class_name , "skip_section\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::xml_parser::XMLParser;
            
            pub mod input_event_mouse {
                use super::*;
                # [doc = "`core class InputEventMouse` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl InputEventMouse { # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_mask) ; } } # [doc = "The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , global_position) ; } } # [doc = "The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouse { } unsafe impl GodotObject for InputEventMouse { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouse" } } impl std :: ops :: Deref for InputEventMouse { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouse { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . set_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_button_mask\u{0}" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_mouse::InputEventMouse;
            
            pub mod editor_interface {
                use super::*;
                # [doc = "`tools class EditorInterface` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorInterface { # [doc = ""] # [doc = ""] # [inline] pub fn edit_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Edits the given [Resource]."] # [doc = ""] # [inline] pub fn edit_resource (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_resource ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [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."] # [doc = ""] # [inline] pub fn get_base_control (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_base_control ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the current path being viewed in the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the edited (current) scene's root [Node]."] # [doc = ""] # [inline] pub fn get_edited_scene_root (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_edited_scene_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the editor's [EditorSettings] instance."] # [doc = ""] # [inline] pub fn get_editor_settings (& self) -> Option < Ref < crate :: generated :: editor_settings :: EditorSettings , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_settings ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_settings :: EditorSettings , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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."] # [doc = ""] # [inline] pub fn get_editor_viewport (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [FileSystemDock] instance."] # [doc = ""] # [inline] pub fn get_file_system_dock (& self) -> Option < Ref < crate :: generated :: file_system_dock :: FileSystemDock , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_file_system_dock ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: file_system_dock :: FileSystemDock , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [EditorInspector] instance."] # [doc = ""] # [inline] pub fn get_inspector (& self) -> Option < Ref < crate :: generated :: editor_inspector :: EditorInspector , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_inspector ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_inspector :: EditorInspector , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an [Array] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the editor's [EditorFileSystem] instance."] # [doc = ""] # [inline] pub fn get_resource_filesystem (& self) -> Option < Ref < crate :: generated :: editor_file_system :: EditorFileSystem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_filesystem ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system :: EditorFileSystem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [EditorResourcePreview] instance."] # [doc = ""] # [inline] pub fn get_resource_previewer (& self) -> Option < Ref < crate :: generated :: editor_resource_preview :: EditorResourcePreview , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_previewer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_resource_preview :: EditorResourcePreview , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [ScriptEditor] instance."] # [doc = ""] # [inline] pub fn get_script_editor (& self) -> Option < Ref < crate :: generated :: script_editor :: ScriptEditor , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_script_editor ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script_editor :: ScriptEditor , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the editor's [EditorSelection] instance."] # [doc = ""] # [inline] pub fn get_selection (& self) -> Option < Ref < crate :: generated :: editor_selection :: EditorSelection , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_selection ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_selection :: EditorSelection , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Shows the given property on the given `object` in the editor's Inspector dock.\n# Default Arguments\n* `for_property` - `\"\"`"] # [doc = ""] # [inline] pub fn inspect_object (& self , object : impl AsArg < crate :: generated :: object :: 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 :: icallptr_void_obj_str_bool (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , for_property . into () , inspector_only) ; } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , plugin . into ()) ; ret as _ } } # [doc = "Returns mesh previews rendered at the given size as an [Array] of [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) ; < 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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void_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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , with_preview) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enter) ; } } # [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 :: icallptr_void_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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , plugin . into () , enabled) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInterface { } unsafe impl GodotObject for EditorInterface { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorInterface { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorInterface { } unsafe impl SubClass < crate :: generated :: object :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . edit_resource = (gd_api . godot_method_bind_get_method) (class_name , "edit_resource\u{0}" . as_ptr () as * const c_char) ; table . get_base_control = (gd_api . godot_method_bind_get_method) (class_name , "get_base_control\u{0}" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_editor_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_scale\u{0}" . as_ptr () as * const c_char) ; table . get_editor_settings = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_settings\u{0}" . as_ptr () as * const c_char) ; table . get_editor_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_viewport\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_inspector = (gd_api . godot_method_bind_get_method) (class_name , "get_inspector\u{0}" . as_ptr () as * const c_char) ; table . get_open_scenes = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scenes\u{0}" . as_ptr () as * const c_char) ; table . get_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_scene\u{0}" . as_ptr () as * const c_char) ; table . get_resource_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_filesystem\u{0}" . as_ptr () as * const c_char) ; table . get_resource_previewer = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_previewer\u{0}" . as_ptr () as * const c_char) ; table . get_script_editor = (gd_api . godot_method_bind_get_method) (class_name , "get_script_editor\u{0}" . as_ptr () as * const c_char) ; table . get_selected_path = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_path\u{0}" . as_ptr () as * const c_char) ; table . get_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_selection\u{0}" . as_ptr () as * const c_char) ; table . inspect_object = (gd_api . godot_method_bind_get_method) (class_name , "inspect_object\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "is_playing_scene\u{0}" . as_ptr () as * const c_char) ; table . is_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_plugin_enabled\u{0}" . as_ptr () as * const c_char) ; table . make_mesh_previews = (gd_api . godot_method_bind_get_method) (class_name , "make_mesh_previews\u{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\u{0}" . as_ptr () as * const c_char) ; table . play_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_current_scene\u{0}" . as_ptr () as * const c_char) ; table . play_custom_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_custom_scene\u{0}" . as_ptr () as * const c_char) ; table . play_main_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_main_scene\u{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\u{0}" . as_ptr () as * const c_char) ; table . save_scene = (gd_api . godot_method_bind_get_method) (class_name , "save_scene\u{0}" . as_ptr () as * const c_char) ; table . save_scene_as = (gd_api . godot_method_bind_get_method) (class_name , "save_scene_as\u{0}" . as_ptr () as * const c_char) ; table . select_file = (gd_api . godot_method_bind_get_method) (class_name , "select_file\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_plugin_enabled\u{0}" . as_ptr () as * const c_char) ; table . stop_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "stop_playing_scene\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_interface::EditorInterface;
            
            pub mod input_event_key {
                use super::*;
                # [doc = "`core class InputEventKey` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the scancode combined with modifier keys such as `Shift` or `Alt`. See also [InputEventWithModifiers].\nTo get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_scancode_with_modifiers())` where `event` is the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , echo) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; } } # [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 [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , unicode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventKey { } unsafe impl GodotObject for InputEventKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventKey" } } impl std :: ops :: Deref for InputEventKey { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventKey { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventKey { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventKey { } impl Instanciable for InputEventKey { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_unicode = (gd_api . godot_method_bind_get_method) (class_name , "get_unicode\u{0}" . as_ptr () as * const c_char) ; table . set_echo = (gd_api . godot_method_bind_get_method) (class_name , "set_echo\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_scancode\u{0}" . as_ptr () as * const c_char) ; table . set_unicode = (gd_api . godot_method_bind_get_method) (class_name , "set_unicode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_key::InputEventKey;
            
            pub mod proximity_group {
                use super::*;
                # [doc = "`core class ProximityGroup` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 = ""] # [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 :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , method . into () , parameters . owned_to_variant ()) ; } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: proximity_group :: DispatchMode (ret) } } # [doc = ""] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ProximityGroup { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProximityGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ProximityGroup { } unsafe impl SubClass < crate :: generated :: node :: Node > for ProximityGroup { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProximityGroup { } impl Instanciable for ProximityGroup { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_dispatch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_dispatch_mode\u{0}" . as_ptr () as * const c_char) ; table . get_grid_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_grid_radius\u{0}" . as_ptr () as * const c_char) ; table . get_group_name = (gd_api . godot_method_bind_get_method) (class_name , "get_group_name\u{0}" . as_ptr () as * const c_char) ; table . set_dispatch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_dispatch_mode\u{0}" . as_ptr () as * const c_char) ; table . set_grid_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_grid_radius\u{0}" . as_ptr () as * const c_char) ; table . set_group_name = (gd_api . godot_method_bind_get_method) (class_name , "set_group_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::proximity_group::ProximityGroup;
            
            pub mod vbox_container {
                use super::*;
                # [doc = "`core class VBoxContainer` inherits `BoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VBoxContainer { type Target = crate :: generated :: box_container :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VBoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: container :: Container > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for VBoxContainer { } impl Instanciable for VBoxContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::vbox_container::VBoxContainer;
            
            pub mod audio_effect_panner {
                use super::*;
                # [doc = "`core class AudioEffectPanner` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cpanume) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPanner { } unsafe impl GodotObject for AudioEffectPanner { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPanner" } } impl std :: ops :: Deref for AudioEffectPanner { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPanner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPanner { } impl Instanciable for AudioEffectPanner { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_pan\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_panner::AudioEffectPanner;
            
            pub mod collision_object {
                use super::*;
                # [doc = "`core class CollisionObject` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . create_shape_owner ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the object's [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns an [Array] 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`, the [CollisionObject]'s shapes will respond to [RayCast]s."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the [CollisionObject]'s shapes will respond to [RayCast]s."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ray_pickable) ; } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , shape_index) ; ret as _ } } # [doc = "Adds a [Shape] to the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_add_shape (& self , owner_id : i64 , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_add_shape ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , owner_id , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [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 :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_owner ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the [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 :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Returns the child index of the [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ret as _ } } # [doc = "Returns the shape owner's [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id , disabled) ; } } # [doc = "Sets the [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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , owner_id , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionObject { } unsafe impl GodotObject for CollisionObject { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionObject { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionObject { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionObject { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionObject { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\u{0}" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\u{0}" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\u{0}" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_object::CollisionObject;
            
            pub mod ray_cast_2d {
                use super::*;
                # [doc = "`core class RayCast2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallptr_void_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]."] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , local_point) ; } } # [doc = "If `true`, collision with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, collision with [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mask) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayCast2D { } unsafe impl GodotObject for RayCast2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RayCast2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayCast2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for RayCast2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RayCast2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for RayCast2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayCast2D { } impl Instanciable for RayCast2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\u{0}" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\u{0}" . as_ptr () as * const c_char) ; table . force_raycast_update = (gd_api . godot_method_bind_get_method) (class_name , "force_raycast_update\u{0}" . as_ptr () as * const c_char) ; table . get_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_to\u{0}" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\u{0}" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\u{0}" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_colliding = (gd_api . godot_method_bind_get_method) (class_name , "is_colliding\u{0}" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\u{0}" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\u{0}" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\u{0}" . as_ptr () as * const c_char) ; table . set_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_to\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ray_cast_2d::RayCast2D;
            
            pub mod visual_shader_node_vector_smooth_step {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorSmoothStep { } impl Instanciable for VisualShaderNodeVectorSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_smooth_step::VisualShaderNodeVectorSmoothStep;
            
            pub mod surface_tool {
                use super::*;
                # [doc = "`core class SurfaceTool` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "Adds an array of bones for the next vertex to use. `bones` must contain 4 integers."] # [doc = ""] # [inline] pub fn add_bones (& self , bones : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_bones ; let ret = crate :: icalls :: icallptr_void_i32arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = "Specifies a [Color] for the next vertex to use."] # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Specifies a normal for the next vertex to use."] # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth) ; } } # [doc = "Specifies a tangent for the next vertex to use."] # [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 :: icallptr_void_plane (method_bind , self . this . sys () . as_ptr () , tangent) ; } } # [doc = "Inserts a triangle fan made of array data into [Mesh] being constructed.\nRequires the primitive type be set to [constant 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 : Vector3Array , uvs : Vector2Array , colors : ColorArray , uv2s : Vector2Array , normals : Vector3Array , tangents : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_triangle_fan ; let ret = crate :: icalls :: icallptr_void_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."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Specifies an optional second set of UV coordinates to use for the next vertex."] # [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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , vertex) ; } } # [doc = "Specifies weight values for next vertex to use. `weights` must contain 4 values."] # [doc = ""] # [inline] pub fn add_weights (& self , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_weights ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , weights) ; } } # [doc = "Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]."] # [doc = ""] # [inline] pub fn append_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . append_from ; let ret = crate :: icalls :: icallptr_void_obj_i64_trans (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , transform) ; } } # [doc = "Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , primitive) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].\nDefault flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See `ARRAY_COMPRESS_*` constants in [enum Mesh.ArrayFormat] for other flags.\n# Default Arguments\n* `existing` - `null`\n* `flags` - `97280`"] # [doc = ""] # [inline] pub fn commit (& self , existing : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh > , flags : i64) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallptr_obj_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , flags) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [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]."] # [doc = ""] # [inline] pub fn create_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface) ; } } # [doc = "Creates a vertex array from the specified blend shape of an existing [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 :: 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 :: icallptr_void_obj_i64_str (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , 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 :: icallptr_void (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.\nRequires the primitive type to be set to [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip) ; } } # [doc = "Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already."] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shrinks the vertex array by creating an index array (avoids reusing vertices)."] # [doc = ""] # [inline] pub fn index (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . index ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets [Material] to be used by the [Mesh] you are constructing."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SurfaceTool" } } impl std :: ops :: Deref for SurfaceTool { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SurfaceTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SurfaceTool { } unsafe impl SubClass < crate :: generated :: object :: Object > for SurfaceTool { } impl Instanciable for SurfaceTool { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_color = (gd_api . godot_method_bind_get_method) (class_name , "add_color\u{0}" . as_ptr () as * const c_char) ; table . add_index = (gd_api . godot_method_bind_get_method) (class_name , "add_index\u{0}" . as_ptr () as * const c_char) ; table . add_normal = (gd_api . godot_method_bind_get_method) (class_name , "add_normal\u{0}" . as_ptr () as * const c_char) ; table . add_smooth_group = (gd_api . godot_method_bind_get_method) (class_name , "add_smooth_group\u{0}" . as_ptr () as * const c_char) ; table . add_tangent = (gd_api . godot_method_bind_get_method) (class_name , "add_tangent\u{0}" . as_ptr () as * const c_char) ; table . add_triangle_fan = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle_fan\u{0}" . as_ptr () as * const c_char) ; table . add_uv = (gd_api . godot_method_bind_get_method) (class_name , "add_uv\u{0}" . as_ptr () as * const c_char) ; table . add_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "add_uv2\u{0}" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\u{0}" . as_ptr () as * const c_char) ; table . add_weights = (gd_api . godot_method_bind_get_method) (class_name , "add_weights\u{0}" . as_ptr () as * const c_char) ; table . append_from = (gd_api . godot_method_bind_get_method) (class_name , "append_from\u{0}" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\u{0}" . as_ptr () as * const c_char) ; table . commit_to_arrays = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_arrays\u{0}" . as_ptr () as * const c_char) ; table . create_from = (gd_api . godot_method_bind_get_method) (class_name , "create_from\u{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\u{0}" . as_ptr () as * const c_char) ; table . deindex = (gd_api . godot_method_bind_get_method) (class_name , "deindex\u{0}" . as_ptr () as * const c_char) ; table . generate_normals = (gd_api . godot_method_bind_get_method) (class_name , "generate_normals\u{0}" . as_ptr () as * const c_char) ; table . generate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "generate_tangents\u{0}" . as_ptr () as * const c_char) ; table . index = (gd_api . godot_method_bind_get_method) (class_name , "index\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::surface_tool::SurfaceTool;
            
            pub mod confirmation_dialog {
                use super::*;
                # [doc = "`core class ConfirmationDialog` inherits `AcceptDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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."] # [doc = ""] # [inline] pub fn get_cancel (& self) -> Option < Ref < crate :: generated :: button :: Button , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfirmationDialogMethodTable :: get (get_api ()) . get_cancel ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: button :: Button , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for ConfirmationDialog { } unsafe impl GodotObject for ConfirmationDialog { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ConfirmationDialog { type Target = crate :: generated :: accept_dialog :: AcceptDialog ; # [inline] fn deref (& self) -> & crate :: generated :: accept_dialog :: AcceptDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConfirmationDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: accept_dialog :: AcceptDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConfirmationDialog { } impl Instanciable for ConfirmationDialog { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::confirmation_dialog::ConfirmationDialog;
            
            pub mod web_xr_interface {
                use super::*;
                # [doc = "`core class WebXRInterface` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl WebXRInterface { # [doc = ""] # [doc = ""] # [inline] pub fn bounds_geometry (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_bounds_geometry ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_controller (& self , controller_id : i64) -> Option < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_controller ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , controller_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , session_mode . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebXRInterface { } unsafe impl GodotObject for WebXRInterface { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebXRInterface" } } impl std :: ops :: Deref for WebXRInterface { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebXRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: object :: 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_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 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 } 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_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 , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_controller = (gd_api . godot_method_bind_get_method) (class_name , "get_controller\u{0}" . as_ptr () as * const c_char) ; table . get_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "get_optional_features\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_required_features = (gd_api . godot_method_bind_get_method) (class_name , "get_required_features\u{0}" . as_ptr () as * const c_char) ; table . get_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_session_mode\u{0}" . as_ptr () as * const c_char) ; table . get_visibility_state = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_state\u{0}" . as_ptr () as * const c_char) ; table . is_session_supported = (gd_api . godot_method_bind_get_method) (class_name , "is_session_supported\u{0}" . as_ptr () as * const c_char) ; table . set_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "set_optional_features\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_required_features = (gd_api . godot_method_bind_get_method) (class_name , "set_required_features\u{0}" . as_ptr () as * const c_char) ; table . set_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_session_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_xr_interface::WebXRInterface;
            
            pub mod style_box_flat {
                use super::*;
                # [doc = "`core class StyleBoxFlat` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_aa_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Border width for the top border."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "This sets the amount 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 ([method set_corner_radius_all]) into account.\nFor corner radii smaller than 10, `4` or `5` should be enough. For corner radii smaller 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , corner) ; ret as _ } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "The color of the shadow. This has no effect if [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_aa_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , anti_aliased) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , blend) ; } } # [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Border width for the top border."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , width) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [doc = "This sets the amount 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 ([method set_corner_radius_all]) into account.\nFor corner radii smaller than 10, `4` or `5` should be enough. For corner radii smaller 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail) ; } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , corner , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , radius_top_left , radius_top_right , radius_bottom_right , radius_bottom_left) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_center) ; } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left , size_top , size_right , size_bottom) ; } } # [doc = "The color of the shadow. This has no effect if [member 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxFlat { } unsafe impl GodotObject for StyleBoxFlat { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxFlat" } } impl std :: ops :: Deref for StyleBoxFlat { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxFlat { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxFlat { } impl Instanciable for StyleBoxFlat { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 } 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 , 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\u{0}" . as_ptr () as * const c_char) ; table . get_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "get_border_blend\u{0}" . as_ptr () as * const c_char) ; table . get_border_color = (gd_api . godot_method_bind_get_method) (class_name , "get_border_color\u{0}" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_detail\u{0}" . as_ptr () as * const c_char) ; table . get_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_radius\u{0}" . as_ptr () as * const c_char) ; table . get_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_margin\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_offset\u{0}" . as_ptr () as * const c_char) ; table . get_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_size\u{0}" . as_ptr () as * const c_char) ; table . is_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "is_anti_aliased\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_aa_size = (gd_api . godot_method_bind_get_method) (class_name , "set_aa_size\u{0}" . as_ptr () as * const c_char) ; table . set_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "set_anti_aliased\u{0}" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\u{0}" . as_ptr () as * const c_char) ; table . set_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "set_border_blend\u{0}" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\u{0}" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_detail\u{0}" . as_ptr () as * const c_char) ; table . set_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\u{0}" . as_ptr () as * const c_char) ; table . set_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_offset\u{0}" . as_ptr () as * const c_char) ; table . set_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::style_box_flat::StyleBoxFlat;
            
            pub mod audio_effect_spectrum_analyzer {
                use super::*;
                # [doc = "`core class AudioEffectSpectrumAnalyzer` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectSpectrumAnalyzer { pub const FFT_SIZE_1024 : i64 = 2i64 ; pub const FFT_SIZE_2048 : i64 = 3i64 ; pub const FFT_SIZE_256 : i64 = 0i64 ; pub const FFT_SIZE_4096 : i64 = 4i64 ; pub const FFT_SIZE_512 : i64 = 1i64 ; 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 , thread_access :: 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 = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_spectrum_analyzer :: FftSize (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectSpectrumAnalyzer { } unsafe impl GodotObject for AudioEffectSpectrumAnalyzer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectSpectrumAnalyzer" } } impl std :: ops :: Deref for AudioEffectSpectrumAnalyzer { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectSpectrumAnalyzer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectSpectrumAnalyzer { } impl Instanciable for AudioEffectSpectrumAnalyzer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fft_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\u{0}" . as_ptr () as * const c_char) ; table . set_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fft_size\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_spectrum_analyzer::AudioEffectSpectrumAnalyzer;
            
            pub mod path_follow_2d {
                use super::*;
                # [doc = "`core class PathFollow2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] of the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 lookahead (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_lookahead ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 unit_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_unit_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [Curve2D] of the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , h_offset) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , lookahead) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _loop) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , unit_offset) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , v_offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PathFollow2D { } unsafe impl GodotObject for PathFollow2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PathFollow2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PathFollow2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for PathFollow2D { } impl Instanciable for PathFollow2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\u{0}" . as_ptr () as * const c_char) ; table . get_lookahead = (gd_api . godot_method_bind_get_method) (class_name , "get_lookahead\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_offset\u{0}" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\u{0}" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\u{0}" . as_ptr () as * const c_char) ; table . is_rotating = (gd_api . godot_method_bind_get_method) (class_name , "is_rotating\u{0}" . as_ptr () as * const c_char) ; table . set_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_cubic_interpolation\u{0}" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\u{0}" . as_ptr () as * const c_char) ; table . set_lookahead = (gd_api . godot_method_bind_get_method) (class_name , "set_lookahead\u{0}" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_rotate = (gd_api . godot_method_bind_get_method) (class_name , "set_rotate\u{0}" . as_ptr () as * const c_char) ; table . set_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_offset\u{0}" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::path_follow_2d::PathFollow2D;
            
            pub mod visual_shader_node_scalar_clamp {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarClamp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarClamp" } } impl std :: ops :: Deref for VisualShaderNodeScalarClamp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarClamp { } impl Instanciable for VisualShaderNodeScalarClamp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_clamp::VisualShaderNodeScalarClamp;
            
            pub mod range {
                use super::*;
                # [doc = "`core class Range` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Page size. Used mainly for [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, [member value] may be greater than [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, [member value] may be less than [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, [member value] may be greater than [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [doc = "If `true`, [member value] may be less than [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , maximum) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , minimum) ; } } # [doc = "Page size. Used mainly for [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pagesize) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , step) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Binds two ranges 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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . share ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , with . as_arg_ptr ()) ; } } # [doc = "Stops 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Range { } unsafe impl GodotObject for Range { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Range { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Range { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Range { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Range { } unsafe impl SubClass < crate :: generated :: node :: Node > for Range { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max = (gd_api . godot_method_bind_get_method) (class_name , "get_max\u{0}" . as_ptr () as * const c_char) ; table . get_min = (gd_api . godot_method_bind_get_method) (class_name , "get_min\u{0}" . as_ptr () as * const c_char) ; table . get_page = (gd_api . godot_method_bind_get_method) (class_name , "get_page\u{0}" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\u{0}" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\u{0}" . as_ptr () as * const c_char) ; table . is_greater_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_allowed\u{0}" . as_ptr () as * const c_char) ; table . is_lesser_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_lesser_allowed\u{0}" . as_ptr () as * const c_char) ; table . is_ratio_exp = (gd_api . godot_method_bind_get_method) (class_name , "is_ratio_exp\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_allow_greater = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_greater\u{0}" . as_ptr () as * const c_char) ; table . set_allow_lesser = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_lesser\u{0}" . as_ptr () as * const c_char) ; table . set_as_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_as_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_exp_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_exp_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_max = (gd_api . godot_method_bind_get_method) (class_name , "set_max\u{0}" . as_ptr () as * const c_char) ; table . set_min = (gd_api . godot_method_bind_get_method) (class_name , "set_min\u{0}" . as_ptr () as * const c_char) ; table . set_page = (gd_api . godot_method_bind_get_method) (class_name , "set_page\u{0}" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\u{0}" . as_ptr () as * const c_char) ; table . share = (gd_api . godot_method_bind_get_method) (class_name , "share\u{0}" . as_ptr () as * const c_char) ; table . unshare = (gd_api . godot_method_bind_get_method) (class_name , "unshare\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::range::Range;
            
            pub mod text_edit {
                use super::*;
                # [doc = "`core class TextEdit` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextEdit { pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const MENU_CUT : i64 = 0i64 ; pub const MENU_MAX : i64 = 7i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; pub const SEARCH_BACKWARDS : i64 = 4i64 ; pub const SEARCH_MATCH_CASE : i64 = 1i64 ; pub const SEARCH_RESULT_COLUMN : i64 = 0i64 ; pub const SEARCH_RESULT_LINE : i64 = 1i64 ; pub const SEARCH_WHOLE_WORDS : i64 = 2i64 ; } 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 , thread_access :: 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 :: icallptr_void_str_str_color_bool (method_bind , self . this . sys () . as_ptr () , begin_key . into () , end_key . into () , color , line_only) ; } } # [doc = "Adds a `keyword` and its [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 :: icallptr_void_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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = "Centers the viewport on the line the editing cursor is at. This also resets the [member 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all custom syntax coloring information previously added with [method add_color_region] or [method 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , blink_speed) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , adjust_viewport) ; } } # [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 [method 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 :: icallptr_void_i64_bool_bool_i64 (method_bind , self . this . sys () . as_ptr () , line , adjust_viewport , can_be_hidden , wrap_index) ; } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw) ; } } # [doc = "Folds all lines that are possible to be folded (see [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Folds the given line, if possible (see [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [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 = "The current horizontal scroll value."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [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 :: icallptr_color_str (method_bind , self . this . sys () . as_ptr () , keyword . into ()) ; mem :: transmute (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , line) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (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 = TextEditMethodTable :: get (get_api ()) . get_selection_to_column ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "String value of the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The current vertical scroll value."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [String] text with the word under the mouse 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , keyword . into ()) ; ret as _ } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = "If `true`, all lines that have been set to hidden by [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, text can be selected.\nIf `false`, text can not be selected by the user or by the [method select] or [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, any custom color properties that have been set for this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Triggers a right-click menu action by the specified index. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , option) ; } } # [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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all the breakpoints. This will not fire the [signal 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 :: icallptr_void (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 [enum 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 [enum 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) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . search ; let ret = crate :: icalls :: icallptr_i32arr_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , key . into () , flags , from_line , from_column) ; Int32Array :: from_sys (ret) } } # [doc = "Perform selection, from line/column to line/column.\nIf [member 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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_line , from_column , to_line , to_column) ; } } # [doc = "Select all the text.\nIf [member 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the fold gutter is visible. This enables folding groups of indented lines."] # [doc = ""] # [inline] pub fn set_draw_fold_gutter (& self , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_fold_gutter ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "If `true`, the \"space\" character will have a visible representation."] # [doc = ""] # [inline] pub fn set_draw_spaces (& self , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_spaces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "If `true`, the \"tab\" character will have a visible representation."] # [doc = ""] # [inline] pub fn set_draw_tabs (& self , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_tabs ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [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 = TextEditMethodTable :: get (get_api ()) . set_h_scroll ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "If `true`, all lines that have been set to hidden by [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , line , new_text . into ()) ; } } # [doc = ""] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , line , bookmark) ; } } # [doc = ""] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , line , breakpoint) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , line , enable) ; } } # [doc = ""] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , line , safe) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, text can be selected.\nIf `false`, text can not be selected by the user or by the [method select] or [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, any custom color properties that have been set for this [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "String value of the [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "The current vertical scroll value."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [doc = "Unhide all lines that were previously set to hidden by [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextEdit { } unsafe impl GodotObject for TextEdit { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextEdit { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for TextEdit { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextEdit { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextEdit { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextEdit { } impl Instanciable for TextEdit { # [inline] fn construct () -> Ref < Self , thread_access :: 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_count : * mut sys :: godot_method_bind , pub get_menu : * mut sys :: godot_method_bind , pub get_minimap_width : * 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_v_scroll : * mut sys :: godot_method_bind , pub get_v_scroll_speed : * 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 insert_text_at_cursor : * 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_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_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_breakpoint_gutter_enabled : * mut sys :: godot_method_bind , pub set_context_menu_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_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_count : 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_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_v_scroll : 0 as * mut sys :: godot_method_bind , get_v_scroll_speed : 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 , insert_text_at_cursor : 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_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_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_breakpoint_gutter_enabled : 0 as * mut sys :: godot_method_bind , set_context_menu_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "add_keyword_color\u{0}" . as_ptr () as * const c_char) ; table . can_fold = (gd_api . godot_method_bind_get_method) (class_name , "can_fold\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_colors = (gd_api . godot_method_bind_get_method) (class_name , "clear_colors\u{0}" . as_ptr () as * const c_char) ; table . clear_undo_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_undo_history\u{0}" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . cursor_get_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_column\u{0}" . as_ptr () as * const c_char) ; table . cursor_get_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_line\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . cursor_set_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_column\u{0}" . as_ptr () as * const c_char) ; table . cursor_set_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_line\u{0}" . as_ptr () as * const c_char) ; table . cut = (gd_api . godot_method_bind_get_method) (class_name , "cut\u{0}" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\u{0}" . as_ptr () as * const c_char) ; table . draw_minimap = (gd_api . godot_method_bind_get_method) (class_name , "draw_minimap\u{0}" . as_ptr () as * const c_char) ; table . fold_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "fold_all_lines\u{0}" . as_ptr () as * const c_char) ; table . fold_line = (gd_api . godot_method_bind_get_method) (class_name , "fold_line\u{0}" . as_ptr () as * const c_char) ; table . get_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "get_breakpoints\u{0}" . as_ptr () as * const c_char) ; table . get_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "get_keyword_color\u{0}" . as_ptr () as * const c_char) ; table . get_line = (gd_api . godot_method_bind_get_method) (class_name , "get_line\u{0}" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\u{0}" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\u{0}" . as_ptr () as * const c_char) ; table . get_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_width\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_selection_text = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_text\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{0}" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "has_keyword_color\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_drawing_minimap = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_minimap\u{0}" . as_ptr () as * const c_char) ; table . is_drawing_spaces = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_spaces\u{0}" . as_ptr () as * const c_char) ; table . is_drawing_tabs = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_tabs\u{0}" . as_ptr () as * const c_char) ; table . is_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_folded\u{0}" . as_ptr () as * const c_char) ; table . is_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_hiding_enabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_line_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_line_hidden\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_readonly = (gd_api . godot_method_bind_get_method) (class_name , "is_readonly\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_selection_active = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_active\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_wrap_enabled\u{0}" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\u{0}" . as_ptr () as * const c_char) ; table . paste = (gd_api . godot_method_bind_get_method) (class_name , "paste\u{0}" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\u{0}" . as_ptr () as * const c_char) ; table . remove_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "remove_breakpoints\u{0}" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\u{0}" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\u{0}" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_draw_spaces = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_spaces\u{0}" . as_ptr () as * const c_char) ; table . set_draw_tabs = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_tabs\u{0}" . as_ptr () as * const c_char) ; table . set_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_h_scroll\u{0}" . as_ptr () as * const c_char) ; table . set_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_hiding_enabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_line = (gd_api . godot_method_bind_get_method) (class_name , "set_line\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_width\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_readonly = (gd_api . godot_method_bind_get_method) (class_name , "set_readonly\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_syntax_coloring = (gd_api . godot_method_bind_get_method) (class_name , "set_syntax_coloring\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_wrap_enabled\u{0}" . as_ptr () as * const c_char) ; table . toggle_fold_line = (gd_api . godot_method_bind_get_method) (class_name , "toggle_fold_line\u{0}" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\u{0}" . as_ptr () as * const c_char) ; table . unfold_line = (gd_api . godot_method_bind_get_method) (class_name , "unfold_line\u{0}" . as_ptr () as * const c_char) ; table . unhide_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "unhide_all_lines\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::text_edit::TextEdit;
            
            pub mod light_occluder_2d {
                use super::*;
                # [doc = "`core class LightOccluder2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn occluder_polygon (& self) -> Option < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . get_occluder_polygon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "The [OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn set_occluder_polygon (& self , polygon : impl AsArg < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . set_occluder_polygon ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LightOccluder2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LightOccluder2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for LightOccluder2D { } impl Instanciable for LightOccluder2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_polygon\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::light_occluder_2d::LightOccluder2D;
            
            pub mod editor_resource_conversion_plugin {
                use super::*;
                # [doc = "`tools class EditorResourceConversionPlugin` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorResourceConversionPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourceConversionPlugin { } unsafe impl GodotObject for EditorResourceConversionPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorResourceConversionPlugin" } } impl std :: ops :: Deref for EditorResourceConversionPlugin { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourceConversionPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorResourceConversionPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::editor_resource_conversion_plugin::EditorResourceConversionPlugin;
            
            pub mod hscroll_bar {
                use super::*;
                # [doc = "`core class HScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for HScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for HScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for HScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for HScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for HScrollBar { } impl Instanciable for HScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::hscroll_bar::HScrollBar;
            
            pub mod multi_mesh {
                use super::*;
                # [doc = "`core class MultiMesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiMesh { pub const COLOR_8BIT : i64 = 1i64 ; pub const COLOR_FLOAT : i64 = 2i64 ; pub const COLOR_NONE : i64 = 0i64 ; pub const CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const CUSTOM_DATA_FLOAT : i64 = 2i64 ; pub const CUSTOM_DATA_NONE : i64 = 0i64 ; pub const TRANSFORM_2D : i64 = 0i64 ; pub const TRANSFORM_3D : i64 = 1i64 ; } 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 , thread_access :: 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 [method 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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: ColorFormat (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: CustomDataFormat (ret) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [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 [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Returns the [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Returns the [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 :: icallptr_trans2D_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: TransformFormat (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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] is stored as 12 floats, [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 : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_as_bulk_array ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Sets the color of a specific instance.\nFor the color to take effect, ensure that [member color_format] is non-`null` on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is `true` on the material."] # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , instance , 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 [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } # [doc = "Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum 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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , instance , custom_data) ; } } # [doc = "Sets the [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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Sets the [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 :: icallptr_void_i64_trans2D (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMesh { } unsafe impl GodotObject for MultiMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiMesh" } } impl std :: ops :: Deref for MultiMesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MultiMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiMesh { } impl Instanciable for MultiMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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_transform_format : * mut sys :: godot_method_bind , pub get_visible_instance_count : * mut sys :: godot_method_bind , pub set_as_bulk_array : * 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_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_transform_format : 0 as * mut sys :: godot_method_bind , get_visible_instance_count : 0 as * mut sys :: godot_method_bind , set_as_bulk_array : 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_color_format = (gd_api . godot_method_bind_get_method) (class_name , "get_color_format\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_color\u{0}" . as_ptr () as * const c_char) ; table . get_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "get_transform_format\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_color_format = (gd_api . godot_method_bind_get_method) (class_name , "set_color_format\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_color\u{0}" . as_ptr () as * const c_char) ; table . set_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_count\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "set_transform_format\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::multi_mesh::MultiMesh;
            
            pub mod slider_joint {
                use super::*;
                # [doc = "`core class SliderJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SliderJoint { pub const PARAM_ANGULAR_LIMIT_DAMPING : i64 = 15i64 ; pub const PARAM_ANGULAR_LIMIT_LOWER : i64 = 12i64 ; pub const PARAM_ANGULAR_LIMIT_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 13i64 ; pub const PARAM_ANGULAR_LIMIT_UPPER : i64 = 11i64 ; pub const PARAM_ANGULAR_MOTION_DAMPING : i64 = 18i64 ; pub const PARAM_ANGULAR_MOTION_RESTITUTION : i64 = 17i64 ; pub const PARAM_ANGULAR_MOTION_SOFTNESS : i64 = 16i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_DAMPING : i64 = 21i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_RESTITUTION : i64 = 20i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_SOFTNESS : i64 = 19i64 ; pub const PARAM_LINEAR_LIMIT_DAMPING : i64 = 4i64 ; pub const PARAM_LINEAR_LIMIT_LOWER : i64 = 1i64 ; pub const PARAM_LINEAR_LIMIT_RESTITUTION : i64 = 3i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const PARAM_LINEAR_LIMIT_UPPER : i64 = 0i64 ; pub const PARAM_LINEAR_MOTION_DAMPING : i64 = 7i64 ; pub const PARAM_LINEAR_MOTION_RESTITUTION : i64 = 6i64 ; pub const PARAM_LINEAR_MOTION_SOFTNESS : i64 = 5i64 ; pub const PARAM_LINEAR_ORTHOGONAL_DAMPING : i64 = 10i64 ; pub const PARAM_LINEAR_ORTHOGONAL_RESTITUTION : i64 = 9i64 ; pub const PARAM_LINEAR_ORTHOGONAL_SOFTNESS : i64 = 8i64 ; 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 , thread_access :: 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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SliderJoint { } unsafe impl GodotObject for SliderJoint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SliderJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SliderJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for SliderJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SliderJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for SliderJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for SliderJoint { } impl Instanciable for SliderJoint { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::slider_joint::SliderJoint;
            
            pub mod audio_stream_mp3 {
                use super::*;
                # [doc = "`core class AudioStreamMP3` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMP3 { } unsafe impl GodotObject for AudioStreamMP3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMP3" } } impl std :: ops :: Deref for AudioStreamMP3 { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMP3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMP3 { } impl Instanciable for AudioStreamMP3 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\u{0}" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\u{0}" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\u{0}" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\u{0}" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_mp3::AudioStreamMP3;
            
            pub mod script_editor {
                use super::*;
                # [doc = "`tools class ScriptEditor` inherits `PanelContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl ScriptEditor { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: control :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallptr_bool_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallptr_void_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; } } # [doc = "Returns a [Script] that is currently active in editor."] # [doc = ""] # [inline] pub fn get_current_script (& self) -> Option < Ref < crate :: generated :: script :: Script , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_current_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script :: Script , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , point : Vector2 , from : impl AsArg < crate :: generated :: control :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallptr_var_vec2_obj (method_bind , self . this . sys () . as_ptr () , point , from . as_arg_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "Returns an array with all [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line_number) ; } } # [doc = ""] # [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 :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , base_name . into () , base_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScriptEditor { } unsafe impl GodotObject for ScriptEditor { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScriptEditor { type Target = crate :: generated :: panel_container :: PanelContainer ; # [inline] fn deref (& self) -> & crate :: generated :: panel_container :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: panel_container :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: panel_container :: PanelContainer > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: container :: Container > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: object :: 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 } 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\u{0}" . as_ptr () as * const c_char) ; table . get_current_script = (gd_api . godot_method_bind_get_method) (class_name , "get_current_script\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_open_scripts = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scripts\u{0}" . as_ptr () as * const c_char) ; table . goto_line = (gd_api . godot_method_bind_get_method) (class_name , "goto_line\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::script_editor::ScriptEditor;
            
            pub mod physics_2d_direct_body_state {
                use super::*;
                # [doc = "`core class Physics2DDirectBodyState` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the collider's [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 :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; Rid :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [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 :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_object ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [doc = "Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method 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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; Variant :: from_sys (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) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_velocity_at_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , contact_idx) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's linear velocity."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current state of the space, useful for queries."] # [doc = ""] # [inline] pub fn get_space_state (& self) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } # [doc = "The body's linear velocity."] # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DDirectBodyState { } unsafe impl GodotObject for Physics2DDirectBodyState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DDirectBodyState" } } impl std :: ops :: Deref for Physics2DDirectBodyState { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DDirectBodyState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\u{0}" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\u{0}" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\u{0}" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\u{0}" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\u{0}" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\u{0}" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\u{0}" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\u{0}" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_direct_body_state::Physics2DDirectBodyState;
            
            pub mod visual_shader_node_is {
                use super::*;
                # [doc = "`core class VisualShaderNodeIs` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_is :: Function (ret) } } # [doc = "The comparison function. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeIs { } unsafe impl GodotObject for VisualShaderNodeIs { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeIs" } } impl std :: ops :: Deref for VisualShaderNodeIs { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeIs { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeIs { } impl Instanciable for VisualShaderNodeIs { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_is::VisualShaderNodeIs;
            
            pub mod camera_texture {
                use super::*;
                # [doc = "`core class CameraTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ID of the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Which image within the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_server :: FeedImage (ret) } } # [doc = "Convenience property that gives access to the active property of the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "The ID of the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , feed_id) ; } } # [doc = "Which image within the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , which_feed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraTexture { } unsafe impl GodotObject for CameraTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraTexture" } } impl std :: ops :: Deref for CameraTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for CameraTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CameraTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CameraTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for CameraTexture { } impl Instanciable for CameraTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_which_feed\u{0}" . as_ptr () as * const c_char) ; table . set_camera_active = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_active\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "set_which_feed\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::camera_texture::CameraTexture;
            
            pub mod bone_attachment {
                use super::*;
                # [doc = "`core class BoneAttachment` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BoneAttachment { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoneAttachment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: node :: Node > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: object :: Object > for BoneAttachment { } impl Instanciable for BoneAttachment { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::bone_attachment::BoneAttachment;
            
            pub mod link_button {
                use super::*;
                # [doc = "`core class LinkButton` inherits `BaseButton` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LinkButton { pub const UNDERLINE_MODE_ALWAYS : i64 = 0i64 ; pub const UNDERLINE_MODE_NEVER : i64 = 2i64 ; pub const UNDERLINE_MODE_ON_HOVER : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Determines when to show the underline. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: link_button :: UnderlineMode (ret) } } # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Determines when to show the underline. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , underline_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LinkButton { } unsafe impl GodotObject for LinkButton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LinkButton { type Target = crate :: generated :: base_button :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LinkButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for LinkButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for LinkButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LinkButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for LinkButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for LinkButton { } impl Instanciable for LinkButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_underline_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_underline_mode\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; table . set_underline_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_underline_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::link_button::LinkButton;
            
            pub mod hsplit_container {
                use super::*;
                # [doc = "`core class HSplitContainer` inherits `SplitContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HSplitContainer { type Target = crate :: generated :: split_container :: SplitContainer ; # [inline] fn deref (& self) -> & crate :: generated :: split_container :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: split_container :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: split_container :: SplitContainer > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: container :: Container > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for HSplitContainer { } impl Instanciable for HSplitContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::hsplit_container::HSplitContainer;
            
            pub mod style_box {
                use super::*;
                # [doc = "`core class StyleBox` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl StyleBox { # [doc = "Draws this stylebox using a [CanvasItem] with given [RID].\nYou can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_rect2 (method_bind , self . this . sys () . as_ptr () , canvas_item , rect) ; } } # [doc = "Returns the size of this [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment."] # [doc = ""] # [inline] pub fn get_current_item_drawn (& self) -> Option < Ref < crate :: generated :: canvas_item :: CanvasItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_current_item_drawn ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: canvas_item :: CanvasItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 [member content_margin_bottom] for extra considerations."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns the content margin offset for the specified [enum Margin].\nPositive values reduce size inwards, unlike [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 [member content_margin_bottom] for extra considerations."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , offset) ; } } # [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 :: icallptr_bool_vec2_rect2 (method_bind , self . this . sys () . as_ptr () , point , rect) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBox { } unsafe impl GodotObject for StyleBox { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBox" } } impl std :: ops :: Deref for StyleBox { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBox { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBox { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_center_size = (gd_api . godot_method_bind_get_method) (class_name , "get_center_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_default_margin\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . set_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_default_margin\u{0}" . as_ptr () as * const c_char) ; table . test_mask = (gd_api . godot_method_bind_get_method) (class_name , "test_mask\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::style_box::StyleBox;
            
            pub mod visual_shader_node_expression {
                use super::*;
                # [doc = "`core class VisualShaderNodeExpression` inherits `VisualShaderNodeGroupBase` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeExpression" } } impl std :: ops :: Deref for VisualShaderNodeExpression { type Target = crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeExpression { } impl Instanciable for VisualShaderNodeExpression { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_expression = (gd_api . godot_method_bind_get_method) (class_name , "set_expression\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_expression::VisualShaderNodeExpression;
            
            pub mod visual_shader_node_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeUniform` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl VisualShaderNodeUniform { # [doc = "Name of the uniform, by which it can be accessed through the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Name of the uniform, by which it can be accessed through the [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeUniform" } } impl std :: ops :: Deref for VisualShaderNodeUniform { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "set_uniform_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_uniform::VisualShaderNodeUniform;
            
            pub mod audio_effect_spectrum_analyzer_instance {
                use super::*;
                # [doc = "`core class AudioEffectSpectrumAnalyzerInstance` inherits `AudioEffectInstance` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 :: icallptr_vec2_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , from_hz , to_hz , mode) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectSpectrumAnalyzerInstance { } unsafe impl GodotObject for AudioEffectSpectrumAnalyzerInstance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectSpectrumAnalyzerInstance" } } impl std :: ops :: Deref for AudioEffectSpectrumAnalyzerInstance { type Target = crate :: generated :: audio_effect_instance :: AudioEffectInstance ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_instance :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectSpectrumAnalyzerInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_instance :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_instance :: AudioEffectInstance > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_spectrum_analyzer_instance::AudioEffectSpectrumAnalyzerInstance;
            
            pub mod dynamic_font {
                use super::*;
                # [doc = "`core class DynamicFont` inherits `Font` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DynamicFont { pub const SPACING_BOTTOM : i64 = 1i64 ; pub const SPACING_CHAR : i64 = 2i64 ; pub const SPACING_SPACE : i64 = 3i64 ; pub const SPACING_TOP : i64 = 0i64 ; } 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 , thread_access :: 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 :: dynamic_font_data :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . add_fallback ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the fallback font at index `idx`."] # [doc = ""] # [inline] pub fn get_fallback (& self , idx : i64) -> Option < Ref < crate :: generated :: dynamic_font_data :: DynamicFontData , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_fallback ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: dynamic_font_data :: DynamicFontData , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The font data."] # [doc = ""] # [inline] pub fn font_data (& self) -> Option < Ref < crate :: generated :: dynamic_font_data :: DynamicFontData , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_font_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: dynamic_font_data :: DynamicFontData , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Extra spacing at the top in pixels."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; ret 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 use_filter (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_use_filter ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 use_mipmaps (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_use_mipmaps ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Sets the fallback font at index `idx`."] # [doc = ""] # [inline] pub fn set_fallback (& self , idx : i64 , data : impl AsArg < crate :: generated :: dynamic_font_data :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_fallback ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , data . as_arg_ptr ()) ; } } # [doc = "The font data."] # [doc = ""] # [inline] pub fn set_font_data (& self , data : impl AsArg < crate :: generated :: dynamic_font_data :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_font_data ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Extra spacing at the top in pixels."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , value) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DynamicFont { } unsafe impl GodotObject for DynamicFont { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DynamicFont" } } impl std :: ops :: Deref for DynamicFont { type Target = crate :: generated :: font :: Font ; # [inline] fn deref (& self) -> & crate :: generated :: font :: Font { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DynamicFont { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: font :: Font { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: font :: Font > for DynamicFont { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for DynamicFont { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for DynamicFont { } unsafe impl SubClass < crate :: generated :: object :: Object > for DynamicFont { } impl Instanciable for DynamicFont { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_available_chars = (gd_api . godot_method_bind_get_method) (class_name , "get_available_chars\u{0}" . as_ptr () as * const c_char) ; table . get_fallback = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback\u{0}" . as_ptr () as * const c_char) ; table . get_fallback_count = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_count\u{0}" . as_ptr () as * const c_char) ; table . get_font_data = (gd_api . godot_method_bind_get_method) (class_name , "get_font_data\u{0}" . as_ptr () as * const c_char) ; table . get_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_color\u{0}" . as_ptr () as * const c_char) ; table . get_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_size\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_spacing = (gd_api . godot_method_bind_get_method) (class_name , "get_spacing\u{0}" . as_ptr () as * const c_char) ; table . get_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_use_filter\u{0}" . as_ptr () as * const c_char) ; table . get_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "get_use_mipmaps\u{0}" . as_ptr () as * const c_char) ; table . remove_fallback = (gd_api . godot_method_bind_get_method) (class_name , "remove_fallback\u{0}" . as_ptr () as * const c_char) ; table . set_fallback = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback\u{0}" . as_ptr () as * const c_char) ; table . set_font_data = (gd_api . godot_method_bind_get_method) (class_name , "set_font_data\u{0}" . as_ptr () as * const c_char) ; table . set_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_color\u{0}" . as_ptr () as * const c_char) ; table . set_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_size\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_spacing = (gd_api . godot_method_bind_get_method) (class_name , "set_spacing\u{0}" . as_ptr () as * const c_char) ; table . set_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_use_filter\u{0}" . as_ptr () as * const c_char) ; table . set_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "set_use_mipmaps\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::dynamic_font::DynamicFont;
            
            pub mod input_event_action {
                use super::*;
                # [doc = "`core class InputEventAction` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 precising how strongly is the joypad axis 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The action's name. Actions are accessed via this [String]."] # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [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 precising how strongly is the joypad axis 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , strength) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventAction { } unsafe impl GodotObject for InputEventAction { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventAction" } } impl std :: ops :: Deref for InputEventAction { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventAction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventAction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventAction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventAction { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventAction { } impl Instanciable for InputEventAction { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_strength\u{0}" . as_ptr () as * const c_char) ; table . set_action = (gd_api . godot_method_bind_get_method) (class_name , "set_action\u{0}" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_strength\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_action::InputEventAction;
            
            pub mod visual_shader_node_color_constant {
                use super::*;
                # [doc = "`core class VisualShaderNodeColorConstant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A [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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorConstant { } unsafe impl GodotObject for VisualShaderNodeColorConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorConstant" } } impl std :: ops :: Deref for VisualShaderNodeColorConstant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorConstant { } impl Instanciable for VisualShaderNodeColorConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_color_constant::VisualShaderNodeColorConstant;
            
            pub mod visual_shader_node_cube_map {
                use super::*;
                # [doc = "`core class VisualShaderNodeCubeMap` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeCubeMap { pub const SOURCE_PORT : i64 = 1i64 ; pub const SOURCE_TEXTURE : i64 = 0i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_DATA : i64 = 0i64 ; 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 , thread_access :: 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] texture to sample when using [constant SOURCE_TEXTURE] as [member source]."] # [doc = ""] # [inline] pub fn cube_map (& self) -> Option < Ref < crate :: generated :: cube_map :: CubeMap , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . get_cube_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: cube_map :: CubeMap , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Defines which source should be used for the sampling. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_cube_map :: Source (ret) } } # [doc = "Defines the type of data provided by the source texture. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_cube_map :: TextureType (ret) } } # [doc = "The [CubeMap] texture to sample when using [constant SOURCE_TEXTURE] as [member source]."] # [doc = ""] # [inline] pub fn set_cube_map (& self , value : impl AsArg < crate :: generated :: cube_map :: CubeMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . set_cube_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , value . as_arg_ptr ()) ; } } # [doc = "Defines which source should be used for the sampling. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Defines the type of data provided by the source texture. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCubeMap { } unsafe impl GodotObject for VisualShaderNodeCubeMap { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCubeMap" } } impl std :: ops :: Deref for VisualShaderNodeCubeMap { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCubeMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeCubeMap { } impl Instanciable for VisualShaderNodeCubeMap { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_source = (gd_api . godot_method_bind_get_method) (class_name , "get_source\u{0}" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\u{0}" . as_ptr () as * const c_char) ; table . set_cube_map = (gd_api . godot_method_bind_get_method) (class_name , "set_cube_map\u{0}" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\u{0}" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_cube_map::VisualShaderNodeCubeMap;
            
            pub mod style_box_texture {
                use super::*;
                # [doc = "`core class StyleBoxTexture` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 = "Expands the top margin of this style box when drawing, causing it to be drawn larger than requested."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: style_box_texture :: AxisStretchMode (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 [member StyleBox.content_margin_top] if it is negative."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Species a sub-region of the texture to use.\nThis is equivalent to first wrapping the texture in an [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture to use when drawing this style box."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Controls how the stylebox's texture will be stretched or tiled vertically. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: style_box_texture :: AxisStretchMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left , size_top , size_right , size_bottom) ; } } # [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_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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 [member StyleBox.content_margin_top] if it is negative."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [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 :: icallptr_void_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 [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_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] 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 :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxTexture { } unsafe impl GodotObject for StyleBoxTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxTexture" } } impl std :: ops :: Deref for StyleBoxTexture { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxTexture { } impl Instanciable for StyleBoxTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "get_margin_size\u{0}" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\u{0}" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\u{0}" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "set_margin_size\u{0}" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\u{0}" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\u{0}" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::style_box_texture::StyleBoxTexture;
            
            pub mod input_event {
                use super::*;
                # [doc = "`core class InputEvent` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl InputEvent { # [doc = "Returns `true` if the given input event and this input event can be added together (only for events of type [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 :: input_event :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . accumulate ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , with_event . as_arg_ptr ()) ; ret as _ } } # [doc = "Returns a [String] 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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]."] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this input event matches a pre-defined action of any type."] # [doc = ""] # [inline] pub fn is_action (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless `allow_echo` is `true`). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].\n# Default Arguments\n* `allow_echo` - `false`"] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString > , allow_echo : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallptr_bool_str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , allow_echo) ; ret as _ } } # [doc = "Returns `true` if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]."] # [doc = ""] # [inline] pub fn is_action_released (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action_released ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this input event is an echo event (only for events of type [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , device) ; } } # [doc = "Returns `true` if the given input event is checking for the same key ([InputEventKey]), button ([InputEventJoypadButton]) or action ([InputEventAction])."] # [doc = ""] # [inline] pub fn shortcut_match (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . shortcut_match ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; ret as _ } } # [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], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [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 :: input_event :: InputEvent , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . xformed_by ; let ret = crate :: icalls :: icallptr_obj_trans2D_vec2 (method_bind , self . this . sys () . as_ptr () , xform , local_ofs) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: input_event :: InputEvent , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEvent { } unsafe impl GodotObject for InputEvent { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEvent" } } impl std :: ops :: Deref for InputEvent { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEvent { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEvent { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEvent { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . as_text = (gd_api . godot_method_bind_get_method) (class_name , "as_text\u{0}" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\u{0}" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\u{0}" . as_ptr () as * const c_char) ; table . is_action = (gd_api . godot_method_bind_get_method) (class_name , "is_action\u{0}" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\u{0}" . as_ptr () as * const c_char) ; table . is_action_released = (gd_api . godot_method_bind_get_method) (class_name , "is_action_released\u{0}" . as_ptr () as * const c_char) ; table . is_action_type = (gd_api . godot_method_bind_get_method) (class_name , "is_action_type\u{0}" . as_ptr () as * const c_char) ; table . is_echo = (gd_api . godot_method_bind_get_method) (class_name , "is_echo\u{0}" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\u{0}" . as_ptr () as * const c_char) ; table . shortcut_match = (gd_api . godot_method_bind_get_method) (class_name , "shortcut_match\u{0}" . as_ptr () as * const c_char) ; table . xformed_by = (gd_api . godot_method_bind_get_method) (class_name , "xformed_by\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event::InputEvent;
            
            pub mod rigid_body {
                use super::*;
                # [doc = "`core class RigidBody` inherits `PhysicsBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RigidBody { pub const MODE_CHARACTER : i64 = 2i64 ; pub const MODE_KINEMATIC : i64 = 3i64 ; pub const MODE_RIGID : i64 = 0i64 ; pub const MODE_STATIC : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Damps RigidBody's rotational forces."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "RigidBody's rotational velocity."] # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Lock the body's movement in the Z axis."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; ret as _ } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member 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 [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_basis (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's linear velocity. 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 [method _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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum number of contacts that will be recorded. Requires [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: rigid_body :: Mode (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 :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the RigidBody will emit signals when it collides with another RigidBody. See also [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method apply_impulse] or [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [method _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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Damps RigidBody's rotational forces."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [doc = "RigidBody's rotational velocity."] # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , angular_velocity) ; } } # [doc = "Lock the body's movement in the Z 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , axis , lock) ; } } # [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 :: icallptr_void_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 [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , able_to_sleep) ; } } # [doc = "If `true`, the RigidBody will emit signals when it collides with another RigidBody. See also [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The body's friction, from 0 (frictionless) to 1 (max friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale) ; } } # [doc = "The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [doc = "The body's linear velocity. 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 [method _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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [doc = "The maximum number of contacts that will be recorded. Requires [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The body mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_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 [method apply_impulse] or [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , sleeping) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , weight) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RigidBody { } unsafe impl GodotObject for RigidBody { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RigidBody { type Target = crate :: generated :: physics_body :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RigidBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for RigidBody { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for RigidBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RigidBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for RigidBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for RigidBody { } impl Instanciable for RigidBody { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\u{0}" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\u{0}" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\u{0}" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\u{0}" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_lock\u{0}" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\u{0}" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{0}" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\u{0}" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\u{0}" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{0}" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\u{0}" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{0}" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\u{0}" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::rigid_body::RigidBody;
            
            pub mod animation_node_blend_3 {
                use super::*;
                # [doc = "`core class AnimationNodeBlend3` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend3 { } unsafe impl GodotObject for AnimationNodeBlend3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend3" } } impl std :: ops :: Deref for AnimationNodeBlend3 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlend3 { } impl Instanciable for AnimationNodeBlend3 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_blend_3::AnimationNodeBlend3;
            
            pub mod visual_shader_node_vector_scalar_smooth_step {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarSmoothStep { } impl Instanciable for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_scalar_smooth_step::VisualShaderNodeVectorScalarSmoothStep;
            
            pub mod directory {
                use super::*;
                # [doc = "`core class Directory` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , todir . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 [enum Error] 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns whether the current item processed with the last [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the currently opened directory's drive index. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`). On other platforms, or if the requested drive does not existed, 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "On Windows, returns the number of drives (partitions) mounted on the current filesystem. On 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next element (file or directory) in the current directory (including `.` and `..`, unless `skip_navigational` was given to [method 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. [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method 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 :: icallptr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , skip_navigational , skip_hidden) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not 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 :: icallptr_void (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 [method make_dir_recursive]).\nReturns one of the [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.\nReturns one of the [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "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.\nReturns one of the [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Renames (move) 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 [enum Error] 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Directory { } unsafe impl GodotObject for Directory { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Directory" } } impl std :: ops :: Deref for Directory { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Directory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Directory { } unsafe impl SubClass < crate :: generated :: object :: Object > for Directory { } impl Instanciable for Directory { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\u{0}" . as_ptr () as * const c_char) ; table . current_is_dir = (gd_api . godot_method_bind_get_method) (class_name , "current_is_dir\u{0}" . as_ptr () as * const c_char) ; table . dir_exists = (gd_api . godot_method_bind_get_method) (class_name , "dir_exists\u{0}" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\u{0}" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\u{0}" . as_ptr () as * const c_char) ; table . get_current_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_current_drive\u{0}" . as_ptr () as * const c_char) ; table . get_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_drive\u{0}" . as_ptr () as * const c_char) ; table . get_drive_count = (gd_api . godot_method_bind_get_method) (class_name , "get_drive_count\u{0}" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\u{0}" . as_ptr () as * const c_char) ; table . get_space_left = (gd_api . godot_method_bind_get_method) (class_name , "get_space_left\u{0}" . as_ptr () as * const c_char) ; table . list_dir_begin = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_begin\u{0}" . as_ptr () as * const c_char) ; table . list_dir_end = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_end\u{0}" . as_ptr () as * const c_char) ; table . make_dir = (gd_api . godot_method_bind_get_method) (class_name , "make_dir\u{0}" . as_ptr () as * const c_char) ; table . make_dir_recursive = (gd_api . godot_method_bind_get_method) (class_name , "make_dir_recursive\u{0}" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\u{0}" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\u{0}" . as_ptr () as * const c_char) ; table . rename = (gd_api . godot_method_bind_get_method) (class_name , "rename\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::directory::Directory;
            
            pub mod texture {
                use super::*;
                # [doc = "`core class Texture` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Texture { pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const FLAG_VIDEO_SURFACE : i64 = 2048i64 ; } impl Texture { # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified `position`. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at `position` and the size of this [Texture].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw (& self , canvas_item : Rid , position : Vector2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_rid_vec2_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , position , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_rect (& self , canvas_item : Rid , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect ; let ret = crate :: icalls :: icallptr_void_rid_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , tile , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method 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 = ""] # [inline] pub fn draw_rect_region (& self , canvas_item : Rid , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect_region ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , src_rect , modulate , transpose , normal_map . as_arg_ptr () , clip_uv) ; } } # [doc = "Returns an [Image] that is a copy of data from this [Texture]. [Image]s can be accessed and manipulated directly."] # [doc = ""] # [inline] pub fn get_data (& self) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture { } unsafe impl GodotObject for Texture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture" } } impl std :: ops :: Deref for Texture { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Texture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Texture { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\u{0}" . as_ptr () as * const c_char) ; table . draw_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect_region\u{0}" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\u{0}" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . has_alpha = (gd_api . godot_method_bind_get_method) (class_name , "has_alpha\u{0}" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::texture::Texture;
            
            pub mod animated_sprite_3d {
                use super::*;
                # [doc = "`core class AnimatedSprite3D` inherits `SpriteBase3D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: sprite_frames :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite3D { } unsafe impl GodotObject for AnimatedSprite3D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimatedSprite3D { type Target = crate :: generated :: sprite_base_3d :: SpriteBase3D ; # [inline] fn deref (& self) -> & crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sprite_base_3d :: SpriteBase3D > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedSprite3D { } impl Instanciable for AnimatedSprite3D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\u{0}" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\u{0}" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\u{0}" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animated_sprite_3d::AnimatedSprite3D;
            
            pub mod gi_probe_data {
                use super::*;
                # [doc = "`core class GIProbeData` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn dynamic_data (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_dynamic_data ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cell_size) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , compress) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dynamic_data (& self , dynamic_data : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_dynamic_data ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , dynamic_range) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , interior) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , propagation) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GIProbeData" } } impl std :: ops :: Deref for GIProbeData { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GIProbeData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for GIProbeData { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GIProbeData { } unsafe impl SubClass < crate :: generated :: object :: Object > for GIProbeData { } impl Instanciable for GIProbeData { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\u{0}" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\u{0}" . as_ptr () as * const c_char) ; table . get_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_data\u{0}" . as_ptr () as * const c_char) ; table . get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_range\u{0}" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\u{0}" . as_ptr () as * const c_char) ; table . get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_bias\u{0}" . as_ptr () as * const c_char) ; table . get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_propagation\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\u{0}" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\u{0}" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\u{0}" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\u{0}" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\u{0}" . as_ptr () as * const c_char) ; table . set_compress = (gd_api . godot_method_bind_get_method) (class_name , "set_compress\u{0}" . as_ptr () as * const c_char) ; table . set_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_data\u{0}" . as_ptr () as * const c_char) ; table . set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_range\u{0}" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\u{0}" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\u{0}" . as_ptr () as * const c_char) ; table . set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_bias\u{0}" . as_ptr () as * const c_char) ; table . set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_propagation\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gi_probe_data::GIProbeData;
            
            pub mod gdnative_ {
                use super::*;
                # [doc = "`core class GDNative` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_var_str_str_arr (method_bind , self . this . sys () . as_ptr () , calling_type . into () , procedure_name . into () , arguments) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: gdnative_library :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for GDNative { } unsafe impl GodotObject for GDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDNative" } } impl std :: ops :: Deref for GDNative { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDNative { } impl Instanciable for GDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\u{0}" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\u{0}" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\u{0}" . as_ptr () as * const c_char) ; table . terminate = (gd_api . godot_method_bind_get_method) (class_name , "terminate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gdnative_::GDNative;
            
            pub mod arvr_camera {
                use super::*;
                # [doc = "`core class ARVRCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVRCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRCamera { } impl Instanciable for ARVRCamera { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::arvr_camera::ARVRCamera;
            
            pub mod animated_sprite {
                use super::*;
                # [doc = "`core class AnimatedSprite` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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` 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 = AnimatedSpriteMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , backwards) ; } } # [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 = AnimatedSpriteMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed_scale) ; } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: sprite_frames :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite { } unsafe impl GodotObject for AnimatedSprite { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimatedSprite { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedSprite { } impl Instanciable for AnimatedSprite { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\u{0}" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\u{0}" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\u{0}" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\u{0}" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\u{0}" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\u{0}" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\u{0}" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animated_sprite::AnimatedSprite;
            
            pub mod node_2d {
                use super::*;
                # [doc = "`core class Node2D` inherits `CanvasItem` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Returns the angle between the node and the `point` in radians."] # [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 :: icallptr_f64_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] relative to this node's parent."] # [doc = ""] # [inline] pub fn get_relative_transform_to_parent (& self , parent : impl AsArg < crate :: generated :: node :: Node >) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_relative_transform_to_parent ; let ret = crate :: icalls :: icallptr_trans2D_obj (method_bind , self . this . sys () . as_ptr () , parent . as_arg_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node's scale. Unscaled value: `(1, 1)`."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Applies a local translation on the node's X axis based on the [method 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 :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , delta , scaled) ; } } # [doc = "Applies a local translation on the node's Y axis based on the [method 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 :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , delta , scaled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Global [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The node's scale. Unscaled value: `(1, 1)`."] # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z_index) ; } } # [doc = "Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , local_point) ; mem :: transmute (ret) } } # [doc = "Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , global_point) ; mem :: transmute (ret) } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Node2D { } unsafe impl GodotObject for Node2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Node2D { type Target = crate :: generated :: canvas_item :: CanvasItem ; # [inline] fn deref (& self) -> & crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Node2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Node2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Node2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Node2D { } impl Instanciable for Node2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_angle_to = (gd_api . godot_method_bind_get_method) (class_name , "get_angle_to\u{0}" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\u{0}" . as_ptr () as * const c_char) ; table . get_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_global_scale\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\u{0}" . as_ptr () as * const c_char) ; table . get_z_index = (gd_api . godot_method_bind_get_method) (class_name , "get_z_index\u{0}" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\u{0}" . as_ptr () as * const c_char) ; table . is_z_relative = (gd_api . godot_method_bind_get_method) (class_name , "is_z_relative\u{0}" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\u{0}" . as_ptr () as * const c_char) ; table . move_local_x = (gd_api . godot_method_bind_get_method) (class_name , "move_local_x\u{0}" . as_ptr () as * const c_char) ; table . move_local_y = (gd_api . godot_method_bind_get_method) (class_name , "move_local_y\u{0}" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\u{0}" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\u{0}" . as_ptr () as * const c_char) ; table . set_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_global_scale\u{0}" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\u{0}" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\u{0}" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "set_z_index\u{0}" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\u{0}" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\u{0}" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::node_2d::Node2D;
            
            pub mod visual_script_scene_node {
                use super::*;
                # [doc = "`core class VisualScriptSceneNode` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneNode" } } impl std :: ops :: Deref for VisualScriptSceneNode { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSceneNode { } impl Instanciable for VisualScriptSceneNode { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_node_path = (gd_api . godot_method_bind_get_method) (class_name , "set_node_path\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_scene_node::VisualScriptSceneNode;
            
            pub mod java_class_wrapper {
                use super::*;
                # [doc = "`core singleton class JavaClassWrapper` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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 :: java_class :: JavaClass , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaClassWrapperMethodTable :: get (get_api ()) . wrap ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: java_class :: JavaClass , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaClassWrapper { } unsafe impl GodotObject for JavaClassWrapper { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JavaClassWrapper" } } impl std :: ops :: Deref for JavaClassWrapper { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaClassWrapper { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::java_class_wrapper::JavaClassWrapper;
            
            pub mod polygon_path_finder {
                use super::*;
                # [doc = "`core class PolygonPathFinder` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . find_path ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_intersections (& self , from : Vector2 , to : Vector2) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_intersections ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , idx , penalty) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn setup (& self , points : Vector2Array , connections : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PolygonPathFinder" } } impl std :: ops :: Deref for PolygonPathFinder { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PolygonPathFinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: object :: Object > for PolygonPathFinder { } impl Instanciable for PolygonPathFinder { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\u{0}" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{0}" . as_ptr () as * const c_char) ; table . get_intersections = (gd_api . godot_method_bind_get_method) (class_name , "get_intersections\u{0}" . as_ptr () as * const c_char) ; table . get_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "get_point_penalty\u{0}" . as_ptr () as * const c_char) ; table . is_point_inside = (gd_api . godot_method_bind_get_method) (class_name , "is_point_inside\u{0}" . as_ptr () as * const c_char) ; table . set_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "set_point_penalty\u{0}" . as_ptr () as * const c_char) ; table . setup = (gd_api . godot_method_bind_get_method) (class_name , "setup\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::polygon_path_finder::PolygonPathFinder;
            
            pub mod arvr_origin {
                use super::*;
                # [doc = "`core class ARVROrigin` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , world_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVROrigin { } unsafe impl GodotObject for ARVROrigin { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVROrigin { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVROrigin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVROrigin { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVROrigin { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVROrigin { } impl Instanciable for ARVROrigin { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_origin::ARVROrigin;
            
            pub mod text_file {
                use super::*;
                # [doc = "`core class TextFile` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextFile" } } impl std :: ops :: Deref for TextFile { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TextFile { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TextFile { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextFile { } impl Instanciable for TextFile { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::text_file::TextFile;
            
            pub mod rigid_body_2d {
                use super::*;
                # [doc = "`core class RigidBody2D` inherits `PhysicsBody2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RigidBody2D { pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const MODE_CHARACTER : i64 = 2i64 ; pub const MODE_KINEMATIC : i64 = 3i64 ; pub const MODE_RIGID : i64 = 0i64 ; pub const MODE_STATIC : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Damps the body's [member angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: rigid_body_2d :: CcdMode (ret) } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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]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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 inertia (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_inertia ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Damps the body's [member linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's linear velocity."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum number of contacts that will be recorded. Requires [member 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 = RigidBody2DMethodTable :: get (get_api ()) . get_max_contacts_reported ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's mode. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: rigid_body_2d :: Mode (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 :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method apply_impulse] or [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [method _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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Damps the body's [member angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [doc = "The body's rotational velocity."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_velocity) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [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 :: icallptr_void_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 [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , able_to_sleep) ; } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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]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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , inertia) ; } } # [doc = "Damps the body's [member linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [doc = "The body's linear velocity."] # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [doc = "The maximum number of contacts that will be recorded. Requires [member 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 = RigidBody2DMethodTable :: get (get_api ()) . set_max_contacts_reported ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The body's mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_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 [method apply_impulse] or [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , sleeping) ; } } # [doc = "If `true`, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , weight) ; } } # [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], 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 :: physics_2d_test_motion_result :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . test_motion ; let ret = crate :: icalls :: icallptr_bool_vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , motion , infinite_inertia , margin , result . as_arg_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for RigidBody2D { } unsafe impl GodotObject for RigidBody2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RigidBody2D { type Target = crate :: generated :: physics_body_2d :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RigidBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body_2d :: PhysicsBody2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RigidBody2D { } impl Instanciable for RigidBody2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\u{0}" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\u{0}" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\u{0}" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\u{0}" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\u{0}" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_force\u{0}" . as_ptr () as * const c_char) ; table . get_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_torque\u{0}" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\u{0}" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{0}" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\u{0}" . as_ptr () as * const c_char) ; table . get_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inertia\u{0}" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\u{0}" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_force\u{0}" . as_ptr () as * const c_char) ; table . set_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_torque\u{0}" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{0}" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\u{0}" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{0}" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\u{0}" . as_ptr () as * const c_char) ; table . set_inertia = (gd_api . godot_method_bind_get_method) (class_name , "set_inertia\u{0}" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\u{0}" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\u{0}" . as_ptr () as * const c_char) ; table . test_motion = (gd_api . godot_method_bind_get_method) (class_name , "test_motion\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::rigid_body_2d::RigidBody2D;
            
            pub mod csg_combiner {
                use super::*;
                # [doc = "`core class CSGCombiner` inherits `CSGShape` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGCombiner { type Target = crate :: generated :: csg_shape :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCombiner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGCombiner { } impl Instanciable for CSGCombiner { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::csg_combiner::CSGCombiner;
            
            pub mod color_picker {
                use super::*;
                # [doc = "`core class ColorPicker` inherits `BoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [i]this[/i] 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 :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the list of colors in the presets of the color picker."] # [doc = ""] # [inline] pub fn get_presets (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . get_presets ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, shows an alpha channel slider (transparency)."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, shows an alpha channel slider (transparency)."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorPicker { } unsafe impl GodotObject for ColorPicker { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ColorPicker { type Target = crate :: generated :: box_container :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorPicker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for ColorPicker { } unsafe impl SubClass < crate :: generated :: container :: Container > for ColorPicker { } unsafe impl SubClass < crate :: generated :: control :: Control > for ColorPicker { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ColorPicker { } unsafe impl SubClass < crate :: generated :: node :: Node > for ColorPicker { } unsafe impl SubClass < crate :: generated :: object :: Object > for ColorPicker { } impl Instanciable for ColorPicker { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . are_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_enabled\u{0}" . as_ptr () as * const c_char) ; table . are_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_visible\u{0}" . as_ptr () as * const c_char) ; table . erase_preset = (gd_api . godot_method_bind_get_method) (class_name , "erase_preset\u{0}" . as_ptr () as * const c_char) ; table . get_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "get_pick_color\u{0}" . as_ptr () as * const c_char) ; table . get_presets = (gd_api . godot_method_bind_get_method) (class_name , "get_presets\u{0}" . as_ptr () as * const c_char) ; table . is_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_deferred_mode\u{0}" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\u{0}" . as_ptr () as * const c_char) ; table . is_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_hsv_mode\u{0}" . as_ptr () as * const c_char) ; table . is_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_raw_mode\u{0}" . as_ptr () as * const c_char) ; table . set_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred_mode\u{0}" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\u{0}" . as_ptr () as * const c_char) ; table . set_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_hsv_mode\u{0}" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\u{0}" . as_ptr () as * const c_char) ; table . set_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_visible\u{0}" . as_ptr () as * const c_char) ; table . set_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_raw_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::color_picker::ColorPicker;
            
            pub mod stream_peer {
                use super::*;
                # [doc = "`core class StreamPeer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of bytes this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) ; < 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a 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 [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "If `true`, this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_data ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 : ByteArray) -> 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.\nNote: To put an ASCII string without prepending its size, you can use [method 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [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.\nNote: To put an UTF-8 string without prepending its size, you can use [method 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 :: icallptr_void_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 :: icallptr_void_var_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , full_objects) ; } } # [doc = "If `true`, this [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeer { } unsafe impl GodotObject for StreamPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeer" } } impl std :: ops :: Deref for StreamPeer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeer { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_32 = (gd_api . godot_method_bind_get_method) (class_name , "get_32\u{0}" . as_ptr () as * const c_char) ; table . get_64 = (gd_api . godot_method_bind_get_method) (class_name , "get_64\u{0}" . as_ptr () as * const c_char) ; table . get_8 = (gd_api . godot_method_bind_get_method) (class_name , "get_8\u{0}" . as_ptr () as * const c_char) ; table . get_available_bytes = (gd_api . godot_method_bind_get_method) (class_name , "get_available_bytes\u{0}" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\u{0}" . as_ptr () as * const c_char) ; table . get_double = (gd_api . godot_method_bind_get_method) (class_name , "get_double\u{0}" . as_ptr () as * const c_char) ; table . get_float = (gd_api . godot_method_bind_get_method) (class_name , "get_float\u{0}" . as_ptr () as * const c_char) ; table . get_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "get_partial_data\u{0}" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\u{0}" . as_ptr () as * const c_char) ; table . get_u16 = (gd_api . godot_method_bind_get_method) (class_name , "get_u16\u{0}" . as_ptr () as * const c_char) ; table . get_u32 = (gd_api . godot_method_bind_get_method) (class_name , "get_u32\u{0}" . as_ptr () as * const c_char) ; table . get_u64 = (gd_api . godot_method_bind_get_method) (class_name , "get_u64\u{0}" . as_ptr () as * const c_char) ; table . get_u8 = (gd_api . godot_method_bind_get_method) (class_name , "get_u8\u{0}" . as_ptr () as * const c_char) ; table . get_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "get_utf8_string\u{0}" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\u{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\u{0}" . as_ptr () as * const c_char) ; table . put_16 = (gd_api . godot_method_bind_get_method) (class_name , "put_16\u{0}" . as_ptr () as * const c_char) ; table . put_32 = (gd_api . godot_method_bind_get_method) (class_name , "put_32\u{0}" . as_ptr () as * const c_char) ; table . put_64 = (gd_api . godot_method_bind_get_method) (class_name , "put_64\u{0}" . as_ptr () as * const c_char) ; table . put_8 = (gd_api . godot_method_bind_get_method) (class_name , "put_8\u{0}" . as_ptr () as * const c_char) ; table . put_data = (gd_api . godot_method_bind_get_method) (class_name , "put_data\u{0}" . as_ptr () as * const c_char) ; table . put_double = (gd_api . godot_method_bind_get_method) (class_name , "put_double\u{0}" . as_ptr () as * const c_char) ; table . put_float = (gd_api . godot_method_bind_get_method) (class_name , "put_float\u{0}" . as_ptr () as * const c_char) ; table . put_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "put_partial_data\u{0}" . as_ptr () as * const c_char) ; table . put_string = (gd_api . godot_method_bind_get_method) (class_name , "put_string\u{0}" . as_ptr () as * const c_char) ; table . put_u16 = (gd_api . godot_method_bind_get_method) (class_name , "put_u16\u{0}" . as_ptr () as * const c_char) ; table . put_u32 = (gd_api . godot_method_bind_get_method) (class_name , "put_u32\u{0}" . as_ptr () as * const c_char) ; table . put_u64 = (gd_api . godot_method_bind_get_method) (class_name , "put_u64\u{0}" . as_ptr () as * const c_char) ; table . put_u8 = (gd_api . godot_method_bind_get_method) (class_name , "put_u8\u{0}" . as_ptr () as * const c_char) ; table . put_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "put_utf8_string\u{0}" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\u{0}" . as_ptr () as * const c_char) ; table . set_big_endian = (gd_api . godot_method_bind_get_method) (class_name , "set_big_endian\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::stream_peer::StreamPeer;
            
            pub mod geometry {
                use super::*;
                # [doc = "`core singleton class Geometry` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Geometry { pub const END_BUTT : i64 = 2i64 ; pub const END_JOINED : i64 = 1i64 ; pub const END_POLYGON : i64 = 0i64 ; pub const END_ROUND : i64 = 4i64 ; pub const END_SQUARE : i64 = 3i64 ; pub const JOIN_MITER : i64 = 2i64 ; pub const JOIN_ROUND : i64 = 1i64 ; pub const JOIN_SQUARE : i64 = 0i64 ; pub const OPERATION_DIFFERENCE : i64 = 1i64 ; pub const OPERATION_INTERSECTION : i64 = 2i64 ; pub const OPERATION_UNION : i64 = 0i64 ; pub const OPERATION_XOR : i64 = 3i64 ; } 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\u{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]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]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 , height , sides , lats , axis) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of [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 , height , sides , axis) ; < 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 : Vector3Array , plane : Plane) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . clip_polygon ; let ret = crate :: icalls :: icallptr_vec3arr_vec3arr_plane (method_bind , self . this . sys () . as_ptr () , points , plane) ; Vector3Array :: from_sys (ret) } } # [doc = "Clips `polygon_a` against `polygon_b` and returns an array of clipped polygons. This performs [constant 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 distiguished by calling [method is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn clip_polygons_2d (& self , polygon_a : Vector2Array , polygon_b : Vector2Array) -> 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 [constant 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 : Vector2Array , polygon : Vector2Array) -> 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]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 : Vector2Array) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . convex_hull_2d ; let ret = crate :: icalls :: icallptr_vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; Vector2Array :: from_sys (ret) } } # [doc = "Mutually excludes common area defined by intersection of `polygon_a` and `polygon_b` (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant 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 distiguished by calling [method is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn exclude_polygons_2d (& self , polygon_a : Vector2Array , polygon_b : Vector2Array) -> 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 :: icallptr_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; mem :: transmute (ret) } } # [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] 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_points_between_segments ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , p1 , p2 , q1 , q2) ; Vector3Array :: from_sys (ret) } } # [doc = "Given the two 2D segments (`p1`, `p2`) and (`q1`, `q2`), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on (`p1`, `p2`) as well the accompanying point on (`q1`, `q2`)."] # [doc = ""] # [inline] pub fn get_closest_points_between_segments_2d (& self , p1 : Vector2 , q1 : Vector2 , p2 : Vector2 , q2 : Vector2) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_points_between_segments_2d ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , p1 , q1 , p2 , q2) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_i64_vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; ret as _ } } # [doc = "Intersects `polygon_a` with `polygon_b` and returns an array of intersected polygons. This performs [constant 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 [method is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn intersect_polygons_2d (& self , polygon_a : Vector2Array , polygon_b : Vector2Array) -> 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 [constant 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 : Vector2Array , polygon : Vector2Array) -> 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 [i]on[/i] 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 :: icallptr_bool_vec2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , point , circle_position , circle_radius) ; ret as _ } } # [doc = "Returns `true` if `point` is inside `polygon` or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns `false`."] # [doc = ""] # [inline] pub fn is_point_in_polygon (& self , point : Vector2 , polygon : Vector2Array) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . is_point_in_polygon ; let ret = crate :: icalls :: icallptr_bool_vec2_vec2arr (method_bind , self . this . sys () . as_ptr () , point , polygon) ; ret as _ } } # [doc = "Returns `true` if `polygon`'s vertices are ordered in clockwise order, otherwise returns `false`."] # [doc = ""] # [inline] pub fn is_polygon_clockwise (& self , polygon : Vector2Array) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . is_polygon_clockwise ; let ret = crate :: icalls :: icallptr_bool_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; ret as _ } } # [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]. If no intersection takes place, returns an empty [Variant].\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 :: icallptr_var_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from_a , dir_a , from_b , dir_b) ; Variant :: from_sys (ret) } } # [doc = "Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: `points` is a vector of [Vector2] that specifies the positions of each tile, `size` contains the overall size of the whole atlas as [Vector2]."] # [doc = ""] # [inline] pub fn make_atlas (& self , sizes : Vector2Array) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . make_atlas ; let ret = crate :: icalls :: icallptr_dict_vec2arr (method_bind , self . this . sys () . as_ptr () , sizes) ; Dictionary :: from_sys (ret) } } # [doc = "Merges (combines) `polygon_a` and `polygon_b` and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons.\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn merge_polygons_2d (& self , polygon_a : Vector2Array , polygon_b : Vector2Array) -> 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 [enum PolyJoinType].\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].\n**Note:** To translate the polygon's vertices specifically, use the [method 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 : Vector2Array , 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 , join_type) ; < 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 [enum PolyJoinType].\nEach polygon's endpoints will be rounded as determined by `end_type`, see [enum PolyEndType].\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].\n# Default Arguments\n* `join_type` - `0`\n* `end_type` - `3`"] # [doc = ""] # [inline] pub fn offset_polyline_2d (& self , polyline : Vector2Array , 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 , join_type , end_type) ; < 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 :: icallptr_bool_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , a , b , c) ; ret as _ } } # [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]. If no intersection takes place, an empty [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 :: icallptr_var_vec3_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , from , dir , a , b , c) ; Variant :: from_sys (ret) } } # [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 :: icallptr_f64_vec2_vec2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , segment_from , segment_to , circle_position , circle_radius) ; ret as _ } } # [doc = "Given a convex hull defined though the [Plane]s in the array `planes`, tests if the segment (`from`, `to`) intersects with that hull. If an intersection is found, returns a [PoolVector3Array] 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_convex ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_arr (method_bind , self . this . sys () . as_ptr () , from , to , planes) ; Vector3Array :: from_sys (ret) } } # [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]. 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_cylinder ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_f64_f64 (method_bind , self . this . sys () . as_ptr () , from , to , height , radius) ; Vector3Array :: from_sys (ret) } } # [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]. If no intersection takes place, returns an empty [Variant]."] # [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 :: icallptr_var_vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from_a , to_a , from_b , to_b) ; Variant :: from_sys (ret) } } # [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]. If yes, returns a [PoolVector3Array] 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_sphere ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_vec3_f64 (method_bind , self . this . sys () . as_ptr () , from , to , sphere_position , sphere_radius) ; Vector3Array :: from_sys (ret) } } # [doc = "Tests if the segment (`from`, `to`) intersects the triangle `a`, `b`, `c`. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [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 :: icallptr_var_vec3_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , from , to , a , b , c) ; Variant :: from_sys (ret) } } # [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] 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] is returned."] # [doc = ""] # [inline] pub fn triangulate_delaunay_2d (& self , points : Vector2Array) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . triangulate_delaunay_2d ; let ret = crate :: icalls :: icallptr_i32arr_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; Int32Array :: from_sys (ret) } } # [doc = "Triangulates the polygon specified by the points in `polygon`. Returns a [PoolIntArray] 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). If the triangulation did not succeed, an empty [PoolIntArray] is returned."] # [doc = ""] # [inline] pub fn triangulate_polygon (& self , polygon : Vector2Array) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . triangulate_polygon ; let ret = crate :: icalls :: icallptr_i32arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; Int32Array :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Geometry { } unsafe impl GodotObject for Geometry { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Geometry" } } impl std :: ops :: Deref for Geometry { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Geometry { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . build_capsule_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_capsule_planes\u{0}" . as_ptr () as * const c_char) ; table . build_cylinder_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_cylinder_planes\u{0}" . as_ptr () as * const c_char) ; table . clip_polygon = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygon\u{0}" . as_ptr () as * const c_char) ; table . clip_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygons_2d\u{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\u{0}" . as_ptr () as * const c_char) ; table . convex_hull_2d = (gd_api . godot_method_bind_get_method) (class_name , "convex_hull_2d\u{0}" . as_ptr () as * const c_char) ; table . exclude_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "exclude_polygons_2d\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . intersect_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "intersect_polygons_2d\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_polygon_clockwise = (gd_api . godot_method_bind_get_method) (class_name , "is_polygon_clockwise\u{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\u{0}" . as_ptr () as * const c_char) ; table . make_atlas = (gd_api . godot_method_bind_get_method) (class_name , "make_atlas\u{0}" . as_ptr () as * const c_char) ; table . merge_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "merge_polygons_2d\u{0}" . as_ptr () as * const c_char) ; table . offset_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polygon_2d\u{0}" . as_ptr () as * const c_char) ; table . offset_polyline_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polyline_2d\u{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\u{0}" . as_ptr () as * const c_char) ; table . ray_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "ray_intersects_triangle\u{0}" . as_ptr () as * const c_char) ; table . segment_intersects_circle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_circle\u{0}" . as_ptr () as * const c_char) ; table . segment_intersects_convex = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_convex\u{0}" . as_ptr () as * const c_char) ; table . segment_intersects_cylinder = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_cylinder\u{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\u{0}" . as_ptr () as * const c_char) ; table . segment_intersects_sphere = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_sphere\u{0}" . as_ptr () as * const c_char) ; table . segment_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_triangle\u{0}" . as_ptr () as * const c_char) ; table . triangulate_delaunay_2d = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_delaunay_2d\u{0}" . as_ptr () as * const c_char) ; table . triangulate_polygon = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::geometry::Geometry;
            
            pub mod item_list {
                use super::*;
                # [doc = "`core class ItemList` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ItemList { pub const ICON_MODE_LEFT : i64 = 1i64 ; pub const ICON_MODE_TOP : i64 = 0i64 ; pub const SELECT_MULTI : i64 = 1i64 ; pub const SELECT_SINGLE : i64 = 0i64 ; } 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 , thread_access :: 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 :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_icon_item ; let ret = crate :: icalls :: icallptr_void_obj_bool (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr () , selectable) ; } } # [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 :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_item ; let ret = crate :: icalls :: icallptr_void_str_obj_bool (method_bind , self . this . sys () . as_ptr () , text . into () , icon . as_arg_ptr () , selectable) ; } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The icon position, whether above or to the left of the text. See the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: item_list :: IconMode (ret) } } # [doc = "The scale of icon applied after [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , exact) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the icon associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_icon (& self , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Allows single or multiple item selection. See the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: item_list :: SelectMode (ret) } } # [doc = "Returns an array with the indexes of the selected items."] # [doc = ""] # [inline] pub fn get_selected_items (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_selected_items ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the [Object] ID associated with the list."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret 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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_idx , to_idx) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , single) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The icon position, whether above or to the left of the text. See the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The scale of icon applied after [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the background color of the item specified by `idx` index to the specified [Color].\n```gdscript\nvar some_string = \"Some text\"\nsome_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.\n```"] # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , custom_bg_color) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the foreground color of the item specified by `idx` index to the specified [Color].\n```gdscript\nvar some_string = \"Some text\"\nsome_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red.\n```"] # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , disabled) ; } } # [doc = "Sets (or replaces) the icon's [Texture] associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , icon . as_arg_ptr ()) ; } } # [doc = "Sets a modulating [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , transposed) ; } } # [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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , selectable) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , lines) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Allows single or multiple item selection. See the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ItemList { } unsafe impl GodotObject for ItemList { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ItemList { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ItemList { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ItemList { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ItemList { } unsafe impl SubClass < crate :: generated :: node :: Node > for ItemList { } unsafe impl SubClass < crate :: generated :: object :: Object > for ItemList { } impl Instanciable for ItemList { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_reselect\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_mode\u{0}" . as_ptr () as * const c_char) ; table . get_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\u{0}" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\u{0}" . as_ptr () as * const c_char) ; table . get_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_max_columns\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_select_mode\u{0}" . as_ptr () as * const c_char) ; table . get_selected_items = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_items\u{0}" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\u{0}" . as_ptr () as * const c_char) ; table . has_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "has_auto_height\u{0}" . as_ptr () as * const c_char) ; table . is_anything_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_anything_selected\u{0}" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_selectable\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\u{0}" . as_ptr () as * const c_char) ; table . move_item = (gd_api . godot_method_bind_get_method) (class_name , "move_item\u{0}" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\u{0}" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\u{0}" . as_ptr () as * const c_char) ; table . set_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_reselect\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_height\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_mode\u{0}" . as_ptr () as * const c_char) ; table . set_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_scale\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\u{0}" . as_ptr () as * const c_char) ; table . set_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "set_item_selectable\u{0}" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\u{0}" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_max_columns\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_select_mode\u{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\u{0}" . as_ptr () as * const c_char) ; table . unselect = (gd_api . godot_method_bind_get_method) (class_name , "unselect\u{0}" . as_ptr () as * const c_char) ; table . unselect_all = (gd_api . godot_method_bind_get_method) (class_name , "unselect_all\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::item_list::ItemList;
            
            pub mod main_loop {
                use super::*;
                # [doc = "`core class MainLoop` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MainLoop { pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; 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_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; } 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 , thread_access :: 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 [method _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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _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 :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } # [doc = "Should not be called manually, override [method _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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_event (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_event ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Should not be called manually, override [method _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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Should not be called manually, override [method _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 :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for MainLoop { } unsafe impl GodotObject for MainLoop { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MainLoop" } } impl std :: ops :: Deref for MainLoop { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MainLoop { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for MainLoop { } impl Instanciable for MainLoop { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . idle = (gd_api . godot_method_bind_get_method) (class_name , "idle\u{0}" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\u{0}" . as_ptr () as * const c_char) ; table . input_event = (gd_api . godot_method_bind_get_method) (class_name , "input_event\u{0}" . as_ptr () as * const c_char) ; table . input_text = (gd_api . godot_method_bind_get_method) (class_name , "input_text\u{0}" . as_ptr () as * const c_char) ; table . iteration = (gd_api . godot_method_bind_get_method) (class_name , "iteration\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::main_loop::MainLoop;
            
            pub mod joint_2d {
                use super::*;
                # [doc = "`core class Joint2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl Joint2D { # [doc = "When [member node_a] and [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, [member node_a] and [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The first body attached to the joint. Must derive from [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The second body attached to the joint. Must derive from [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "When [member node_a] and [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [doc = "If `true`, [member node_a] and [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The first body attached to the joint. Must derive from [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 :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The second body attached to the joint. Must derive from [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Joint2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Joint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Joint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Joint2D { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\u{0}" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\u{0}" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\u{0}" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::joint_2d::Joint2D;
            
            pub mod visual_shader_node_cube_map_uniform {
                use super::*;
                # [doc = "`core class VisualShaderNodeCubeMapUniform` inherits `VisualShaderNodeTextureUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCubeMapUniform" } } impl std :: ops :: Deref for VisualShaderNodeCubeMapUniform { type Target = crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCubeMapUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeCubeMapUniform { } impl Instanciable for VisualShaderNodeCubeMapUniform { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_cube_map_uniform::VisualShaderNodeCubeMapUniform;
            
            pub mod curve {
                use super::*;
                # [doc = "`core class Curve` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [constant 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 [constant 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 :: icallptr_i64_vec2_f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , position , left_tangent , right_tangent , left_mode , right_mode) ; ret as _ } } # [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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the left [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , index) ; mem :: transmute (ret) } } # [doc = "Returns the right [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [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 :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [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 :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , resolution) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min) ; } } # [doc = "Sets the left [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [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 :: icallptr_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , offset) ; ret as _ } } # [doc = "Sets the right [enum 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , y) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve { } unsafe impl GodotObject for Curve { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve" } } impl std :: ops :: Deref for Curve { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Curve { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Curve { } unsafe impl SubClass < crate :: generated :: object :: Object > for Curve { } impl Instanciable for Curve { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\u{0}" . as_ptr () as * const c_char) ; table . clean_dupes = (gd_api . godot_method_bind_get_method) (class_name , "clean_dupes\u{0}" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\u{0}" . as_ptr () as * const c_char) ; table . get_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_resolution\u{0}" . as_ptr () as * const c_char) ; table . get_max_value = (gd_api . godot_method_bind_get_method) (class_name , "get_max_value\u{0}" . as_ptr () as * const c_char) ; table . get_min_value = (gd_api . godot_method_bind_get_method) (class_name , "get_min_value\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\u{0}" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . set_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_resolution\u{0}" . as_ptr () as * const c_char) ; table . set_max_value = (gd_api . godot_method_bind_get_method) (class_name , "set_max_value\u{0}" . as_ptr () as * const c_char) ; table . set_min_value = (gd_api . godot_method_bind_get_method) (class_name , "set_min_value\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_point_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_point_offset\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_point_value = (gd_api . godot_method_bind_get_method) (class_name , "set_point_value\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::curve::Curve;
            
            pub mod polygon_2d {
                use super::*;
                # [doc = "`core class Polygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallptr_void_nodepath_f32arr (method_bind , self . this . sys () . as_ptr () , path . into () , weights) ; } } # [doc = "Removes all bones from this [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the specified bone from this [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of bones in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , index) ; NodePath :: from_sys (ret) } } # [doc = "Returns the height values of the specified bone."] # [doc = ""] # [inline] pub fn get_bone_weights (& self , index : i64) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_weights ; let ret = crate :: icalls :: icallptr_f32arr_i64 (method_bind , self . this . sys () . as_ptr () , index) ; Float32Array :: from_sys (ret) } } # [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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 invert (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 invert_border (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert_border ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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] rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 texture_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_uv ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_vertex_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [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 :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , index , path . into ()) ; } } # [doc = "Sets the weight values for the specified bone."] # [doc = ""] # [inline] pub fn set_bone_weights (& self , index : i64 , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_weights ; let ret = crate :: icalls :: icallptr_void_i64_f32arr (method_bind , self . this . sys () . as_ptr () , index , 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , internal_vertex_count) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , invert_border) ; } } # [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 :: icallptr_void_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] rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [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 :: icallptr_void_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 : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallptr_void_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 : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_vertex_colors ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Polygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Polygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Polygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Polygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Polygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Polygon2D { } impl Instanciable for Polygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\u{0}" . as_ptr () as * const c_char) ; table . erase_bone = (gd_api . godot_method_bind_get_method) (class_name , "erase_bone\u{0}" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\u{0}" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\u{0}" . as_ptr () as * const c_char) ; table . get_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_path\u{0}" . as_ptr () as * const c_char) ; table . get_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_weights\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_invert = (gd_api . godot_method_bind_get_method) (class_name , "get_invert\u{0}" . as_ptr () as * const c_char) ; table . get_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "get_invert_border\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . get_polygons = (gd_api . godot_method_bind_get_method) (class_name , "get_polygons\u{0}" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\u{0}" . as_ptr () as * const c_char) ; table . get_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\u{0}" . as_ptr () as * const c_char) ; table . get_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_uv\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_colors\u{0}" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\u{0}" . as_ptr () as * const c_char) ; table . set_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_path\u{0}" . as_ptr () as * const c_char) ; table . set_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_weights\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_invert = (gd_api . godot_method_bind_get_method) (class_name , "set_invert\u{0}" . as_ptr () as * const c_char) ; table . set_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_border\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\u{0}" . as_ptr () as * const c_char) ; table . set_polygons = (gd_api . godot_method_bind_get_method) (class_name , "set_polygons\u{0}" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\u{0}" . as_ptr () as * const c_char) ; table . set_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\u{0}" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_colors\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::polygon_2d::Polygon2D;
            
            pub mod editor_inspector_plugin {
                use super::*;
                # [doc = "`tools class EditorInspectorPlugin` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl EditorInspectorPlugin { # [doc = "Adds a custom control, not necessarily a property editor."] # [doc = ""] # [inline] pub fn add_custom_control (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_custom_control ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Adds a property editor, this must inherit [EditorProperty]."] # [doc = ""] # [inline] pub fn add_property_editor (& self , property : impl Into < GodotString > , editor : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_property_editor ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , property . into () , editor . as_arg_ptr ()) ; } } # [doc = "Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty]."] # [doc = ""] # [inline] pub fn add_property_editor_for_multiple_properties (& self , label : impl Into < GodotString > , properties : StringArray , editor : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_property_editor_for_multiple_properties ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorInspectorPlugin" } } impl std :: ops :: Deref for EditorInspectorPlugin { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInspectorPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorInspectorPlugin { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_property_editor = (gd_api . godot_method_bind_get_method) (class_name , "add_property_editor\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_inspector_plugin::EditorInspectorPlugin;
            
            pub mod visual_shader_node_vector_clamp {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorClamp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorClamp" } } impl std :: ops :: Deref for VisualShaderNodeVectorClamp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorClamp { } impl Instanciable for VisualShaderNodeVectorClamp { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_clamp::VisualShaderNodeVectorClamp;
            
            pub mod vseparator {
                use super::*;
                # [doc = "`core class VSeparator` inherits `Separator` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VSeparator { type Target = crate :: generated :: separator :: Separator ; # [inline] fn deref (& self) -> & crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSeparator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: separator :: Separator > for VSeparator { } unsafe impl SubClass < crate :: generated :: control :: Control > for VSeparator { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VSeparator { } unsafe impl SubClass < crate :: generated :: node :: Node > for VSeparator { } unsafe impl SubClass < crate :: generated :: object :: Object > for VSeparator { } impl Instanciable for VSeparator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::vseparator::VSeparator;
            
            pub mod animation_node_time_seek {
                use super::*;
                # [doc = "`core class AnimationNodeTimeSeek` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTimeSeek" } } impl std :: ops :: Deref for AnimationNodeTimeSeek { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTimeSeek { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeTimeSeek { } impl Instanciable for AnimationNodeTimeSeek { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::animation_node_time_seek::AnimationNodeTimeSeek;
            
            pub mod position_2d {
                use super::*;
                # [doc = "`core class Position2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Position2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Position2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Position2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Position2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Position2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Position2D { } impl Instanciable for Position2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::position_2d::Position2D;
            
            pub mod input_event_pan_gesture {
                use super::*;
                # [doc = "`core class InputEventPanGesture` inherits `InputEventGesture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , delta) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventPanGesture { } unsafe impl GodotObject for InputEventPanGesture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventPanGesture" } } impl std :: ops :: Deref for InputEventPanGesture { type Target = crate :: generated :: input_event_gesture :: InputEventGesture ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventPanGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_gesture :: InputEventGesture > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventPanGesture { } impl Instanciable for InputEventPanGesture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_delta\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_pan_gesture::InputEventPanGesture;
            
            pub mod multiplayer_peer_gdnative {
                use super::*;
                # [doc = "`core class MultiplayerPeerGDNative` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerPeerGDNative" } } impl std :: ops :: Deref for MultiplayerPeerGDNative { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiplayerPeerGDNative { } impl Instanciable for MultiplayerPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::multiplayer_peer_gdnative::MultiplayerPeerGDNative;
            
            pub mod skeleton {
                use super::*;
                # [doc = "`core class Skeleton` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 , thread_access :: 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`. [method 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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "[i]Deprecated soon.[/i]"] # [doc = ""] # [inline] pub fn bind_child_node_to_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . bind_child_node_to_bone ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx , 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 :: icallptr_void (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 :: icallptr_void (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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = ""] # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; ret as _ } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = "[i]Deprecated soon.[/i]"] # [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) ; < 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , exception) ; } } # [doc = ""] # [doc = ""] # [inline] pub 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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn register_skin (& self , skin : impl AsArg < crate :: generated :: skin :: Skin >) -> Option < Ref < crate :: generated :: skin_reference :: SkinReference , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . register_skin ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , skin . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skin_reference :: SkinReference , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx , disable) ; } } # [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 :: icallptr_void_i64_trans_f64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx , pose , amount , persistent) ; } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx , parent_idx) ; } } # [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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , 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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , rest) ; } } # [doc = "[i]Deprecated soon.[/i]"] # [doc = ""] # [inline] pub fn unbind_child_node_from_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . unbind_child_node_from_bone ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton { } unsafe impl GodotObject for Skeleton { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Skeleton { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Skeleton { } unsafe impl SubClass < crate :: generated :: node :: Node > for Skeleton { } unsafe impl SubClass < crate :: generated :: object :: Object > for Skeleton { } impl Instanciable for Skeleton { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\u{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\u{0}" . as_ptr () as * const c_char) ; table . find_bone = (gd_api . godot_method_bind_get_method) (class_name , "find_bone\u{0}" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_name\u{0}" . as_ptr () as * const c_char) ; table . get_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_parent\u{0}" . as_ptr () as * const c_char) ; table . get_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_pose\u{0}" . as_ptr () as * const c_char) ; table . get_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_rest\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . localize_rests = (gd_api . godot_method_bind_get_method) (class_name , "localize_rests\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . register_skin = (gd_api . godot_method_bind_get_method) (class_name , "register_skin\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_parent\u{0}" . as_ptr () as * const c_char) ; table . set_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_pose\u{0}" . as_ptr () as * const c_char) ; table . set_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_rest\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::skeleton::Skeleton;
            
            pub mod visual_script_scene_tree {
                use super::*;
                # [doc = "`core class VisualScriptSceneTree` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneTree" } } impl std :: ops :: Deref for VisualScriptSceneTree { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSceneTree { } impl Instanciable for VisualScriptSceneTree { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_scene_tree::VisualScriptSceneTree;
            
            pub mod editor_file_dialog {
                use super::*;
                # [doc = "`tools class EditorFileDialog` inherits `ConfirmationDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorFileDialog { pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const DISPLAY_LIST : i64 = 1i64 ; pub const DISPLAY_THUMBNAILS : i64 = 0i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; pub const MODE_SAVE_FILE : i64 = 4i64 ; } impl EditorFileDialog { # [doc = "Adds a comma-delimited file extension filter option to the [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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: Access (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The view format in which the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: DisplayMode (ret) } } # [doc = "The purpose of the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: Mode (ret) } } # [doc = "Returns the `VBoxContainer` used to display the file system."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Notify the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, hidden files and directories will be visible in the [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , access) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "The view format in which the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The purpose of the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, hidden files and directories will be visible in the [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileDialog { } unsafe impl GodotObject for EditorFileDialog { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorFileDialog { type Target = crate :: generated :: confirmation_dialog :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: confirmation_dialog :: ConfirmationDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\u{0}" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\u{0}" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\u{0}" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\u{0}" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\u{0}" . as_ptr () as * const c_char) ; table . get_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_display_mode\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{0}" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\u{0}" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\u{0}" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\u{0}" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\u{0}" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_display_mode\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_file_dialog::EditorFileDialog;
            
            pub mod tree {
                use super::*;
                # [doc = "`core class Tree` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tree { pub const DROP_MODE_DISABLED : i64 = 0i64 ; pub const DROP_MODE_INBETWEEN : i64 = 2i64 ; pub const DROP_MODE_ON_ITEM : i64 = 1i64 ; pub const SELECT_MULTI : i64 = 2i64 ; pub const SELECT_ROW : i64 = 1i64 ; pub const SELECT_SINGLE : i64 = 0i64 ; } 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 , thread_access :: 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 = "Returns `true` if the column titles are being shown."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates an item in the tree and adds it as a child of `parent`.\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 :: Object > , idx : i64) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . create_item ; let ret = crate :: icalls :: icallptr_obj_obj_i64 (method_bind , self . this . sys () . as_ptr () , parent . as_arg_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Makes the currently focused cell visible.\nThis will scroll the tree if necessary. In [constant 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 [constant 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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , column) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , column) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [enum DropModeFlags] for a description of each drop section.\nTo get the item which the returned drop section is relative to, use [method 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 :: icallptr_i64_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [doc = "Returns the currently edited item. This is only available for custom cell mode."] # [doc = ""] # [inline] pub fn get_edited (& self) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_edited ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the column for the currently edited item. This is only available for custom cell mode."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the rectangle area for the specified item. 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 :: 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 :: icallptr_rect2_obj_i64 (method_bind , self . this . sys () . as_ptr () , item . as_arg_ptr () , column) ; mem :: transmute (ret) } } # [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 :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_item_at_position ; let ret = crate :: icalls :: icallptr_obj_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the next selected item 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 :: Object >) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_next_selected ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , from . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Allows single or multiple selection. See the [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tree :: SelectMode (ret) } } # [doc = "Returns the currently focused item, or `null` if no item is focused.\nIn [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected.\nTo get the currently selected item(s), use [method get_next_selected]."] # [doc = ""] # [inline] pub fn get_selected (& self) -> Option < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_selected ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tree_item :: TreeItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the currently focused column, or -1 if no column is focused.\nIn [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant 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 [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn scroll_to_item (& self , item : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . scroll_to_item ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [doc = "If `true`, the column will have the \"Expand\" flag of [Control]. Columns that have the \"Expand\" flag will use their \"min_width\" in a similar fashion to [member 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , column , expand) ; } } # [doc = "Sets the minimum width of a column. Columns that have the \"Expand\" flag will use their \"min_width\" in a similar fashion to [member 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , column , min_width) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , column , 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , hide) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Allows single or multiple selection. See the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Tree { } unsafe impl GodotObject for Tree { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Tree { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Tree { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Tree { } unsafe impl SubClass < crate :: generated :: node :: Node > for Tree { } unsafe impl SubClass < crate :: generated :: object :: Object > for Tree { } impl Instanciable for Tree { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\u{0}" . as_ptr () as * const c_char) ; table . edit_selected = (gd_api . godot_method_bind_get_method) (class_name , "edit_selected\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_reselect\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_column_title = (gd_api . godot_method_bind_get_method) (class_name , "get_column_title\u{0}" . as_ptr () as * const c_char) ; table . get_column_width = (gd_api . godot_method_bind_get_method) (class_name , "get_column_width\u{0}" . as_ptr () as * const c_char) ; table . get_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_columns\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_edited = (gd_api . godot_method_bind_get_method) (class_name , "get_edited\u{0}" . as_ptr () as * const c_char) ; table . get_edited_column = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_column\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_next_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_next_selected\u{0}" . as_ptr () as * const c_char) ; table . get_pressed_button = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_button\u{0}" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\u{0}" . as_ptr () as * const c_char) ; table . get_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_select_mode\u{0}" . as_ptr () as * const c_char) ; table . get_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_selected\u{0}" . as_ptr () as * const c_char) ; table . get_selected_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_column\u{0}" . as_ptr () as * const c_char) ; table . is_folding_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_folding_hidden\u{0}" . as_ptr () as * const c_char) ; table . is_root_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_root_hidden\u{0}" . as_ptr () as * const c_char) ; table . scroll_to_item = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_item\u{0}" . as_ptr () as * const c_char) ; table . set_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_reselect\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_column_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_column_expand\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_column_title = (gd_api . godot_method_bind_get_method) (class_name , "set_column_title\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_hide_folding = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_folding\u{0}" . as_ptr () as * const c_char) ; table . set_hide_root = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_root\u{0}" . as_ptr () as * const c_char) ; table . set_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_select_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::tree::Tree;
            
            pub mod audio_effect_eq {
                use super::*;
                # [doc = "`core class AudioEffectEQ` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , band_idx) ; ret as _ } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , band_idx , volume_db) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ { } unsafe impl GodotObject for AudioEffectEQ { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ" } } impl std :: ops :: Deref for AudioEffectEQ { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ { } impl Instanciable for AudioEffectEQ { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_eq::AudioEffectEQ;
            
            pub mod concave_polygon_shape_2d {
                use super::*;
                # [doc = "`core class ConcavePolygonShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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]'s line segments."] # [doc = ""] # [inline] pub fn segments (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShape2DMethodTable :: get (get_api ()) . get_segments ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "The array of points that make up the [ConcavePolygonShape2D]'s line segments."] # [doc = ""] # [inline] pub fn set_segments (& self , segments : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShape2DMethodTable :: get (get_api ()) . set_segments ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , segments) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConcavePolygonShape2D { } unsafe impl GodotObject for ConcavePolygonShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConcavePolygonShape2D" } } impl std :: ops :: Deref for ConcavePolygonShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConcavePolygonShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConcavePolygonShape2D { } impl Instanciable for ConcavePolygonShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_segments\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::concave_polygon_shape_2d::ConcavePolygonShape2D;
            
            pub mod pin_joint {
                use super::*;
                # [doc = "`core class PinJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 = "If above 0, this value is the maximum value for an impulse that this Joint produces."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "If above 0, this value is the maximum value for an impulse that this Joint produces."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint { } unsafe impl GodotObject for PinJoint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PinJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for PinJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PinJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for PinJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for PinJoint { } impl Instanciable for PinJoint { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::pin_joint::PinJoint;
            
            pub mod packet_peer_gdnative {
                use super::*;
                # [doc = "`core class PacketPeerGDNative` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerGDNative" } } impl std :: ops :: Deref for PacketPeerGDNative { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerGDNative { } impl Instanciable for PacketPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::packet_peer_gdnative::PacketPeerGDNative;
            
            pub mod visual_shader_node_outer_product {
                use super::*;
                # [doc = "`core class VisualShaderNodeOuterProduct` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOuterProduct" } } impl std :: ops :: Deref for VisualShaderNodeOuterProduct { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOuterProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeOuterProduct { } impl Instanciable for VisualShaderNodeOuterProduct { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_outer_product::VisualShaderNodeOuterProduct;
            
            pub mod gdnative_library {
                use super::*;
                # [doc = "`core class GDNativeLibrary` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: config_file :: ConfigFile , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_config_file ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: config_file :: ConfigFile , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_current_dependencies (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_current_dependencies ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_config_file (& self , config_file : impl AsArg < crate :: generated :: config_file :: ConfigFile >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_config_file ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , load_once) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , reloadable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , singleton) ; } } # [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 :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for GDNativeLibrary { } unsafe impl GodotObject for GDNativeLibrary { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDNativeLibrary" } } impl std :: ops :: Deref for GDNativeLibrary { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDNativeLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for GDNativeLibrary { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDNativeLibrary { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDNativeLibrary { } impl Instanciable for GDNativeLibrary { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_current_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dependencies\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_symbol_prefix\u{0}" . as_ptr () as * const c_char) ; table . is_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "is_reloadable\u{0}" . as_ptr () as * const c_char) ; table . is_singleton = (gd_api . godot_method_bind_get_method) (class_name , "is_singleton\u{0}" . as_ptr () as * const c_char) ; table . set_config_file = (gd_api . godot_method_bind_get_method) (class_name , "set_config_file\u{0}" . as_ptr () as * const c_char) ; table . set_load_once = (gd_api . godot_method_bind_get_method) (class_name , "set_load_once\u{0}" . as_ptr () as * const c_char) ; table . set_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "set_reloadable\u{0}" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\u{0}" . as_ptr () as * const c_char) ; table . set_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_symbol_prefix\u{0}" . as_ptr () as * const c_char) ; table . should_load_once = (gd_api . godot_method_bind_get_method) (class_name , "should_load_once\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gdnative_library::GDNativeLibrary;
            
            pub mod visual_script_property_get {
                use super::*;
                # [doc = "`core class VisualScriptPropertyGet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptPropertyGet { pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_property_get :: CallMode (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , basic_type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPropertyGet" } } impl std :: ops :: Deref for VisualScriptPropertyGet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPropertyGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptPropertyGet { } impl Instanciable for VisualScriptPropertyGet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\u{0}" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\u{0}" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\u{0}" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\u{0}" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\u{0}" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\u{0}" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\u{0}" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\u{0}" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\u{0}" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\u{0}" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_property_get::VisualScriptPropertyGet;
            
            pub mod visual_shader_node_vector_distance {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorDistance` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDistance" } } impl std :: ops :: Deref for VisualShaderNodeVectorDistance { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDistance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorDistance { } impl Instanciable for VisualShaderNodeVectorDistance { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_distance::VisualShaderNodeVectorDistance;
            
            pub mod collision_polygon {
                use super::*;
                # [doc = "`core class CollisionPolygon` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [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 : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon { } unsafe impl GodotObject for CollisionPolygon { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionPolygon { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionPolygon { } impl Instanciable for CollisionPolygon { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_polygon::CollisionPolygon;
            
            pub mod image_texture {
                use super::*;
                # [doc = "`core class ImageTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ImageTexture { pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const STORAGE_RAW : i64 = 0i64 ; } 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 , thread_access :: 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] 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 :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , format , flags) ; } } # [doc = "Create a new [ImageTexture] from an [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 :: Image > , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . create_from_image ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags) ; } } # [doc = "Returns the format of the [ImageTexture], 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [doc = "The storage quality for [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image_texture :: Storage (ret) } } # [doc = "Load an [ImageTexture] from a file path."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sets the [Image] of this [ImageTexture]."] # [doc = ""] # [inline] pub fn set_data (& self , image : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr ()) ; } } # [doc = "The storage quality for [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = "Resizes the [ImageTexture] 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ImageTexture { } unsafe impl GodotObject for ImageTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ImageTexture" } } impl std :: ops :: Deref for ImageTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ImageTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ImageTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ImageTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ImageTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ImageTexture { } impl Instanciable for ImageTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . create_from_image = (gd_api . godot_method_bind_get_method) (class_name , "create_from_image\u{0}" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\u{0}" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\u{0}" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\u{0}" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::image_texture::ImageTexture;
            
            pub mod shape {
                use super::*;
                # [doc = "`core class Shape` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl Shape { # [doc = ""] # [doc = ""] # [inline] pub fn get_debug_mesh (& self) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_debug_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The collision margin for the shape."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 = ShapeMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape { } unsafe impl GodotObject for Shape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape" } } impl std :: ops :: Deref for Shape { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shape { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::shape::Shape;
            
            pub mod translation_server {
                use super::*;
                # [doc = "`core singleton class TranslationServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] resource."] # [doc = ""] # [inline] pub fn add_translation (& self , translation : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . add_translation ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns an Array of all loaded locales of the game."] # [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 game."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Removes the given translation from the server."] # [doc = ""] # [inline] pub fn remove_translation (& self , translation : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . remove_translation ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , translation . as_arg_ptr ()) ; } } # [doc = "Sets the locale of the game."] # [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 :: icallptr_void_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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for TranslationServer { } unsafe impl GodotObject for TranslationServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TranslationServer" } } impl std :: ops :: Deref for TranslationServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TranslationServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_loaded_locales = (gd_api . godot_method_bind_get_method) (class_name , "get_loaded_locales\u{0}" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\u{0}" . as_ptr () as * const c_char) ; table . get_locale_name = (gd_api . godot_method_bind_get_method) (class_name , "get_locale_name\u{0}" . as_ptr () as * const c_char) ; table . remove_translation = (gd_api . godot_method_bind_get_method) (class_name , "remove_translation\u{0}" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\u{0}" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::translation_server::TranslationServer;
            
            pub mod visual_shader_node_texture {
                use super::*;
                # [doc = "`core class VisualShaderNodeTexture` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTexture { pub const SOURCE_2D_NORMAL : i64 = 3i64 ; pub const SOURCE_2D_TEXTURE : i64 = 2i64 ; pub const SOURCE_DEPTH : i64 = 4i64 ; pub const SOURCE_PORT : i64 = 5i64 ; pub const SOURCE_SCREEN : i64 = 1i64 ; pub const SOURCE_TEXTURE : i64 = 0i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture :: Source (ret) } } # [doc = "The source texture, if needed for the selected [member source]."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture :: TextureType (ret) } } # [doc = "Determines the source for the lookup. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "The source texture, if needed for the selected [member source]."] # [doc = ""] # [inline] pub fn set_texture (& self , value : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , value . as_arg_ptr ()) ; } } # [doc = "Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTexture { } unsafe impl GodotObject for VisualShaderNodeTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTexture" } } impl std :: ops :: Deref for VisualShaderNodeTexture { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTexture { } impl Instanciable for VisualShaderNodeTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\u{0}" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_texture::VisualShaderNodeTexture;
            
            pub mod class_db {
                use super::*;
                # [doc = "`core singleton class ClassDB` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; ret as _ } } # [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) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant_list ; let ret = crate :: icalls :: icallptr_strarr_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance) ; StringArray :: from_sys (ret) } } # [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] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`.\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) ; < 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 :: 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 :: icallptr_var_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the `signal` data of `class` or its ancestry. The returned value is a [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 :: icallptr_dict_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; Dictionary :: from_sys (ret) } } # [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] as described in [method 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , method . into () , no_inheritance) ; ret as _ } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; ret as _ } } # [doc = "Sets `property` value of `class` to `value`."] # [doc = ""] # [inline] pub fn class_set_property (& self , object : impl AsArg < crate :: generated :: object :: 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 :: icallptr_i64_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns the names of all the classes available."] # [doc = ""] # [inline] pub fn get_class_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_class_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_inheriters_from_class ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , inherits . into ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for ClassDB { } unsafe impl GodotObject for ClassDB { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ClassDB" } } impl std :: ops :: Deref for ClassDB { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClassDB { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_integer_constant : * 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_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_integer_constant : 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . class_exists = (gd_api . godot_method_bind_get_method) (class_name , "class_exists\u{0}" . as_ptr () as * const c_char) ; table . class_get_category = (gd_api . godot_method_bind_get_method) (class_name , "class_get_category\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . class_get_property = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property\u{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\u{0}" . as_ptr () as * const c_char) ; table . class_get_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . class_has_method = (gd_api . godot_method_bind_get_method) (class_name , "class_has_method\u{0}" . as_ptr () as * const c_char) ; table . class_has_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_has_signal\u{0}" . as_ptr () as * const c_char) ; table . class_set_property = (gd_api . godot_method_bind_get_method) (class_name , "class_set_property\u{0}" . as_ptr () as * const c_char) ; table . get_class_list = (gd_api . godot_method_bind_get_method) (class_name , "get_class_list\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_class\u{0}" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\u{0}" . as_ptr () as * const c_char) ; table . is_class_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "is_parent_class\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::class_db::ClassDB;
            
            pub mod short_cut {
                use super::*;
                # [doc = "`core class ShortCut` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] as a [String]."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The shortcut's [InputEvent].\nGenerally the [InputEvent] is a keyboard key, though it can be any [InputEvent]."] # [doc = ""] # [inline] pub fn shortcut (& self) -> Option < Ref < crate :: generated :: input_event :: InputEvent , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . get_shortcut ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: input_event :: InputEvent , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns `true` if the shortcut's [InputEvent] equals `event`."] # [doc = ""] # [inline] pub fn is_shortcut (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . is_shortcut ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The shortcut's [InputEvent].\nGenerally the [InputEvent] is a keyboard key, though it can be any [InputEvent]."] # [doc = ""] # [inline] pub fn set_shortcut (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . set_shortcut ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ShortCut" } } impl std :: ops :: Deref for ShortCut { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ShortCut { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ShortCut { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ShortCut { } unsafe impl SubClass < crate :: generated :: object :: Object > for ShortCut { } impl Instanciable for ShortCut { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_shortcut\u{0}" . as_ptr () as * const c_char) ; table . is_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut\u{0}" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\u{0}" . as_ptr () as * const c_char) ; table . set_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::short_cut::ShortCut;
            
            pub mod sphere_shape {
                use super::*;
                # [doc = "`core class SphereShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SphereShape { } unsafe impl GodotObject for SphereShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SphereShape" } } impl std :: ops :: Deref for SphereShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SphereShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for SphereShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SphereShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SphereShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for SphereShape { } impl Instanciable for SphereShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sphere_shape::SphereShape;
            
            pub mod static_body {
                use super::*;
                # [doc = "`core class StaticBody` inherits `PhysicsBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's friction, from 0 (frictionless) to 1 (full friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 physics_material_override (& self) -> Option < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [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 :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's friction, from 0 (frictionless) to 1 (full friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [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 :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for StaticBody { type Target = crate :: generated :: physics_body :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StaticBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for StaticBody { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for StaticBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for StaticBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for StaticBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for StaticBody { } impl Instanciable for StaticBody { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::static_body::StaticBody;
            
            pub mod visual_shader_node_vector_compose {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorCompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorCompose" } } impl std :: ops :: Deref for VisualShaderNodeVectorCompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorCompose { } impl Instanciable for VisualShaderNodeVectorCompose { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_compose::VisualShaderNodeVectorCompose;
            
            pub mod large_texture {
                use super::*;
                # [doc = "`core class LargeTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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], starting on offset `ofs`."] # [doc = ""] # [inline] pub fn add_piece (& self , ofs : Vector2 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . add_piece ; let ret = crate :: icalls :: icallptr_i64_vec2_obj (method_bind , self . this . sys () . as_ptr () , ofs , texture . as_arg_ptr ()) ; ret as _ } } # [doc = "Clears the [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of pieces currently in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the [Texture] of the piece with the index `idx`."] # [doc = ""] # [inline] pub fn get_piece_texture (& self , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , ofs) ; } } # [doc = "Sets the [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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_piece_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , texture . as_arg_ptr ()) ; } } # [doc = "Sets the size of this [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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LargeTexture { } unsafe impl GodotObject for LargeTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LargeTexture" } } impl std :: ops :: Deref for LargeTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LargeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for LargeTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for LargeTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for LargeTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for LargeTexture { } impl Instanciable for LargeTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_piece_count = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_count\u{0}" . as_ptr () as * const c_char) ; table . get_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_offset\u{0}" . as_ptr () as * const c_char) ; table . get_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_texture\u{0}" . as_ptr () as * const c_char) ; table . set_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_offset\u{0}" . as_ptr () as * const c_char) ; table . set_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_texture\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::large_texture::LargeTexture;
            
            pub mod collision_shape_2d {
                use super::*;
                # [doc = "`core class CollisionShape2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom)."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom)."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape_2d :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionShape2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionShape2D { } impl Instanciable for CollisionShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_shape_2d::CollisionShape2D;
            
            pub mod cone_twist_joint {
                use super::*;
                # [doc = "`core class ConeTwistJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ConeTwistJoint { pub const PARAM_BIAS : i64 = 2i64 ; pub const PARAM_MAX : i64 = 5i64 ; pub const PARAM_RELAXATION : i64 = 4i64 ; pub const PARAM_SOFTNESS : i64 = 3i64 ; pub const PARAM_SWING_SPAN : i64 = 0i64 ; pub const PARAM_TWIST_SPAN : i64 = 1i64 ; } 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 , thread_access :: 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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret 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 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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConeTwistJoint { } unsafe impl GodotObject for ConeTwistJoint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ConeTwistJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConeTwistJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConeTwistJoint { } impl Instanciable for ConeTwistJoint { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cone_twist_joint::ConeTwistJoint;
            
            pub mod audio_effect_eq21 {
                use super::*;
                # [doc = "`core class AudioEffectEQ21` inherits `AudioEffectEQ` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ21" } } impl std :: ops :: Deref for AudioEffectEQ21 { type Target = crate :: generated :: audio_effect_eq :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ21 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_eq :: AudioEffectEQ > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ21 { } impl Instanciable for AudioEffectEQ21 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_eq21::AudioEffectEQ21;
            
            pub mod array_mesh {
                use super::*;
                # [doc = "`core class ArrayMesh` inherits `Mesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ArrayMesh { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; } 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 , thread_access :: 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 [method 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 :: icallptr_void_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.) [method Mesh.get_surface_count] will become the `surf_idx` for this new surface.\nThe `arrays` argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, `arrays[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 [constant ARRAY_INDEX] if it is used.\nAdding 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 order of the vertices.\n# Default Arguments\n* `blend_shapes` - `[  ]`\n* `compress_flags` - `97280`"] # [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 :: icallptr_void_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , primitive , arrays , blend_shapes , compress_flags) ; } } # [doc = "Removes all blend shapes from this [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of blend shapes that the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: mesh :: BlendShapeMode (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [doc = "Overrides the [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 :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Will perform a UV unwrap on the [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 :: icallptr_i64_trans_f64 (method_bind , self . this . sys () . as_ptr () , transform , texel_size) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Will regenerate normal maps for the [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 :: icallptr_void (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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Overrides the [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 :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "Returns the index of the first surface with this name held within this [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the length in indices of the index array in the requested surface (see [method 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the length in vertices of the vertex array in the requested surface (see [method 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the format mask of the requested surface (see [method 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the primitive type of the requested surface (see [method 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; crate :: generated :: mesh :: PrimitiveType (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , surf_idx , 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 : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_update_region ; let ret = crate :: icalls :: icallptr_void_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , surf_idx , offset , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ArrayMesh { } unsafe impl GodotObject for ArrayMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ArrayMesh" } } impl std :: ops :: Deref for ArrayMesh { type Target = crate :: generated :: mesh :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ArrayMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for ArrayMesh { } impl Instanciable for ArrayMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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 , 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_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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_blend_shapes = (gd_api . godot_method_bind_get_method) (class_name , "clear_blend_shapes\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\u{0}" . as_ptr () as * const c_char) ; table . lightmap_unwrap = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_unwrap\u{0}" . as_ptr () as * const c_char) ; table . regen_normalmaps = (gd_api . godot_method_bind_get_method) (class_name , "regen_normalmaps\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_format\u{0}" . as_ptr () as * const c_char) ; table . surface_get_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_name\u{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\u{0}" . as_ptr () as * const c_char) ; table . surface_remove = (gd_api . godot_method_bind_get_method) (class_name , "surface_remove\u{0}" . as_ptr () as * const c_char) ; table . surface_set_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_name\u{0}" . as_ptr () as * const c_char) ; table . surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "surface_update_region\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::array_mesh::ArrayMesh;
            
            pub mod visual_script_comment {
                use super::*;
                # [doc = "`core class VisualScriptComment` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComment" } } impl std :: ops :: Deref for VisualScriptComment { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptComment { } impl Instanciable for VisualScriptComment { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\u{0}" . as_ptr () as * const c_char) ; table . set_description = (gd_api . godot_method_bind_get_method) (class_name , "set_description\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_comment::VisualScriptComment;
            
            pub mod visual_script_lists {
                use super::*;
                # [doc = "`core class VisualScriptLists` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_void_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , _type , name . into () , index) ; } } # [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 :: icallptr_void_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , _type , name . into () , index) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , index , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , _type) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , index , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLists { } unsafe impl GodotObject for VisualScriptLists { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLists" } } impl std :: ops :: Deref for VisualScriptLists { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLists { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_lists::VisualScriptLists;
            
            pub mod animation_node_blend_tree {
                use super::*;
                # [doc = "`core class AnimationNodeBlendTree` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendTree { pub const CONNECTION_ERROR_CONNECTION_EXISTS : i64 = 5i64 ; 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_OK : i64 = 0i64 ; } 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 , thread_access :: 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] 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 :: animation_node :: AnimationNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_str_obj_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , position) ; } } # [doc = "Connects the output of an [AnimationNode] as input for another [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 :: icallptr_void_str_i64_str (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index , 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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index) ; } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the sub-node with the specified `name`."] # [doc = ""] # [inline] pub fn get_node (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendTree" } } impl std :: ops :: Deref for AnimationNodeBlendTree { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendTree { } impl Instanciable for AnimationNodeBlendTree { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\u{0}" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\u{0}" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\u{0}" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\u{0}" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\u{0}" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\u{0}" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_blend_tree::AnimationNodeBlendTree;
            
            pub mod csg_torus {
                use super::*;
                # [doc = "`core class CSGTorus` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGTorus { } unsafe impl GodotObject for CSGTorus { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGTorus { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGTorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGTorus { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGTorus { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGTorus { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGTorus { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGTorus { } impl Instanciable for CSGTorus { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_outer_radius\u{0}" . as_ptr () as * const c_char) ; table . get_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_ring_sides\u{0}" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\u{0}" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\u{0}" . as_ptr () as * const c_char) ; table . set_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_inner_radius\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_outer_radius\u{0}" . as_ptr () as * const c_char) ; table . set_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_ring_sides\u{0}" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\u{0}" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_torus::CSGTorus;
            
            pub mod visual_script_sub_call {
                use super::*;
                # [doc = "`core class VisualScriptSubCall` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSubCall" } } impl std :: ops :: Deref for VisualScriptSubCall { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSubCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSubCall { } impl Instanciable for VisualScriptSubCall { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_sub_call::VisualScriptSubCall;
            
            pub mod web_rtc_data_channel {
                use super::*;
                # [doc = "`core class WebRTCDataChannel` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCDataChannel { pub const STATE_CLOSED : i64 = 3i64 ; pub const STATE_CLOSING : i64 = 2i64 ; pub const STATE_CONNECTING : i64 = 0i64 ; pub const STATE_OPEN : i64 = 1i64 ; pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; } 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: ChannelState (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: WriteMode (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , write_mode) ; } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannel { } unsafe impl GodotObject for WebRTCDataChannel { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannel" } } impl std :: ops :: Deref for WebRTCDataChannel { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\u{0}" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_retransmits = (gd_api . godot_method_bind_get_method) (class_name , "get_max_retransmits\u{0}" . as_ptr () as * const c_char) ; table . get_protocol = (gd_api . godot_method_bind_get_method) (class_name , "get_protocol\u{0}" . as_ptr () as * const c_char) ; table . get_ready_state = (gd_api . godot_method_bind_get_method) (class_name , "get_ready_state\u{0}" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\u{0}" . as_ptr () as * const c_char) ; table . is_negotiated = (gd_api . godot_method_bind_get_method) (class_name , "is_negotiated\u{0}" . as_ptr () as * const c_char) ; table . is_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_ordered\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{0}" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\u{0}" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_rtc_data_channel::WebRTCDataChannel;
            
            pub mod visual_shader_node_scalar_constant {
                use super::*;
                # [doc = "`core class VisualShaderNodeScalarConstant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarConstant { } unsafe impl GodotObject for VisualShaderNodeScalarConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarConstant" } } impl std :: ops :: Deref for VisualShaderNodeScalarConstant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarConstant { } impl Instanciable for VisualShaderNodeScalarConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_scalar_constant::VisualShaderNodeScalarConstant;
            
            pub mod check_box {
                use super::*;
                # [doc = "`core class CheckBox` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CheckBox { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CheckBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for CheckBox { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for CheckBox { } unsafe impl SubClass < crate :: generated :: control :: Control > for CheckBox { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CheckBox { } unsafe impl SubClass < crate :: generated :: node :: Node > for CheckBox { } unsafe impl SubClass < crate :: generated :: object :: Object > for CheckBox { } impl Instanciable for CheckBox { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::check_box::CheckBox;
            
            pub mod visual_shader_node_input {
                use super::*;
                # [doc = "`core class VisualShaderNodeInput` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeInput" } } impl std :: ops :: Deref for VisualShaderNodeInput { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeInput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeInput { } impl Instanciable for VisualShaderNodeInput { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_input_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_input::VisualShaderNodeInput;
            
            pub mod packet_peer_stream {
                use super::*;
                # [doc = "`core class PacketPeerStream` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The wrapped [StreamPeer] object."] # [doc = ""] # [inline] pub fn stream_peer (& self) -> Option < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_stream_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes) ; } } # [doc = "The wrapped [StreamPeer] object."] # [doc = ""] # [inline] pub fn set_stream_peer (& self , peer : impl AsArg < crate :: generated :: stream_peer :: StreamPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_stream_peer ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerStream" } } impl std :: ops :: Deref for PacketPeerStream { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerStream { } impl Instanciable for PacketPeerStream { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_peer\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_peer\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packet_peer_stream::PacketPeerStream;
            
            pub mod arvr_server {
                use super::*;
                # [doc = "`core singleton class ARVRServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRServer { pub const DONT_RESET_ROTATION : i64 = 2i64 ; pub const RESET_BUT_KEEP_TILT : i64 = 1i64 ; pub const RESET_FULL_ROTATION : i64 = 0i64 ; pub const TRACKER_ANCHOR : i64 = 4i64 ; pub const TRACKER_ANY : i64 = 255i64 ; pub const TRACKER_ANY_KNOWN : i64 = 127i64 ; pub const TRACKER_BASESTATION : i64 = 2i64 ; pub const TRACKER_CONTROLLER : i64 = 1i64 ; pub const TRACKER_UNKNOWN : i64 = 128i64 ; } 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\u{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 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , rotation_mode , keep_height) ; } } # [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 :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . find_interface ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interface ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the absolute timestamp (in μs) of the last [ARVRServer] process callback. The value comes from an internal call to [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The primary [ARVRInterface] currently bound to the [ARVRServer]."] # [doc = ""] # [inline] pub fn primary_interface (& self) -> Option < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_primary_interface ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the positional tracker at the given ID."] # [doc = ""] # [inline] pub fn get_tracker (& self , idx : i64) -> Option < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_tracker ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The primary [ARVRInterface] currently bound to the [ARVRServer]."] # [doc = ""] # [inline] pub fn set_primary_interface (& self , interface : impl AsArg < crate :: generated :: arvr_interface :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_primary_interface ; let ret = crate :: icalls :: icallptr_void_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 , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_world_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRServer { } unsafe impl GodotObject for ARVRServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRServer" } } impl std :: ops :: Deref for ARVRServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 center_on_hmd : * 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 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 , center_on_hmd : 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 , 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . center_on_hmd = (gd_api . godot_method_bind_get_method) (class_name , "center_on_hmd\u{0}" . as_ptr () as * const c_char) ; table . find_interface = (gd_api . godot_method_bind_get_method) (class_name , "find_interface\u{0}" . as_ptr () as * const c_char) ; table . get_hmd_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_hmd_transform\u{0}" . as_ptr () as * const c_char) ; table . get_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_interface\u{0}" . as_ptr () as * const c_char) ; table . get_interface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_interface_count\u{0}" . as_ptr () as * const c_char) ; table . get_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_interfaces\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_primary_interface\u{0}" . as_ptr () as * const c_char) ; table . get_reference_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_frame\u{0}" . as_ptr () as * const c_char) ; table . get_tracker = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker\u{0}" . as_ptr () as * const c_char) ; table . get_tracker_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_count\u{0}" . as_ptr () as * const c_char) ; table . get_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_world_scale\u{0}" . as_ptr () as * const c_char) ; table . set_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "set_primary_interface\u{0}" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_server::ARVRServer;
            
            pub mod visual_script_compose_array {
                use super::*;
                # [doc = "`core class VisualScriptComposeArray` inherits `VisualScriptLists` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComposeArray" } } impl std :: ops :: Deref for VisualScriptComposeArray { type Target = crate :: generated :: visual_script_lists :: VisualScriptLists ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_lists :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComposeArray { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_lists :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_lists :: VisualScriptLists > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptComposeArray { } impl Instanciable for VisualScriptComposeArray { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_compose_array::VisualScriptComposeArray;
            
            pub mod project_settings {
                use super::*;
                # [doc = "`core singleton class ProjectSettings` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] (the property's name)\n- `type`: [int] (see [enum Variant.Type])\n- optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String]\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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Converts a localized path (`res://`) to a full native OS path."] # [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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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# Default Arguments\n* `replace_files` - `true`"] # [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 :: icallptr_bool_str_bool_i64 (method_bind , self . this . sys () . as_ptr () , pack . into () , replace_files , offset) ; ret as _ } } # [doc = "Convert a path to a localized path (`res://` 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 :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Saves the configuration to the `project.godot` 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the configuration to a custom file. The file extension must be `.godot` (to save in text-based [ConfigFile] format) or `.binary` (to save in binary format)."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , position) ; } } # [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```"] # [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 :: icallptr_void_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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProjectSettings" } } impl std :: ops :: Deref for ProjectSettings { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProjectSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\u{0}" . as_ptr () as * const c_char) ; table . get_order = (gd_api . godot_method_bind_get_method) (class_name , "get_order\u{0}" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\u{0}" . as_ptr () as * const c_char) ; table . globalize_path = (gd_api . godot_method_bind_get_method) (class_name , "globalize_path\u{0}" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\u{0}" . as_ptr () as * const c_char) ; table . load_resource_pack = (gd_api . godot_method_bind_get_method) (class_name , "load_resource_pack\u{0}" . as_ptr () as * const c_char) ; table . localize_path = (gd_api . godot_method_bind_get_method) (class_name , "localize_path\u{0}" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\u{0}" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\u{0}" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\u{0}" . as_ptr () as * const c_char) ; table . save_custom = (gd_api . godot_method_bind_get_method) (class_name , "save_custom\u{0}" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\u{0}" . as_ptr () as * const c_char) ; table . set_order = (gd_api . godot_method_bind_get_method) (class_name , "set_order\u{0}" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::project_settings::ProjectSettings;
            
            pub mod packet_peer_udp {
                use super::*;
                # [doc = "`core class PacketPeerUDP` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_void (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 [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer].\nNote: 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 transfering 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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns the IP of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the UDP socket is open and has been connected to a remote address. See [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether this [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method IP.get_local_interfaces] to know which are available.\nNote: 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , multicast_address . into () , interface_name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , multicast_address . into () , interface_name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Makes this [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 :: icallptr_i64_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , port , bind_address . into () , recv_buf_size) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Enable or disable sending of broadcast packets (e.g. `set_dest_address(\"255.255.255.255\", 4343)`. This option is disabled by default.\nNote: 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed.\nNote: [method 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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Waits for a packet to arrive on the listening port. See [method listen]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerUDP { } unsafe impl GodotObject for PacketPeerUDP { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerUDP" } } impl std :: ops :: Deref for PacketPeerUDP { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerUDP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerUDP { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerUDP { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerUDP { } impl Instanciable for PacketPeerUDP { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\u{0}" . as_ptr () as * const c_char) ; table . get_packet_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_ip\u{0}" . as_ptr () as * const c_char) ; table . get_packet_port = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_port\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\u{0}" . as_ptr () as * const c_char) ; table . join_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "join_multicast_group\u{0}" . as_ptr () as * const c_char) ; table . leave_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "leave_multicast_group\u{0}" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\u{0}" . as_ptr () as * const c_char) ; table . set_broadcast_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_broadcast_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_dest_address = (gd_api . godot_method_bind_get_method) (class_name , "set_dest_address\u{0}" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packet_peer_udp::PacketPeerUDP;
            
            pub mod physics_2d_direct_space_state {
                use super::*;
                # [doc = "`core class Physics2DDirectSpaceState` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl Physics2DDirectSpaceState { # [doc = "Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty.\n**Note:** Both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of `motion`. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be `[1, 1]`."] # [doc = ""] # [inline] pub fn cast_motion (& self , shape : impl AsArg < crate :: generated :: physics_2d_shape_query_parameters :: 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] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method 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 :: physics_2d_shape_query_parameters :: 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [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]. If the object is an [Area2D], the result is `(0, 0)`.\n`metadata`: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method 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].\n`shape`: The shape index of the colliding shape."] # [doc = ""] # [inline] pub fn get_rest_info (& self , shape : impl AsArg < crate :: generated :: physics_2d_shape_query_parameters :: Physics2DShapeQueryParameters >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . get_rest_info ; let ret = crate :: icalls :: icallptr_dict_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Checks whether a point is inside any 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 [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].\n`rid`: The intersecting object's [RID].\n`shape`: The shape index of the colliding shape.\nAdditionally, the method can take an `exclude` array of objects or [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]s or [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 : 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 , exclude , collision_layer , collide_with_bodies , collide_with_areas) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "\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 , max_results , exclude , collision_layer , collide_with_bodies , collide_with_areas) ; < 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 [method Object.get_meta], and is set with [method 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].\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]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]s or [Area]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 :: icallptr_dict_vec2_vec2_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , from , to , exclude , collision_layer , collide_with_bodies , collide_with_areas) ; Dictionary :: from_sys (ret) } } # [doc = "Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space.\n**Note:** This method does not take into account the `motion` property of the object. 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 [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].\n`rid`: The intersecting object's [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 :: physics_2d_shape_query_parameters :: 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) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DDirectSpaceState { } unsafe impl GodotObject for Physics2DDirectSpaceState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DDirectSpaceState" } } impl std :: ops :: Deref for Physics2DDirectSpaceState { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DDirectSpaceState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\u{0}" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\u{0}" . as_ptr () as * const c_char) ; table . intersect_point = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point\u{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\u{0}" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\u{0}" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_direct_space_state::Physics2DDirectSpaceState;
            
            pub mod bone_2d {
                use super::*;
                # [doc = "`core class Bone2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member 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 :: icallptr_void (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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the node's index as part of the entire skeleton. See [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [method 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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the node's [member 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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , default_length) ; } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [method 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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , rest) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Bone2D { } unsafe impl GodotObject for Bone2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Bone2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Bone2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Bone2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Bone2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Bone2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Bone2D { } impl Instanciable for Bone2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_default_length = (gd_api . godot_method_bind_get_method) (class_name , "get_default_length\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_rest\u{0}" . as_ptr () as * const c_char) ; table . get_skeleton_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_rest\u{0}" . as_ptr () as * const c_char) ; table . set_default_length = (gd_api . godot_method_bind_get_method) (class_name , "set_default_length\u{0}" . as_ptr () as * const c_char) ; table . set_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_rest\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::bone_2d::Bone2D;
            
            pub mod visual_shader_node_group_base {
                use super::*;
                # [doc = "`core class VisualShaderNodeGroupBase` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , id , _type , 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 :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , id , _type , 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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a free input port ID which can be used in [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a free output port ID which can be used in [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of input ports in use. Alternative for [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [String] description of the input ports as as colon-separated list using the format `id,type,name;` (see [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the number of output ports in use. Alternative for [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a [String] description of the output ports as as colon-separated list using the format `id,type,name;` (see [method 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , _type) ; } } # [doc = "Defines all input ports using a [String] formatted as a colon-separated list: `id,type,name;` (see [method 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 :: icallptr_void_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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , _type) ; } } # [doc = "Defines all output ports using a [String] formatted as a colon-separated list: `id,type,name;` (see [method 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 :: icallptr_void_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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGroupBase { } unsafe impl GodotObject for VisualShaderNodeGroupBase { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGroupBase" } } impl std :: ops :: Deref for VisualShaderNodeGroupBase { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGroupBase { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeGroupBase { } impl Instanciable for VisualShaderNodeGroupBase { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_output_port = (gd_api . godot_method_bind_get_method) (class_name , "add_output_port\u{0}" . as_ptr () as * const c_char) ; table . clear_input_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_input_ports\u{0}" . as_ptr () as * const c_char) ; table . clear_output_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_output_ports\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_inputs\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_outputs = (gd_api . godot_method_bind_get_method) (class_name , "get_outputs\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . has_input_port = (gd_api . godot_method_bind_get_method) (class_name , "has_input_port\u{0}" . as_ptr () as * const c_char) ; table . has_output_port = (gd_api . godot_method_bind_get_method) (class_name , "has_output_port\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_input_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_input_port\u{0}" . as_ptr () as * const c_char) ; table . remove_output_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_output_port\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_inputs\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_outputs = (gd_api . godot_method_bind_get_method) (class_name , "set_outputs\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_group_base::VisualShaderNodeGroupBase;
            
            pub mod proxy_texture {
                use super::*;
                # [doc = "`core class ProxyTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . get_base ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base (& self , base : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . set_base ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ProxyTexture" } } impl std :: ops :: Deref for ProxyTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProxyTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProxyTexture { } impl Instanciable for ProxyTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::proxy_texture::ProxyTexture;
            
            pub mod collision_polygon_2d {
                use super::*;
                # [doc = "`core class CollisionPolygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CollisionPolygon2D { pub const BUILD_SEGMENTS : i64 = 1i64 ; pub const BUILD_SOLIDS : i64 = 0i64 ; } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: collision_polygon_2d :: BuildMode (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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], not a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Collision build mode. Use one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , build_mode) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "If `true`, only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [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], not a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon2D { } unsafe impl GodotObject for CollisionPolygon2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionPolygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionPolygon2D { } impl Instanciable for CollisionPolygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\u{0}" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_build_mode\u{0}" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_polygon_2d::CollisionPolygon2D;
            
            pub mod font {
                use super::*;
                # [doc = "`core class Font` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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, [i]ascent[/i] must be added to the Y axis.\nSee also [method 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 = ""] # [inline] pub 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 :: icallptr_void_rid_vec2_str_color_i64_color (method_bind , self . this . sys () . as_ptr () , canvas_item , position , string . into () , modulate , clip_w , 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, [i]ascent[/i] 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.\n# Default Arguments\n* `next` - `-1`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `outline` - `false`"] # [doc = ""] # [inline] pub 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 :: icallptr_f64_rid_vec2_i64_i64_color_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , position , char , next , modulate , outline) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the size of a character, optionally taking kerning into account if the next character is provided.\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 :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , char , next) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the size of a string, taking kerning and advance into account."] # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_str_f64 (method_bind , self . this . sys () . as_ptr () , string . into () , width) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Font { } unsafe impl GodotObject for Font { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Font" } } impl std :: ops :: Deref for Font { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Font { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Font { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Font { } unsafe impl SubClass < crate :: generated :: object :: 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_size : * 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_size : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\u{0}" . as_ptr () as * const c_char) ; table . get_ascent = (gd_api . godot_method_bind_get_method) (class_name , "get_ascent\u{0}" . as_ptr () as * const c_char) ; table . get_char_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_size\u{0}" . as_ptr () as * const c_char) ; table . get_descent = (gd_api . godot_method_bind_get_method) (class_name , "get_descent\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_string_size\u{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\u{0}" . as_ptr () as * const c_char) ; table . has_outline = (gd_api . godot_method_bind_get_method) (class_name , "has_outline\u{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\u{0}" . as_ptr () as * const c_char) ; table . update_changes = (gd_api . godot_method_bind_get_method) (class_name , "update_changes\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::font::Font;
            
            pub mod packed_data_container_ref {
                use super::*;
                # [doc = "`core class PackedDataContainerRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainerRef { } unsafe impl GodotObject for PackedDataContainerRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainerRef" } } impl std :: ops :: Deref for PackedDataContainerRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainerRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PackedDataContainerRef { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::packed_data_container_ref::PackedDataContainerRef;
            
            pub mod visual_script_engine_singleton {
                use super::*;
                # [doc = "`core class VisualScriptEngineSingleton` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptEngineSingleton" } } impl std :: ops :: Deref for VisualScriptEngineSingleton { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEngineSingleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEngineSingleton { } impl Instanciable for VisualScriptEngineSingleton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_engine_singleton::VisualScriptEngineSingleton;
            
            pub mod position_3d {
                use super::*;
                # [doc = "`core class Position3D` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Position3D { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Position3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Position3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Position3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Position3D { } impl Instanciable for Position3D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::position_3d::Position3D;
            
            pub mod visual_script_return {
                use super::*;
                # [doc = "`core class VisualScriptReturn` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptReturn { } unsafe impl GodotObject for VisualScriptReturn { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptReturn" } } impl std :: ops :: Deref for VisualScriptReturn { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptReturn { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptReturn { } impl Instanciable for VisualScriptReturn { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_return_type = (gd_api . godot_method_bind_get_method) (class_name , "set_return_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_return::VisualScriptReturn;
            
            pub mod resource_format_loader {
                use super::*;
                # [doc = "`core class ResourceFormatLoader` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceFormatLoader" } } impl std :: ops :: Deref for ResourceFormatLoader { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceFormatLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ResourceFormatLoader { } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourceFormatLoader { } impl Instanciable for ResourceFormatLoader { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::resource_format_loader::ResourceFormatLoader;
            
            pub mod thread {
                use super::*;
                # [doc = "`core class Thread` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Thread { pub const PRIORITY_HIGH : i64 = 2i64 ; pub const PRIORITY_LOW : i64 = 0i64 ; pub const PRIORITY_NORMAL : i64 = 1i64 ; } 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 , thread_access :: 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]'s ID, uniquely identifying it among all threads. If the [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Starts a new [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] can be changed by passing a value from the [enum Priority] enum.\nReturns [constant OK] on success, or [constant 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 :: 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 :: icallptr_i64_obj_str_var_i64 (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr () , method . into () , userdata . owned_to_variant () , priority) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Joins the [Thread] and waits for it to finish. Returns what the method called returned."] # [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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Thread { } unsafe impl GodotObject for Thread { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Thread" } } impl std :: ops :: Deref for Thread { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Thread { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Thread { } unsafe impl SubClass < crate :: generated :: object :: Object > for Thread { } impl Instanciable for Thread { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\u{0}" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\u{0}" . as_ptr () as * const c_char) ; table . wait_to_finish = (gd_api . godot_method_bind_get_method) (class_name , "wait_to_finish\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::thread::Thread;
            
            pub mod gdscript {
                use super::*;
                # [doc = "`core class GDScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptMethodTable :: get (get_api ()) . get_as_byte_code ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScript" } } impl std :: ops :: Deref for GDScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for GDScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for GDScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDScript { } impl Instanciable for GDScript { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gdscript::GDScript;
            
            pub mod interpolated_camera {
                use super::*;
                # [doc = "`core class InterpolatedCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The target's [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , target_path) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [doc = "Sets the node to move toward and orient with."] # [doc = ""] # [inline] pub fn set_target (& self , target : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_target ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , target . as_arg_ptr ()) ; } } # [doc = "The target's [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for InterpolatedCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InterpolatedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for InterpolatedCamera { } impl Instanciable for InterpolatedCamera { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\u{0}" . as_ptr () as * const c_char) ; table . get_target_path = (gd_api . godot_method_bind_get_method) (class_name , "get_target_path\u{0}" . as_ptr () as * const c_char) ; table . is_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_interpolation_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\u{0}" . as_ptr () as * const c_char) ; table . set_target = (gd_api . godot_method_bind_get_method) (class_name , "set_target\u{0}" . as_ptr () as * const c_char) ; table . set_target_path = (gd_api . godot_method_bind_get_method) (class_name , "set_target_path\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::interpolated_camera::InterpolatedCamera;
            
            pub mod margin_container {
                use super::*;
                # [doc = "`core class MarginContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MarginContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MarginContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for MarginContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for MarginContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MarginContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for MarginContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for MarginContainer { } impl Instanciable for MarginContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::margin_container::MarginContainer;
            
            pub mod file_dialog {
                use super::*;
                # [doc = "`core class FileDialog` inherits `ConfirmationDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl FileDialog { pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; 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 , thread_access :: 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` as a custom filter; `filter` should be of the form `\"filename.extension ; Description\"`. For example, `\"*.png ; PNG Images\"`."] # [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 :: icallptr_void_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 :: icallptr_void (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 :: icallptr_void (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 [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: file_dialog :: Access (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PoolStringArray([\"*.png ; PNG Images\",\"*.gd ; GDScript Files\"]))`."] # [doc = ""] # [inline] pub fn filters (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_filters ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the LineEdit for the selected file."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: file_dialog :: Mode (ret) } } # [doc = "Returns the vertical box container of the dialog, custom controls can be added to it."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_void (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 [constant 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , access) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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\"]))`."] # [doc = ""] # [inline] pub fn set_filters (& self , filters : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_filters ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, changing the `Mode` property will set the window title accordingly (e.g. setting mode to [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FileDialog { } unsafe impl GodotObject for FileDialog { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for FileDialog { type Target = crate :: generated :: confirmation_dialog :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: confirmation_dialog :: ConfirmationDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for FileDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for FileDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for FileDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for FileDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for FileDialog { } impl Instanciable for FileDialog { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\u{0}" . as_ptr () as * const c_char) ; table . deselect_items = (gd_api . godot_method_bind_get_method) (class_name , "deselect_items\u{0}" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\u{0}" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\u{0}" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\u{0}" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\u{0}" . as_ptr () as * const c_char) ; table . get_filters = (gd_api . godot_method_bind_get_method) (class_name , "get_filters\u{0}" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{0}" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\u{0}" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\u{0}" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\u{0}" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\u{0}" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\u{0}" . as_ptr () as * const c_char) ; table . set_filters = (gd_api . godot_method_bind_get_method) (class_name , "set_filters\u{0}" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::file_dialog::FileDialog;
            
            pub mod particles_material {
                use super::*;
                # [doc = "`core class ParticlesMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ParticlesMaterial { pub const EMISSION_SHAPE_BOX : i64 = 2i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const EMISSION_SHAPE_MAX : i64 = 5i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const PARAM_MAX : i64 = 12i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; } 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 , thread_access :: 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]'s `texture` is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member 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 :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Each particle's color will vary along this [GradientTexture]."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The box's extents if `emission_shape` is set to [constant 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]."] # [doc = ""] # [inline] pub fn emission_color_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_color_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant 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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_normal_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The number of emission points if `emission_shape` is set to [constant EMISSION_SHAPE_POINTS] or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant 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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_point_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Particles will be emitted inside this region. Use [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: particles_material :: EmissionShape (ret) } } # [doc = "The sphere's radius if `emission_shape` is set to [constant 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, particles rotate around Y axis by [member angle]."] # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "Amount of [member 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 = ParticlesMaterialMethodTable :: get (get_api ()) . get_flatness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Each particle's tangential acceleration will vary along this [CurveTexture]."] # [doc = ""] # [inline] pub fn param_texture (& self , param : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 = ParticlesMaterialMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Trail particles' color will vary along this [GradientTexture]."] # [doc = ""] # [inline] pub fn trail_color_modifier (& self) -> Option < Ref < crate :: generated :: gradient_texture :: GradientTexture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_trail_color_modifier ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient_texture :: GradientTexture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Trail particles' size will vary along this [CurveTexture]."] # [doc = ""] # [inline] pub fn trail_size_modifier (& self) -> Option < Ref < crate :: generated :: curve_texture :: CurveTexture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_trail_size_modifier ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve_texture :: CurveTexture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Each particle's initial color. If the [Particles2D]'s `texture` is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member 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 :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's color will vary along this [GradientTexture]."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The box's extents if `emission_shape` is set to [constant 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 :: icallptr_void_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 [member emission_point_texture]."] # [doc = ""] # [inline] pub fn set_emission_color_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_color_texture ; let ret = crate :: icalls :: icallptr_void_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 [member emission_point_texture]. Used only in [constant 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_normal_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The number of emission points if `emission_shape` is set to [constant EMISSION_SHAPE_POINTS] or [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point_count) ; } } # [doc = "Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_point_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Particles will be emitted inside this region. Use [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The sphere's radius if `emission_shape` is set to [constant 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = "If `true`, particles rotate around Y axis by [member angle]."] # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enable) ; } } # [doc = "Amount of [member 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 = ParticlesMaterialMethodTable :: get (get_api ()) . set_flatness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , randomness) ; } } # [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_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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "Tangential acceleration randomness ratio."] # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , randomness) ; } } # [doc = "Each particle's tangential acceleration will vary along this [CurveTexture]."] # [doc = ""] # [inline] pub fn set_param_texture (& self , param : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , param , texture . as_arg_ptr ()) ; } } # [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 = ParticlesMaterialMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Trail particles' color will vary along this [GradientTexture]."] # [doc = ""] # [inline] pub fn set_trail_color_modifier (& self , texture : impl AsArg < crate :: generated :: gradient_texture :: GradientTexture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_trail_color_modifier ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , divisor) ; } } # [doc = "Trail particles' size will vary along this [CurveTexture]."] # [doc = ""] # [inline] pub fn set_trail_size_modifier (& self , texture : impl AsArg < crate :: generated :: curve_texture :: CurveTexture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_trail_size_modifier ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParticlesMaterial { } unsafe impl GodotObject for ParticlesMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ParticlesMaterial" } } impl std :: ops :: Deref for ParticlesMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParticlesMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for ParticlesMaterial { } impl Instanciable for ParticlesMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\u{0}" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\u{0}" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\u{0}" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\u{0}" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . get_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_param_texture\u{0}" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_divisor\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\u{0}" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\u{0}" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\u{0}" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\u{0}" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\u{0}" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\u{0}" . as_ptr () as * const c_char) ; table . set_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_param_texture\u{0}" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_divisor\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::particles_material::ParticlesMaterial;
            
            pub mod input_event_magnify_gesture {
                use super::*;
                # [doc = "`core class InputEventMagnifyGesture` inherits `InputEventGesture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , factor) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMagnifyGesture { } unsafe impl GodotObject for InputEventMagnifyGesture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMagnifyGesture" } } impl std :: ops :: Deref for InputEventMagnifyGesture { type Target = crate :: generated :: input_event_gesture :: InputEventGesture ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMagnifyGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_gesture :: InputEventGesture > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMagnifyGesture { } impl Instanciable for InputEventMagnifyGesture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_magnify_gesture::InputEventMagnifyGesture;
            
            pub mod cylinder_shape {
                use super::*;
                # [doc = "`core class CylinderShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CylinderShape { } unsafe impl GodotObject for CylinderShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CylinderShape" } } impl std :: ops :: Deref for CylinderShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CylinderShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for CylinderShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CylinderShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CylinderShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CylinderShape { } impl Instanciable for CylinderShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::cylinder_shape::CylinderShape;
            
            pub mod multi_mesh_instance_2d {
                use super::*;
                # [doc = "`core class MultiMeshInstance2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] that will be drawn by the [MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn multimesh (& self) -> Option < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_multimesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn set_multimesh (& self , multimesh : impl AsArg < crate :: generated :: multi_mesh :: MultiMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_multimesh ; let ret = crate :: icalls :: icallptr_void_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].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MultiMeshInstance2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiMeshInstance2D { } impl Instanciable for MultiMeshInstance2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . set_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "set_multimesh\u{0}" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::multi_mesh_instance_2d::MultiMeshInstance2D;
            
            pub mod audio_stream_player {
                use super::*;
                # [doc = "`core class AudioStreamPlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamPlayer { pub const MIX_TARGET_CENTER : i64 = 2i64 ; pub const MIX_TARGET_STEREO : i64 = 0i64 ; pub const MIX_TARGET_SURROUND : i64 = 1i64 ; } 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 , thread_access :: 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."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If the audio configuration has more than two speakers, this sets the target channels. See [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_player :: MixTarget (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 = AudioStreamPlayerMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position in the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , from_position) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bus on which this audio is playing."] # [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 :: icallptr_void_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 [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mix_target) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale) ; } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_db) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer { } unsafe impl GodotObject for AudioStreamPlayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AudioStreamPlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AudioStreamPlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayer { } impl Instanciable for AudioStreamPlayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_target\u{0}" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\u{0}" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\u{0}" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\u{0}" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\u{0}" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\u{0}" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\u{0}" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\u{0}" . as_ptr () as * const c_char) ; table . set_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_target\u{0}" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\u{0}" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\u{0}" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\u{0}" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_stream_player::AudioStreamPlayer;
            
            pub mod navigation {
                use super::*;
                # [doc = "`core class Navigation` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [doc = "Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or `null` if the `owner` parameter was omitted)."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector3) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallptr_obj_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3_vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , use_collision) ; mem :: transmute (ret) } } # [doc = "Returns 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] (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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize) ; Vector3Array :: from_sys (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional `owner` is used as return value for [method get_closest_point_owner].\n# Default Arguments\n* `owner` - `null`"] # [doc = ""] # [inline] pub fn navmesh_add (& self , mesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh > , xform : Transform , owner : impl AsArg < crate :: generated :: object :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_add ; let ret = crate :: icalls :: icallptr_i64_obj_trans_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , xform , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "Removes the [NavigationMesh] with the given ID."] # [doc = ""] # [inline] pub fn navmesh_remove (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the transform applied to the [NavigationMesh] with the given ID."] # [doc = ""] # [inline] pub fn navmesh_set_transform (& self , id : i64 , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_set_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , id , xform) ; } } # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , up) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation { } unsafe impl GodotObject for Navigation { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Navigation { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Navigation { } unsafe impl SubClass < crate :: generated :: node :: Node > for Navigation { } unsafe impl SubClass < crate :: generated :: object :: Object > for Navigation { } impl Instanciable for Navigation { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_simple_path : * mut sys :: godot_method_bind , pub get_up_vector : * mut sys :: godot_method_bind , pub navmesh_add : * mut sys :: godot_method_bind , pub navmesh_remove : * mut sys :: godot_method_bind , pub navmesh_set_transform : * 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_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_simple_path : 0 as * mut sys :: godot_method_bind , get_up_vector : 0 as * mut sys :: godot_method_bind , navmesh_add : 0 as * mut sys :: godot_method_bind , navmesh_remove : 0 as * mut sys :: godot_method_bind , navmesh_set_transform : 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\u{0}" . as_ptr () as * const c_char) ; table . get_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_up_vector\u{0}" . as_ptr () as * const c_char) ; table . navmesh_add = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_add\u{0}" . as_ptr () as * const c_char) ; table . navmesh_remove = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_remove\u{0}" . as_ptr () as * const c_char) ; table . navmesh_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_set_transform\u{0}" . as_ptr () as * const c_char) ; table . set_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_up_vector\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation::Navigation;
            
            pub mod csg_primitive {
                use super::*;
                # [doc = "`core class CSGPrimitive` inherits `CSGShape` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPrimitive { } unsafe impl GodotObject for CSGPrimitive { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGPrimitive { type Target = crate :: generated :: csg_shape :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPrimitive { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_invert_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_faces\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_primitive::CSGPrimitive;
            
            pub mod physics_2d_test_motion_result {
                use super::*;
                # [doc = "`core class Physics2DTestMotionResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DTestMotionResult { } unsafe impl GodotObject for Physics2DTestMotionResult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DTestMotionResult" } } impl std :: ops :: Deref for Physics2DTestMotionResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DTestMotionResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DTestMotionResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DTestMotionResult { } impl Instanciable for Physics2DTestMotionResult { # [inline] fn construct () -> Ref < Self , thread_access :: 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_normal : * mut sys :: godot_method_bind , pub get_collision_point : * 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_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\u{0}" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\u{0}" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\u{0}" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\u{0}" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\u{0}" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\u{0}" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\u{0}" . as_ptr () as * const c_char) ; table . get_motion_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_remainder\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::physics_2d_test_motion_result::Physics2DTestMotionResult;
            
            pub mod separator {
                use super::*;
                # [doc = "`core class Separator` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl Separator { } impl gdnative_core :: private :: godot_object :: Sealed for Separator { } unsafe impl GodotObject for Separator { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Separator { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Separator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Separator { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Separator { } unsafe impl SubClass < crate :: generated :: node :: Node > for Separator { } unsafe impl SubClass < crate :: generated :: object :: Object > for Separator { }
            }
            pub use crate::generated::separator::Separator;
            
            pub mod visual_script_resource_path {
                use super::*;
                # [doc = "`core class VisualScriptResourcePath` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptResourcePath" } } impl std :: ops :: Deref for VisualScriptResourcePath { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptResourcePath { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptResourcePath { } impl Instanciable for VisualScriptResourcePath { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_resource_path = (gd_api . godot_method_bind_get_method) (class_name , "set_resource_path\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_resource_path::VisualScriptResourcePath;
            
            pub mod ip {
                use super::*;
                # [doc = "`core singleton class IP` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl IP { pub const RESOLVER_INVALID_ID : i64 = - 1i64 ; pub const RESOLVER_MAX_QUERIES : i64 = 32i64 ; pub const RESOLVER_STATUS_DONE : i64 = 2i64 ; pub const RESOLVER_STATUS_ERROR : i64 = 3i64 ; pub const RESOLVER_STATUS_NONE : i64 = 0i64 ; pub const RESOLVER_STATUS_WAITING : i64 = 1i64 ; pub const TYPE_ANY : i64 = 3i64 ; pub const TYPE_IPV4 : i64 = 1i64 ; pub const TYPE_IPV6 : i64 = 2i64 ; pub const TYPE_NONE : i64 = 0i64 ; } 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\u{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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Returns all of 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 [method 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns a queued hostname's status as a [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; crate :: generated :: ip :: ResolverStatus (ret) } } # [doc = "Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum 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 :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type) ; GodotString :: from_sys (ret) } } # [doc = "Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as `ip_type`. Returns the queue ID if successful, or [constant 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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for IP { } unsafe impl GodotObject for IP { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "IP" } } impl std :: ops :: Deref for IP { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_status : * mut sys :: godot_method_bind , pub resolve_hostname : * 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_status : 0 as * mut sys :: godot_method_bind , resolve_hostname : 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . erase_resolve_item = (gd_api . godot_method_bind_get_method) (class_name , "erase_resolve_item\u{0}" . as_ptr () as * const c_char) ; table . get_local_addresses = (gd_api . godot_method_bind_get_method) (class_name , "get_local_addresses\u{0}" . as_ptr () as * const c_char) ; table . get_local_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_local_interfaces\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . resolve_hostname = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ip::IP;
            
            pub mod collision_object_2d {
                use super::*;
                # [doc = "`core class CollisionObject2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . create_shape_owner ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "Returns the object's [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Returns an [Array] 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` 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Returns `true` if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [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` 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , shape_index) ; ret as _ } } # [doc = "Adds a [Shape2D] to the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_add_shape (& self , owner_id : i64 , shape : impl AsArg < crate :: generated :: shape_2d :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_add_shape ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , owner_id , 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [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 :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_owner ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the [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 :: shape_2d :: Shape2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_shape ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Returns the child index of the [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ret as _ } } # [doc = "Returns the shape owner's [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 :: icallptr_trans2D_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id , disabled) ; } } # [doc = "If `enable` is `true`, collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id , enable) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , owner_id , margin) ; } } # [doc = "Sets the [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 :: icallptr_void_i64_trans2D (method_bind , self . this . sys () . as_ptr () , owner_id , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionObject2D { } unsafe impl GodotObject for CollisionObject2D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionObject2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionObject2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: object :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\u{0}" . as_ptr () as * const c_char) ; table . is_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_pickable\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\u{0}" . as_ptr () as * const c_char) ; table . set_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_pickable\u{0}" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::collision_object_2d::CollisionObject2D;
            
            pub mod script_create_dialog {
                use super::*;
                # [doc = "`tools class ScriptCreateDialog` inherits `ConfirmationDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_void_str_str_bool_bool (method_bind , self . this . sys () . as_ptr () , inherits . into () , path . into () , built_in_enabled , load_enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScriptCreateDialog { } unsafe impl GodotObject for ScriptCreateDialog { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScriptCreateDialog { type Target = crate :: generated :: confirmation_dialog :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScriptCreateDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: confirmation_dialog :: ConfirmationDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::script_create_dialog::ScriptCreateDialog;
            
            pub mod audio_bus_layout {
                use super::*;
                # [doc = "`core class AudioBusLayout` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioBusLayout" } } impl std :: ops :: Deref for AudioBusLayout { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioBusLayout { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioBusLayout { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioBusLayout { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioBusLayout { } impl Instanciable for AudioBusLayout { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_bus_layout::AudioBusLayout;
            
            pub mod accept_dialog {
                use super::*;
                # [doc = "`core class AcceptDialog` inherits `WindowDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [signal custom_action] signal when pressed.\nIf `true`, `right` will place the button to the right of any sibling buttons.\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 :: Button , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . add_button ; let ret = crate :: icalls :: icallptr_obj_str_bool_str (method_bind , self . this . sys () . as_ptr () , text . into () , right , action . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: button :: Button , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Adds a button with label `name` and a cancel action to the dialog and returns the created button."] # [doc = ""] # [inline] pub fn add_cancel (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: button :: Button , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . add_cancel ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: button :: Button , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 [signal 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] 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] 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the label used for built-in text."] # [doc = ""] # [inline] pub fn get_label (& self) -> Option < Ref < crate :: generated :: label :: Label , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: label :: Label , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the OK [Button] instance."] # [doc = ""] # [inline] pub fn get_ok (& self) -> Option < Ref < crate :: generated :: button :: Button , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_ok ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: button :: Button , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Registers a [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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . register_text_enter ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , line_edit . 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , autowrap) ; } } # [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 [signal 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] 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] 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AcceptDialog { type Target = crate :: generated :: window_dialog :: WindowDialog ; # [inline] fn deref (& self) -> & crate :: generated :: window_dialog :: WindowDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AcceptDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: window_dialog :: WindowDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for AcceptDialog { } impl Instanciable for AcceptDialog { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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 , 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_cancel = (gd_api . godot_method_bind_get_method) (class_name , "add_cancel\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\u{0}" . as_ptr () as * const c_char) ; table . get_ok = (gd_api . godot_method_bind_get_method) (class_name , "get_ok\u{0}" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\u{0}" . as_ptr () as * const c_char) ; table . has_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "has_autowrap\u{0}" . as_ptr () as * const c_char) ; table . register_text_enter = (gd_api . godot_method_bind_get_method) (class_name , "register_text_enter\u{0}" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::accept_dialog::AcceptDialog;
            
            pub mod check_button {
                use super::*;
                # [doc = "`core class CheckButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CheckButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CheckButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for CheckButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for CheckButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for CheckButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CheckButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for CheckButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for CheckButton { } impl Instanciable for CheckButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::check_button::CheckButton;
            
            pub mod plane_mesh {
                use super::*;
                # [doc = "`core class PlaneMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , subdivide) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , subdivide) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PlaneMesh { } unsafe impl GodotObject for PlaneMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PlaneMesh" } } impl std :: ops :: Deref for PlaneMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PlaneMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for PlaneMesh { } impl Instanciable for PlaneMesh { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\u{0}" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::plane_mesh::PlaneMesh;
            
            pub mod tool_button {
                use super::*;
                # [doc = "`core class ToolButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ToolButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ToolButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for ToolButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for ToolButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for ToolButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ToolButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for ToolButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for ToolButton { } impl Instanciable for ToolButton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::tool_button::ToolButton;
            
            pub mod pck_packer {
                use super::*;
                # [doc = "`core class PCKPacker` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , pck_path . into () , source_path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Writes the files specified using all [method 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 :: icallptr_i64_bool (method_bind , self . this . sys () . as_ptr () , verbose) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , pck_name . into () , alignment) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for PCKPacker { } unsafe impl GodotObject for PCKPacker { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PCKPacker" } } impl std :: ops :: Deref for PCKPacker { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PCKPacker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PCKPacker { } unsafe impl SubClass < crate :: generated :: object :: Object > for PCKPacker { } impl Instanciable for PCKPacker { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . flush = (gd_api . godot_method_bind_get_method) (class_name , "flush\u{0}" . as_ptr () as * const c_char) ; table . pck_start = (gd_api . godot_method_bind_get_method) (class_name , "pck_start\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::pck_packer::PCKPacker;
            
            pub mod back_buffer_copy {
                use super::*;
                # [doc = "`core class BackBufferCopy` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: back_buffer_copy :: CopyMode (ret) } } # [doc = "The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Buffer mode. See [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , copy_mode) ; } } # [doc = "The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant 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 :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BackBufferCopy { } unsafe impl GodotObject for BackBufferCopy { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BackBufferCopy { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BackBufferCopy { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: node :: Node > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: object :: Object > for BackBufferCopy { } impl Instanciable for BackBufferCopy { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\u{0}" . as_ptr () as * const c_char) ; table . set_copy_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_copy_mode\u{0}" . as_ptr () as * const c_char) ; table . set_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_rect\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::back_buffer_copy::BackBufferCopy;
            
            pub mod shape_2d {
                use super::*;
                # [doc = "`core class Shape2D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: shape_2d :: Shape2D > , shape_xform : Transform2D) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . collide ; let ret = crate :: icalls :: icallptr_bool_trans2D_obj_trans2D (method_bind , self . this . sys () . as_ptr () , local_xform , with_shape . as_arg_ptr () , shape_xform) ; ret as _ } } # [doc = "Returns a list of the points where this shape touches another. If there are no collisions the list is empty.\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 :: shape_2d :: 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 :: shape_2d :: 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 :: icallptr_bool_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) ; ret as _ } } # [doc = "Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty.\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 :: shape_2d :: 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] with the [VisualServer] API filled with the specified `color`. The exact drawing method is specific for each shape and cannot be configured."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , canvas_item , color) ; } } # [doc = "The shape's custom solver bias."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The shape's custom solver bias."] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape2D { } unsafe impl GodotObject for Shape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape2D" } } impl std :: ops :: Deref for Shape2D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shape2D { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . collide_with_motion = (gd_api . godot_method_bind_get_method) (class_name , "collide_with_motion\u{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\u{0}" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::shape_2d::Shape2D;
            
            pub mod visual_shader_node_global_expression {
                use super::*;
                # [doc = "`core class VisualShaderNodeGlobalExpression` inherits `VisualShaderNodeExpression` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGlobalExpression" } } impl std :: ops :: Deref for VisualShaderNodeGlobalExpression { type Target = crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGlobalExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeGlobalExpression { } impl Instanciable for VisualShaderNodeGlobalExpression { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_global_expression::VisualShaderNodeGlobalExpression;
            
            pub mod input_event_midi {
                use super::*;
                # [doc = "`core class InputEventMIDI` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , channel) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , controller_number) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , controller_value) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , instrument) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , message) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , pitch) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , pressure) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMIDI { } unsafe impl GodotObject for InputEventMIDI { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMIDI" } } impl std :: ops :: Deref for InputEventMIDI { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMIDI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMIDI { } impl Instanciable for InputEventMIDI { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_controller_number = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_number\u{0}" . as_ptr () as * const c_char) ; table . get_controller_value = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_value\u{0}" . as_ptr () as * const c_char) ; table . get_instrument = (gd_api . godot_method_bind_get_method) (class_name , "get_instrument\u{0}" . as_ptr () as * const c_char) ; table . get_message = (gd_api . godot_method_bind_get_method) (class_name , "get_message\u{0}" . as_ptr () as * const c_char) ; table . get_pitch = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch\u{0}" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\u{0}" . as_ptr () as * const c_char) ; table . get_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_velocity\u{0}" . as_ptr () as * const c_char) ; table . set_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_channel\u{0}" . as_ptr () as * const c_char) ; table . set_controller_number = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_number\u{0}" . as_ptr () as * const c_char) ; table . set_controller_value = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_value\u{0}" . as_ptr () as * const c_char) ; table . set_instrument = (gd_api . godot_method_bind_get_method) (class_name , "set_instrument\u{0}" . as_ptr () as * const c_char) ; table . set_message = (gd_api . godot_method_bind_get_method) (class_name , "set_message\u{0}" . as_ptr () as * const c_char) ; table . set_pitch = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch\u{0}" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\u{0}" . as_ptr () as * const c_char) ; table . set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_velocity\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_midi::InputEventMIDI;
            
            pub mod jni_singleton {
                use super::*;
                # [doc = "`core class JNISingleton` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JNISingleton" } } impl std :: ops :: Deref for JNISingleton { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JNISingleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for JNISingleton { } impl Instanciable for JNISingleton { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::jni_singleton::JNISingleton;
            
            pub mod visual_script_index_get {
                use super::*;
                # [doc = "`core class VisualScriptIndexGet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexGet" } } impl std :: ops :: Deref for VisualScriptIndexGet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIndexGet { } impl Instanciable for VisualScriptIndexGet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_script_index_get::VisualScriptIndexGet;
            
            pub mod spring_arm {
                use super::*;
                # [doc = "`core class SpringArm` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] object with the given [RID] to the list of [PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub 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 :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , RID) ; } } # [doc = "Clears the list of [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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] 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Removes the given [RID] from the list of [PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub 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 :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , RID) ; ret as _ } } # [doc = "The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [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] 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The [Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpringArm { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpringArm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SpringArm { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpringArm { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpringArm { } impl Instanciable for SpringArm { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_excluded_objects = (gd_api . godot_method_bind_get_method) (class_name , "clear_excluded_objects\u{0}" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\u{0}" . as_ptr () as * const c_char) ; table . get_hit_length = (gd_api . godot_method_bind_get_method) (class_name , "get_hit_length\u{0}" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\u{0}" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\u{0}" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\u{0}" . as_ptr () as * const c_char) ; table . remove_excluded_object = (gd_api . godot_method_bind_get_method) (class_name , "remove_excluded_object\u{0}" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{0}" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\u{0}" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::spring_arm::SpringArm;
            
            pub mod canvas_layer {
                use super::*;
                # [doc = "`core class CanvasLayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The custom [Viewport] node assigned to the [CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Scales the layer when using [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the layer to follow the viewport in order to simulate 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The custom [Viewport] node assigned to the [CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [doc = "Sets the layer to follow the viewport in order to simulate 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Scales the layer when using [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [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 :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [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 :: icallptr_void_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 :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasLayer { } unsafe impl GodotObject for CanvasLayer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CanvasLayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for CanvasLayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasLayer { } impl Instanciable for CanvasLayer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 is_following_viewport : * 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 } 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 , is_following_viewport : 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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_layer\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\u{0}" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\u{0}" . as_ptr () as * const c_char) ; table . is_following_viewport = (gd_api . godot_method_bind_get_method) (class_name , "is_following_viewport\u{0}" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\u{0}" . as_ptr () as * const c_char) ; table . set_follow_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_viewport\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_layer\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\u{0}" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\u{0}" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::canvas_layer::CanvasLayer;
            
            pub mod viewport {
                use super::*;
                # [doc = "`core class Viewport` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Viewport { pub const CLEAR_MODE_ALWAYS : i64 = 0i64 ; pub const CLEAR_MODE_NEVER : i64 = 1i64 ; pub const CLEAR_MODE_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const MSAA_16X : i64 = 4i64 ; pub const MSAA_2X : i64 = 1i64 ; pub const MSAA_4X : i64 = 2i64 ; pub const MSAA_8X : i64 = 3i64 ; pub const MSAA_DISABLED : i64 = 0i64 ; pub const RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const RENDER_INFO_MAX : i64 = 8i64 ; pub const RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1 : i64 = 1i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1024 : i64 = 6i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_16 : i64 = 3i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_256 : i64 = 5i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_4 : i64 = 2i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_64 : i64 = 4i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED : i64 = 0i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_MAX : i64 = 7i64 ; pub const UPDATE_ALWAYS : i64 = 3i64 ; pub const UPDATE_DISABLED : i64 = 0i64 ; pub const UPDATE_ONCE : i64 = 1i64 ; pub const UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const USAGE_2D : i64 = 0i64 ; pub const USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const USAGE_3D : i64 = 2i64 ; pub const USAGE_3D_NO_EFFECTS : i64 = 3i64 ; } 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 , thread_access :: 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 3D world of the viewport, or if none the world of the parent viewport."] # [doc = ""] # [inline] pub fn find_world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the 2D world of the viewport."] # [doc = ""] # [inline] pub fn find_world_2d (& self) -> Option < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world_2d ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the active 3D camera."] # [doc = ""] # [inline] pub fn get_camera (& self) -> Option < Ref < crate :: generated :: camera :: Camera , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_camera ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: camera :: Camera , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The canvas transform of the viewport, useful for changing the on-screen positions of all child [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: ClearMode (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: DebugDraw (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 16 bits, meaning it does not store the full range of a floating point number.\n**Note:** Requires [member usage] to be set to [constant USAGE_3D] or [constant USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the topmost modal in the stack."] # [doc = ""] # [inline] pub fn get_modal_stack_top (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_modal_stack_top ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the mouse position relative to the 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: Msaa (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , info) ; ret as _ } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , quadrant) ; crate :: generated :: viewport :: ShadowAtlasQuadrantSubdiv (ret) } } # [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, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The width and height of viewport."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the size override set with [method 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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] is flipped vertically. You can use [method Image.flip_y] on the result of [method 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 :: viewport_texture :: ViewportTexture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: viewport_texture :: ViewportTexture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: UpdateMode (ret) } } # [doc = "The rendering mode of viewport."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: Usage (ret) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the result of rendering will be flipped vertically."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the viewport's RID from the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The custom [World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The custom [World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn world_2d (& self) -> Option < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world_2d ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the drag data from the GUI, that was previously returned by [method 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 :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the viewport is currently performing a drag operation."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn input (& self , local_event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . input ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will not receive input event."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the size override is enabled. See [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will use [World] defined in `world` property."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [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 :: icallptr_void_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]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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , debug_draw) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "If `true`, the viewport will not receive input event."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 16 bits, meaning it does not store the full range of a floating point number.\n**Note:** Requires [member usage] to be set to [constant USAGE_3D] or [constant USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Stops the input from propagating further down the [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 :: icallptr_void (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."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , keep_3d_linear) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , msaa) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , quadrant , subdiv) ; } } # [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, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The width and height of viewport."] # [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 :: icallptr_void_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 :: icallptr_void_bool_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , enable , 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The rendering mode of viewport."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usage) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _use) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the viewport will use [World] defined in `world` property."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the result of rendering will be flipped vertically."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The custom [World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn set_world (& self , world : impl AsArg < crate :: generated :: world :: World >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , world . as_arg_ptr ()) ; } } # [doc = "The custom [World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn set_world_2d (& self , world_2d : impl AsArg < crate :: generated :: world_2d :: World2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world_2d ; let ret = crate :: icalls :: icallptr_void_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 :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . unhandled_input ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void (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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Warps the mouse to a position relative to the 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 :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Viewport { } unsafe impl GodotObject for Viewport { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Viewport { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Viewport { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Viewport { } unsafe impl SubClass < crate :: generated :: object :: Object > for Viewport { } impl Instanciable for Viewport { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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_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_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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . find_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "find_world_2d\u{0}" . as_ptr () as * const c_char) ; table . get_camera = (gd_api . godot_method_bind_get_method) (class_name , "get_camera\u{0}" . as_ptr () as * const c_char) ; table . get_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_transform\u{0}" . as_ptr () as * const c_char) ; table . get_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_clear_mode\u{0}" . as_ptr () as * const c_char) ; table . get_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_draw\u{0}" . as_ptr () as * const c_char) ; table . get_final_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_final_transform\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_hdr = (gd_api . godot_method_bind_get_method) (class_name , "get_hdr\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_position\u{0}" . as_ptr () as * const c_char) ; table . get_msaa = (gd_api . godot_method_bind_get_method) (class_name , "get_msaa\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_size_override = (gd_api . godot_method_bind_get_method) (class_name , "get_size_override\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_update_mode\u{0}" . as_ptr () as * const c_char) ; table . get_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_usage\u{0}" . as_ptr () as * const c_char) ; table . get_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "get_use_debanding\u{0}" . as_ptr () as * const c_char) ; table . get_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "get_use_fxaa\u{0}" . as_ptr () as * const c_char) ; table . get_vflip = (gd_api . godot_method_bind_get_method) (class_name , "get_vflip\u{0}" . as_ptr () as * const c_char) ; table . get_viewport_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_rid\u{0}" . as_ptr () as * const c_char) ; table . get_visible_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_rect\u{0}" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\u{0}" . as_ptr () as * const c_char) ; table . get_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_world_2d\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . gui_is_dragging = (gd_api . godot_method_bind_get_method) (class_name , "gui_is_dragging\u{0}" . as_ptr () as * const c_char) ; table . has_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "has_transparent_background\u{0}" . as_ptr () as * const c_char) ; table . input = (gd_api . godot_method_bind_get_method) (class_name , "input\u{0}" . as_ptr () as * const c_char) ; table . is_3d_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_3d_disabled\u{0}" . as_ptr () as * const c_char) ; table . is_audio_listener = (gd_api . godot_method_bind_get_method) (class_name , "is_audio_listener\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_input_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_disabled\u{0}" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_canvas_transform\u{0}" . as_ptr () as * const c_char) ; table . set_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_mode\u{0}" . as_ptr () as * const c_char) ; table . set_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_draw\u{0}" . as_ptr () as * const c_char) ; table . set_disable_3d = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_3d\u{0}" . as_ptr () as * const c_char) ; table . set_disable_input = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_input\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_hdr\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "set_msaa\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "set_transparent_background\u{0}" . as_ptr () as * const c_char) ; table . set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_update_mode\u{0}" . as_ptr () as * const c_char) ; table . set_usage = (gd_api . godot_method_bind_get_method) (class_name , "set_usage\u{0}" . as_ptr () as * const c_char) ; table . set_use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_arvr\u{0}" . as_ptr () as * const c_char) ; table . set_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "set_use_debanding\u{0}" . as_ptr () as * const c_char) ; table . set_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "set_use_fxaa\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "set_vflip\u{0}" . as_ptr () as * const c_char) ; table . set_world = (gd_api . godot_method_bind_get_method) (class_name , "set_world\u{0}" . as_ptr () as * const c_char) ; table . set_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_world_2d\u{0}" . as_ptr () as * const c_char) ; table . unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "unhandled_input\u{0}" . as_ptr () as * const c_char) ; table . update_worlds = (gd_api . godot_method_bind_get_method) (class_name , "update_worlds\u{0}" . as_ptr () as * const c_char) ; table . use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "use_arvr\u{0}" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::viewport::Viewport;
            
            pub mod audio_effect_phaser {
                use super::*;
                # [doc = "`core class AudioEffectPhaser` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fbk) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPhaser { } unsafe impl GodotObject for AudioEffectPhaser { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPhaser" } } impl std :: ops :: Deref for AudioEffectPhaser { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPhaser { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPhaser { } impl Instanciable for AudioEffectPhaser { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_feedback = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_rate_hz\u{0}" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\u{0}" . as_ptr () as * const c_char) ; table . set_feedback = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_rate_hz\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_phaser::AudioEffectPhaser;
            
            pub mod editor_scene_post_import {
                use super::*;
                # [doc = "`tools class EditorScenePostImport` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorScenePostImport { } unsafe impl GodotObject for EditorScenePostImport { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorScenePostImport" } } impl std :: ops :: Deref for EditorScenePostImport { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorScenePostImport { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorScenePostImport { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_source_folder = (gd_api . godot_method_bind_get_method) (class_name , "get_source_folder\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_scene_post_import::EditorScenePostImport;
            
            pub mod input_event_joypad_motion {
                use super::*;
                # [doc = "`core class InputEventJoypadMotion` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [enum 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 axis_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . get_axis_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Axis identifier. Use one of the [enum 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , axis_value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventJoypadMotion { } unsafe impl GodotObject for InputEventJoypadMotion { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventJoypadMotion" } } impl std :: ops :: Deref for InputEventJoypadMotion { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventJoypadMotion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventJoypadMotion { } impl Instanciable for InputEventJoypadMotion { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_value\u{0}" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\u{0}" . as_ptr () as * const c_char) ; table . set_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_value\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_event_joypad_motion::InputEventJoypadMotion;
            
            pub mod visual_script_type_cast {
                use super::*;
                # [doc = "`core class VisualScriptTypeCast` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_void_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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptTypeCast" } } impl std :: ops :: Deref for VisualScriptTypeCast { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptTypeCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptTypeCast { } impl Instanciable for VisualScriptTypeCast { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\u{0}" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\u{0}" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_type_cast::VisualScriptTypeCast;
            
            pub mod curve_3d {
                use super::*;
                # [doc = "`core class Curve3D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 to a curve at `position`, with control points `in` and `out`.\nIf `at_position` is given, the point is inserted before the point number `at_position`, moving that point (and every point after) after the inserted point. If `at_position` is not given, or is an illegal value (`at_position <0` or `at_position >= [method get_point_count]`), the point will be appended at the end of the point list.\n# Default Arguments\n* `in` - `Vector3( 0, 0, 0 )`\n* `out` - `Vector3( 0, 0, 0 )`\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector3 , _in : Vector3 , out : Vector3 , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_vec3_vec3_vec3_i64 (method_bind , self . this . sys () . as_ptr () , position , _in , out , at_position) ; } } # [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 :: icallptr_void (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 [method get_baked_points] or [method 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total length of the curve, based on the cached points. Given enough density (see [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the cache of points as a [PoolVector3Array]."] # [doc = ""] # [inline] pub fn get_baked_points (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_points ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Returns the cache of tilts as a [PoolRealArray]."] # [doc = ""] # [inline] pub fn get_baked_tilts (& self) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_tilts ; let ret = crate :: icalls :: icallptr_f32arr (method_bind , self . this . sys () . as_ptr ()) ; Float32Array :: from_sys (ret) } } # [doc = "Returns the cache of up vectors as a [PoolVector3Array].\nIf [member up_vector_enabled] is `false`, the cache will be empty."] # [doc = ""] # [inline] pub fn get_baked_up_vectors (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_up_vectors ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Returns the closest offset to `to_point`. This offset is meant to be used in [method interpolate_baked] or [method 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 :: icallptr_f64_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; ret as _ } } # [doc = "Returns the closest 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 :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (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 = Curve3DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns 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, 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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns 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, 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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_vec3_i64_f64 (method_bind , self . this . sys () . as_ptr () , idx , t) ; mem :: transmute (ret) } } # [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) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallptr_vec3_f64_bool (method_bind , self . this . sys () . as_ptr () , offset , cubic) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3_f64_bool (method_bind , self . this . sys () . as_ptr () , offset , apply_tilt) ; mem :: transmute (ret) } } # [doc = "Returns the position at the vertex `fofs`. It calls [method 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 :: icallptr_vec3_f64 (method_bind , self . this . sys () . as_ptr () , fofs) ; mem :: transmute (ret) } } # [doc = "If `true`, the curve will bake up vectors used for orientation. This is used when [member PathFollow.rotation_mode] is set to [constant 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [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."] # [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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx , 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."] # [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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx , 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], this tilt is an offset over the natural tilt the [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , idx , tilt) ; } } # [doc = "If `true`, the curve will bake up vectors used for orientation. This is used when [member PathFollow.rotation_mode] is set to [constant 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . tessellate ; let ret = crate :: icalls :: icallptr_vec3arr_i64_f64 (method_bind , self . this . sys () . as_ptr () , max_stages , tolerance_degrees) ; Vector3Array :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve3D { } unsafe impl GodotObject for Curve3D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve3D" } } impl std :: ops :: Deref for Curve3D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Curve3D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Curve3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Curve3D { } impl Instanciable for Curve3D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\u{0}" . as_ptr () as * const c_char) ; table . get_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_interval\u{0}" . as_ptr () as * const c_char) ; table . get_baked_length = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_length\u{0}" . as_ptr () as * const c_char) ; table . get_baked_points = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_points\u{0}" . as_ptr () as * const c_char) ; table . get_baked_tilts = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_tilts\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_closest_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_offset\u{0}" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . get_point_in = (gd_api . godot_method_bind_get_method) (class_name , "get_point_in\u{0}" . as_ptr () as * const c_char) ; table . get_point_out = (gd_api . godot_method_bind_get_method) (class_name , "get_point_out\u{0}" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\u{0}" . as_ptr () as * const c_char) ; table . get_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_point_tilt\u{0}" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\u{0}" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\u{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\u{0}" . as_ptr () as * const c_char) ; table . interpolatef = (gd_api . godot_method_bind_get_method) (class_name , "interpolatef\u{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\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . set_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_interval\u{0}" . as_ptr () as * const c_char) ; table . set_point_in = (gd_api . godot_method_bind_get_method) (class_name , "set_point_in\u{0}" . as_ptr () as * const c_char) ; table . set_point_out = (gd_api . godot_method_bind_get_method) (class_name , "set_point_out\u{0}" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\u{0}" . as_ptr () as * const c_char) ; table . set_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_point_tilt\u{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\u{0}" . as_ptr () as * const c_char) ; table . tessellate = (gd_api . godot_method_bind_get_method) (class_name , "tessellate\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::curve_3d::Curve3D;
            
            pub mod mesh_instance_2d {
                use super::*;
                # [doc = "`core class MeshInstance2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] that will be drawn by the [MeshInstance2D]."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Mesh] that will be drawn by the [MeshInstance2D]."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_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].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] 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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MeshInstance2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshInstance2D { } impl Instanciable for MeshInstance2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\u{0}" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh_instance_2d::MeshInstance2D;
            
            pub mod random_number_generator {
                use super::*;
                # [doc = "`core class RandomNumberGenerator` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = "The seed used by the random number generator. 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."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , from , to) ; ret as _ } } # [doc = "Generates a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] 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 :: icallptr_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , mean , deviation) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; ret as _ } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The seed used by the random number generator. 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."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , seed) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , state) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RandomNumberGenerator { } unsafe impl GodotObject for RandomNumberGenerator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RandomNumberGenerator" } } impl std :: ops :: Deref for RandomNumberGenerator { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RandomNumberGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RandomNumberGenerator { } unsafe impl SubClass < crate :: generated :: object :: Object > for RandomNumberGenerator { } impl Instanciable for RandomNumberGenerator { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_state = (gd_api . godot_method_bind_get_method) (class_name , "get_state\u{0}" . as_ptr () as * const c_char) ; table . randf = (gd_api . godot_method_bind_get_method) (class_name , "randf\u{0}" . as_ptr () as * const c_char) ; table . randf_range = (gd_api . godot_method_bind_get_method) (class_name , "randf_range\u{0}" . as_ptr () as * const c_char) ; table . randfn = (gd_api . godot_method_bind_get_method) (class_name , "randfn\u{0}" . as_ptr () as * const c_char) ; table . randi = (gd_api . godot_method_bind_get_method) (class_name , "randi\u{0}" . as_ptr () as * const c_char) ; table . randi_range = (gd_api . godot_method_bind_get_method) (class_name , "randi_range\u{0}" . as_ptr () as * const c_char) ; table . randomize = (gd_api . godot_method_bind_get_method) (class_name , "randomize\u{0}" . as_ptr () as * const c_char) ; table . set_seed = (gd_api . godot_method_bind_get_method) (class_name , "set_seed\u{0}" . as_ptr () as * const c_char) ; table . set_state = (gd_api . godot_method_bind_get_method) (class_name , "set_state\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::random_number_generator::RandomNumberGenerator;
            
            pub mod visual_shader_node_transform_compose {
                use super::*;
                # [doc = "`core class VisualShaderNodeTransformCompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformCompose" } } impl std :: ops :: Deref for VisualShaderNodeTransformCompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformCompose { } impl Instanciable for VisualShaderNodeTransformCompose { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_transform_compose::VisualShaderNodeTransformCompose;
            
            pub mod height_map_shape {
                use super::*;
                # [doc = "`core class HeightMapShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [member map_width] * [member map_depth] size."] # [doc = ""] # [inline] pub fn map_data (& self) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . get_map_data ; let ret = crate :: icalls :: icallptr_f32arr (method_bind , self . this . sys () . as_ptr ()) ; Float32Array :: from_sys (ret) } } # [doc = "Depth of the height map data. Changing this will resize the [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Width of the height map data. Changing this will resize the [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Height map data, pool array must be of [member map_width] * [member map_depth] size."] # [doc = ""] # [inline] pub fn set_map_data (& self , data : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . set_map_data ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Depth of the height map data. Changing this will resize the [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "Width of the height map data. Changing this will resize the [member 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HeightMapShape { } unsafe impl GodotObject for HeightMapShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HeightMapShape" } } impl std :: ops :: Deref for HeightMapShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HeightMapShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for HeightMapShape { } impl Instanciable for HeightMapShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_map_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_map_depth\u{0}" . as_ptr () as * const c_char) ; table . get_map_width = (gd_api . godot_method_bind_get_method) (class_name , "get_map_width\u{0}" . as_ptr () as * const c_char) ; table . set_map_data = (gd_api . godot_method_bind_get_method) (class_name , "set_map_data\u{0}" . as_ptr () as * const c_char) ; table . set_map_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_map_depth\u{0}" . as_ptr () as * const c_char) ; table . set_map_width = (gd_api . godot_method_bind_get_method) (class_name , "set_map_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::height_map_shape::HeightMapShape;
            
            pub mod joint {
                use super::*;
                # [doc = "`core class Joint` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Joint { } unsafe impl GodotObject for Joint { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Joint { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Joint { } unsafe impl SubClass < crate :: generated :: node :: Node > for Joint { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\u{0}" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\u{0}" . as_ptr () as * const c_char) ; table . get_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_solver_priority\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\u{0}" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\u{0}" . as_ptr () as * const c_char) ; table . set_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_solver_priority\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::joint::Joint;
            
            pub mod scene_state {
                use super::*;
                # [doc = "`core class SceneState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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) ; } 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 } } # [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 ; } 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) ; < 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the list of group names associated with the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_groups (& self , idx : i64) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_groups ; let ret = crate :: icalls :: icallptr_strarr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns a [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 :: packed_scene :: PackedScene , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packed_scene :: PackedScene , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path to the represented scene file if the node at `idx` is an [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_nodepath_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , for_parent) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [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 :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_var_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the node at `idx` is an [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneState { } unsafe impl GodotObject for SceneState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneState" } } impl std :: ops :: Deref for SceneState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SceneState { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_connection_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_count\u{0}" . as_ptr () as * const c_char) ; table . get_connection_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_flags\u{0}" . as_ptr () as * const c_char) ; table . get_connection_method = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_method\u{0}" . as_ptr () as * const c_char) ; table . get_connection_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_signal\u{0}" . as_ptr () as * const c_char) ; table . get_connection_source = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_source\u{0}" . as_ptr () as * const c_char) ; table . get_connection_target = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_target\u{0}" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\u{0}" . as_ptr () as * const c_char) ; table . get_node_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_node_groups\u{0}" . as_ptr () as * const c_char) ; table . get_node_index = (gd_api . godot_method_bind_get_method) (class_name , "get_node_index\u{0}" . as_ptr () as * const c_char) ; table . get_node_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::scene_state::SceneState;
            
            pub mod visual_shader_node_vector_scalar_step {
                use super::*;
                # [doc = "`core class VisualShaderNodeVectorScalarStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarStep { } impl Instanciable for VisualShaderNodeVectorScalarStep { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::visual_shader_node_vector_scalar_step::VisualShaderNodeVectorScalarStep;
            
            pub mod viewport_texture {
                use super::*;
                # [doc = "`core class ViewportTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The path to the [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ViewportTexture" } } impl std :: ops :: Deref for ViewportTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ViewportTexture { } impl Instanciable for ViewportTexture { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::viewport_texture::ViewportTexture;
            
            pub mod ray_shape {
                use super::*;
                # [doc = "`core class RayShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayShape { } unsafe impl GodotObject for RayShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RayShape" } } impl std :: ops :: Deref for RayShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for RayShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RayShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RayShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayShape { } impl Instanciable for RayShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::ray_shape::RayShape;
            
            pub mod gradient {
                use super::*;
                # [doc = "`core class Gradient` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_f64_color (method_bind , self . this . sys () . as_ptr () , offset , 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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = "Gradient's colors returned as a [PoolColorArray]."] # [doc = ""] # [inline] pub fn colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = "Gradient's offsets returned as a [PoolRealArray]."] # [doc = ""] # [inline] pub fn offsets (& self) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_offsets ; let ret = crate :: icalls :: icallptr_f32arr (method_bind , self . this . sys () . as_ptr ()) ; Float32Array :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_color_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; mem :: transmute (ret) } } # [doc = "Removes the color at the index `offset`."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , point , color) ; } } # [doc = "Gradient's colors returned as a [PoolColorArray]."] # [doc = ""] # [inline] pub fn set_colors (& self , colors : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , colors) ; } } # [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 :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , point , offset) ; } } # [doc = "Gradient's offsets returned as a [PoolRealArray]."] # [doc = ""] # [inline] pub fn set_offsets (& self , offsets : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_offsets ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , offsets) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Gradient { } unsafe impl GodotObject for Gradient { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Gradient" } } impl std :: ops :: Deref for Gradient { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Gradient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Gradient { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Gradient { } unsafe impl SubClass < crate :: generated :: object :: Object > for Gradient { } impl Instanciable for Gradient { # [inline] fn construct () -> Ref < Self , thread_access :: 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_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_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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\u{0}" . as_ptr () as * const c_char) ; table . get_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_colors\u{0}" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\u{0}" . as_ptr () as * const c_char) ; table . get_offsets = (gd_api . godot_method_bind_get_method) (class_name , "get_offsets\u{0}" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\u{0}" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\u{0}" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\u{0}" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\u{0}" . as_ptr () as * const c_char) ; table . set_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_colors\u{0}" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\u{0}" . as_ptr () as * const c_char) ; table . set_offsets = (gd_api . godot_method_bind_get_method) (class_name , "set_offsets\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::gradient::Gradient;
            
            pub mod http_request {
                use super::*;
                # [doc = "`core class HTTPRequest` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HTTPRequest { pub const RESULT_BODY_SIZE_LIMIT_EXCEEDED : i64 = 7i64 ; pub const RESULT_CANT_CONNECT : i64 = 2i64 ; pub const RESULT_CANT_RESOLVE : i64 = 3i64 ; pub const RESULT_CHUNKED_BODY_SIZE_MISMATCH : i64 = 1i64 ; pub const RESULT_CONNECTION_ERROR : i64 = 4i64 ; pub const RESULT_DOWNLOAD_FILE_CANT_OPEN : i64 = 9i64 ; pub const RESULT_DOWNLOAD_FILE_WRITE_ERROR : i64 = 10i64 ; pub const RESULT_NO_RESPONSE : i64 = 6i64 ; pub const RESULT_REDIRECT_LIMIT_REACHED : i64 = 11i64 ; pub const RESULT_REQUEST_FAILED : i64 = 8i64 ; pub const RESULT_SSL_HANDSHAKE_ERROR : i64 = 5i64 ; pub const RESULT_SUCCESS : i64 = 0i64 ; 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 , thread_access :: 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 :: icallptr_void (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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum allowed size for response bodies."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size].\nSet this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The file to download into. Will output any received file into it."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current status of the underlying [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: http_client :: Status (ret) } } # [doc = "Maximum number of allowed redirects."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn timeout (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_timeout ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].\nReturns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.\n**Note:** The `request_data` parameter is ignored if `method` is [constant 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 [method String.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 : StringArray , 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 :: icallptr_i64_str_strarr_bool_i64_str (method_bind , self . this . sys () . as_ptr () , url . into () , custom_headers , ssl_validate_domain , method , request_data . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Maximum allowed size for response bodies."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size].\nSet this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory."] # [doc = ""] # [inline] pub fn set_download_chunk_size (& self , arg0 : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_download_chunk_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "The file to download into. Will output any received file into it."] # [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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Maximum number of allowed redirects."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_timeout (& self , timeout : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_timeout ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , timeout) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HTTPRequest { } unsafe impl GodotObject for HTTPRequest { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HTTPRequest { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HTTPRequest { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for HTTPRequest { } unsafe impl SubClass < crate :: generated :: object :: Object > for HTTPRequest { } impl Instanciable for HTTPRequest { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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 , 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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_body_size = (gd_api . godot_method_bind_get_method) (class_name , "get_body_size\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_download_file = (gd_api . godot_method_bind_get_method) (class_name , "get_download_file\u{0}" . as_ptr () as * const c_char) ; table . get_downloaded_bytes = (gd_api . godot_method_bind_get_method) (class_name , "get_downloaded_bytes\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_max_redirects = (gd_api . godot_method_bind_get_method) (class_name , "get_max_redirects\u{0}" . as_ptr () as * const c_char) ; table . get_timeout = (gd_api . godot_method_bind_get_method) (class_name , "get_timeout\u{0}" . as_ptr () as * const c_char) ; table . is_using_threads = (gd_api . godot_method_bind_get_method) (class_name , "is_using_threads\u{0}" . as_ptr () as * const c_char) ; table . request = (gd_api . godot_method_bind_get_method) (class_name , "request\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_download_file = (gd_api . godot_method_bind_get_method) (class_name , "set_download_file\u{0}" . as_ptr () as * const c_char) ; table . set_max_redirects = (gd_api . godot_method_bind_get_method) (class_name , "set_max_redirects\u{0}" . as_ptr () as * const c_char) ; table . set_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_timeout\u{0}" . as_ptr () as * const c_char) ; table . set_use_threads = (gd_api . godot_method_bind_get_method) (class_name , "set_use_threads\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::http_request::HTTPRequest;
            
            pub mod editor_feature_profile {
                use super::*;
                # [doc = "`tools class EditorFeatureProfile` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorFeatureProfile { pub const FEATURE_3D : i64 = 0i64 ; pub const FEATURE_ASSET_LIB : i64 = 2i64 ; pub const FEATURE_FILESYSTEM_DOCK : i64 = 5i64 ; pub const FEATURE_IMPORT_DOCK : i64 = 6i64 ; pub const FEATURE_MAX : i64 = 7i64 ; pub const FEATURE_NODE_DOCK : i64 = 4i64 ; pub const FEATURE_SCENE_TREE : i64 = 3i64 ; pub const FEATURE_SCRIPT : i64 = 1i64 ; } 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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , feature) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class_name . into () , property . into ()) ; ret as _ } } # [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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , feature) ; ret as _ } } # [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 [method 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 [method load_from_file] button."] # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , disable) ; } } # [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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , disable) ; } } # [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 :: icallptr_void_str_str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , property . into () , disable) ; } } # [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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , feature , disable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFeatureProfile { } unsafe impl GodotObject for EditorFeatureProfile { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorFeatureProfile" } } impl std :: ops :: Deref for EditorFeatureProfile { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFeatureProfile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorFeatureProfile { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_class_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_disabled\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_feature_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_feature_disabled\u{0}" . as_ptr () as * const c_char) ; table . load_from_file = (gd_api . godot_method_bind_get_method) (class_name , "load_from_file\u{0}" . as_ptr () as * const c_char) ; table . save_to_file = (gd_api . godot_method_bind_get_method) (class_name , "save_to_file\u{0}" . as_ptr () as * const c_char) ; table . set_disable_class = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_class\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_disable_feature = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_feature\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_feature_profile::EditorFeatureProfile;
            
            pub mod visual_shader_node_uniform_ref {
                use super::*;
                # [doc = "`core class VisualShaderNodeUniformRef` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeUniformRef" } } impl std :: ops :: Deref for VisualShaderNodeUniformRef { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeUniformRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeUniformRef { } impl Instanciable for VisualShaderNodeUniformRef { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "set_uniform_name\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_shader_node_uniform_ref::VisualShaderNodeUniformRef;
            
            pub mod mobile_vr_interface {
                use super::*;
                # [doc = "`core class MobileVRInterface` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , display_to_lens) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , display_width) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , eye_height) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , iod) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , k) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , k) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , oversample) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MobileVRInterface { } unsafe impl GodotObject for MobileVRInterface { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MobileVRInterface" } } impl std :: ops :: Deref for MobileVRInterface { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MobileVRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for MobileVRInterface { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MobileVRInterface { } unsafe impl SubClass < crate :: generated :: object :: Object > for MobileVRInterface { } impl Instanciable for MobileVRInterface { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_display_width = (gd_api . godot_method_bind_get_method) (class_name , "get_display_width\u{0}" . as_ptr () as * const c_char) ; table . get_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "get_eye_height\u{0}" . as_ptr () as * const c_char) ; table . get_iod = (gd_api . godot_method_bind_get_method) (class_name , "get_iod\u{0}" . as_ptr () as * const c_char) ; table . get_k1 = (gd_api . godot_method_bind_get_method) (class_name , "get_k1\u{0}" . as_ptr () as * const c_char) ; table . get_k2 = (gd_api . godot_method_bind_get_method) (class_name , "get_k2\u{0}" . as_ptr () as * const c_char) ; table . get_oversample = (gd_api . godot_method_bind_get_method) (class_name , "get_oversample\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_display_width = (gd_api . godot_method_bind_get_method) (class_name , "set_display_width\u{0}" . as_ptr () as * const c_char) ; table . set_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "set_eye_height\u{0}" . as_ptr () as * const c_char) ; table . set_iod = (gd_api . godot_method_bind_get_method) (class_name , "set_iod\u{0}" . as_ptr () as * const c_char) ; table . set_k1 = (gd_api . godot_method_bind_get_method) (class_name , "set_k1\u{0}" . as_ptr () as * const c_char) ; table . set_k2 = (gd_api . godot_method_bind_get_method) (class_name , "set_k2\u{0}" . as_ptr () as * const c_char) ; table . set_oversample = (gd_api . godot_method_bind_get_method) (class_name , "set_oversample\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mobile_vr_interface::MobileVRInterface;
            
            pub mod plugin_script {
                use super::*;
                # [doc = "`core class PluginScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PluginScript" } } impl std :: ops :: Deref for PluginScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PluginScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for PluginScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PluginScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PluginScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for PluginScript { } impl Instanciable for PluginScript { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::plugin_script::PluginScript;
            
            pub mod spatial_velocity_tracker {
                use super::*;
                # [doc = "`core class SpatialVelocityTracker` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpatialVelocityTracker { } unsafe impl GodotObject for SpatialVelocityTracker { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialVelocityTracker" } } impl std :: ops :: Deref for SpatialVelocityTracker { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialVelocityTracker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpatialVelocityTracker { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpatialVelocityTracker { } impl Instanciable for SpatialVelocityTracker { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\u{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\u{0}" . as_ptr () as * const c_char) ; table . update_position = (gd_api . godot_method_bind_get_method) (class_name , "update_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::spatial_velocity_tracker::SpatialVelocityTracker;
            
            pub mod visual_script_local_var_set {
                use super::*;
                # [doc = "`core class VisualScriptLocalVarSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVarSet { } unsafe impl GodotObject for VisualScriptLocalVarSet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVarSet" } } impl std :: ops :: Deref for VisualScriptLocalVarSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVarSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVarSet { } impl Instanciable for VisualScriptLocalVarSet { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\u{0}" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\u{0}" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_local_var_set::VisualScriptLocalVarSet;
            
            pub mod skin {
                use super::*;
                # [doc = "`core class Skin` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone , 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 :: icallptr_void (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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bind_index) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bind_index) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bind_index) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , bind_index , bone) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bind_count) ; } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , bind_index , 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 :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bind_index , pose) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Skin { } unsafe impl GodotObject for Skin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Skin" } } impl std :: ops :: Deref for Skin { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Skin { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Skin { } unsafe impl SubClass < crate :: generated :: object :: Object > for Skin { } impl Instanciable for Skin { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_binds = (gd_api . godot_method_bind_get_method) (class_name , "clear_binds\u{0}" . as_ptr () as * const c_char) ; table . get_bind_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_bone\u{0}" . as_ptr () as * const c_char) ; table . get_bind_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_count\u{0}" . as_ptr () as * const c_char) ; table . get_bind_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_name\u{0}" . as_ptr () as * const c_char) ; table . get_bind_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_pose\u{0}" . as_ptr () as * const c_char) ; table . set_bind_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_bone\u{0}" . as_ptr () as * const c_char) ; table . set_bind_count = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_count\u{0}" . as_ptr () as * const c_char) ; table . set_bind_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_name\u{0}" . as_ptr () as * const c_char) ; table . set_bind_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_pose\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::skin::Skin;
            
            pub mod graph_edit {
                use super::*;
                # [doc = "`core class GraphEdit` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type , to_type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [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 :: icallptr_void (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 :: icallptr_i64_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port , to . into () , to_port) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port , to . into () , to_port) ; } } # [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 = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph.\nWarning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead."] # [doc = ""] # [inline] pub fn get_zoom_hbox (& self) -> Option < Ref < crate :: generated :: hbox_container :: HBoxContainer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom_hbox ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: hbox_container :: HBoxContainer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port , to . into () , to_port) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type , to_type) ; ret as _ } } # [doc = "Makes it not possible to connect between two different slot types. The type is defined with the [method 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 :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type , to_type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [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 :: icallptr_void_str_i64_str_i64_f64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port , to . into () , to_port , amount) ; } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , p_opacity) ; } } # [doc = ""] # [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_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 :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_selected ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , pixels) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , p_zoom) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GraphEdit { } unsafe impl GodotObject for GraphEdit { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GraphEdit { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GraphEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for GraphEdit { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GraphEdit { } unsafe impl SubClass < crate :: generated :: node :: Node > for GraphEdit { } unsafe impl SubClass < crate :: generated :: object :: Object > for GraphEdit { } impl Instanciable for GraphEdit { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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_snap : * mut sys :: godot_method_bind , pub set_use_snap : * mut sys :: godot_method_bind , pub set_zoom : * 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 , 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_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_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 } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = 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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . clear_connections = (gd_api . godot_method_bind_get_method) (class_name , "clear_connections\u{0}" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\u{0}" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\u{0}" . as_ptr () as * const c_char) ; table . get_connection_list = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_list\u{0}" . as_ptr () as * const c_char) ; table . get_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_opacity\u{0}" . as_ptr () as * const c_char) ; table . get_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_size\u{0}" . as_ptr () as * const c_char) ; table . get_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_ofs\u{0}" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\u{0}" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\u{0}" . as_ptr () as * const c_char) ; table . get_zoom_hbox = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_hbox\u{0}" . as_ptr () as * const c_char) ; table . is_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_minimap_enabled\u{0}" . as_ptr () as * const c_char) ; table . is_node_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_node_connected\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_using_snap = (gd_api . godot_method_bind_get_method) (class_name , "is_using_snap\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_connection_activity = (gd_api . godot_method_bind_get_method) (class_name , "set_connection_activity\u{0}" . as_ptr () as * const c_char) ; table . set_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_opacity\u{0}" . as_ptr () as * const c_char) ; table . set_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_size\u{0}" . as_ptr () as * const c_char) ; table . set_right_disconnects = (gd_api . godot_method_bind_get_method) (class_name , "set_right_disconnects\u{0}" . as_ptr () as * const c_char) ; table . set_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_ofs\u{0}" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\u{0}" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\u{0}" . as_ptr () as * const c_char) ; table . set_use_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_use_snap\u{0}" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::graph_edit::GraphEdit;
            
            pub mod resource {
                use super::*;
                # [doc = "`core class Resource` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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. By 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# Default Arguments\n* `subresources` - `false`"] # [doc = ""] # [inline] pub fn duplicate (& self , subresources : bool) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallptr_obj_bool (method_bind , self . this . sys () . as_ptr () , subresources) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If [member resource_local_to_scene] is enabled and the resource was loaded from a [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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_local_scene ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The name of the resource. This is an optional identifier."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (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 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The name of the resource. This is an optional identifier."] # [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 :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script.\nFor most resources, this method performs no base logic. [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 :: icallptr_void (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 [member 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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Resource" } } impl std :: ops :: Deref for Resource { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Resource { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Resource { } unsafe impl SubClass < crate :: generated :: object :: Object > for Resource { } impl Instanciable for Resource { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\u{0}" . as_ptr () as * const c_char) ; table . get_local_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_local_scene\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\u{0}" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\u{0}" . as_ptr () as * const c_char) ; table . set_path = (gd_api . godot_method_bind_get_method) (class_name , "set_path\u{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\u{0}" . as_ptr () as * const c_char) ; table . take_over_path = (gd_api . godot_method_bind_get_method) (class_name , "take_over_path\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::resource::Resource;
            
            pub mod audio_effect_eq6 {
                use super::*;
                # [doc = "`core class AudioEffectEQ6` inherits `AudioEffectEQ` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ6" } } impl std :: ops :: Deref for AudioEffectEQ6 { type Target = crate :: generated :: audio_effect_eq :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ6 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_eq :: AudioEffectEQ > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ6 { } impl Instanciable for AudioEffectEQ6 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_eq6::AudioEffectEQ6;
            
            pub mod navigation_mesh_instance {
                use super::*;
                # [doc = "`core class NavigationMeshInstance` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [doc = ""] # [inline] pub fn navigation_mesh (& self) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_navigation_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_navigation_mesh (& self , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_navigation_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , navmesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMeshInstance { } unsafe impl GodotObject for NavigationMeshInstance { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NavigationMeshInstance { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationMeshInstance { } impl Instanciable for NavigationMeshInstance { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NavigationMeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_navigation_mesh : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_navigation_mesh : * mut sys :: godot_method_bind } impl NavigationMeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshInstanceMethodTable = NavigationMeshInstanceMethodTable { class_constructor : None , get_navigation_mesh : 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_navigation_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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_mesh\u{0}" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\u{0}" . as_ptr () as * const c_char) ; table . set_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_mesh\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::navigation_mesh_instance::NavigationMeshInstance;
            
            pub mod visual_script_global_constant {
                use super::*;
                # [doc = "`core class VisualScriptGlobalConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptGlobalConstant { } unsafe impl GodotObject for VisualScriptGlobalConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptGlobalConstant" } } impl std :: ops :: Deref for VisualScriptGlobalConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptGlobalConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptGlobalConstant { } impl Instanciable for VisualScriptGlobalConstant { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_global_constant\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_global_constant::VisualScriptGlobalConstant;
            
            pub mod audio_effect_reverb {
                use super::*;
                # [doc = "`core class AudioEffectReverb` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 hpf (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_hpf ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret 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 wet (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_wet ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , feedback) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , msec) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectReverb { } unsafe impl GodotObject for AudioEffectReverb { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectReverb" } } impl std :: ops :: Deref for AudioEffectReverb { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectReverb { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectReverb { } impl Instanciable for AudioEffectReverb { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\u{0}" . as_ptr () as * const c_char) ; table . get_hpf = (gd_api . godot_method_bind_get_method) (class_name , "get_hpf\u{0}" . as_ptr () as * const c_char) ; table . get_predelay_feedback = (gd_api . godot_method_bind_get_method) (class_name , "get_predelay_feedback\u{0}" . as_ptr () as * const c_char) ; table . get_predelay_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_predelay_msec\u{0}" . as_ptr () as * const c_char) ; table . get_room_size = (gd_api . godot_method_bind_get_method) (class_name , "get_room_size\u{0}" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\u{0}" . as_ptr () as * const c_char) ; table . get_wet = (gd_api . godot_method_bind_get_method) (class_name , "get_wet\u{0}" . as_ptr () as * const c_char) ; table . set_damping = (gd_api . godot_method_bind_get_method) (class_name , "set_damping\u{0}" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\u{0}" . as_ptr () as * const c_char) ; table . set_hpf = (gd_api . godot_method_bind_get_method) (class_name , "set_hpf\u{0}" . as_ptr () as * const c_char) ; table . set_predelay_feedback = (gd_api . godot_method_bind_get_method) (class_name , "set_predelay_feedback\u{0}" . as_ptr () as * const c_char) ; table . set_predelay_msec = (gd_api . godot_method_bind_get_method) (class_name , "set_predelay_msec\u{0}" . as_ptr () as * const c_char) ; table . set_room_size = (gd_api . godot_method_bind_get_method) (class_name , "set_room_size\u{0}" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\u{0}" . as_ptr () as * const c_char) ; table . set_wet = (gd_api . godot_method_bind_get_method) (class_name , "set_wet\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::audio_effect_reverb::AudioEffectReverb;
            
            pub mod circle_shape_2d {
                use super::*;
                # [doc = "`core class CircleShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CircleShape2D { } unsafe impl GodotObject for CircleShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CircleShape2D" } } impl std :: ops :: Deref for CircleShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CircleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CircleShape2D { } impl Instanciable for CircleShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::circle_shape_2d::CircleShape2D;
            
            pub mod arvr_controller {
                use super::*;
                # [doc = "`core class ARVRController` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: arvr_positional_tracker :: TrackerHand (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; ret as _ } } # [doc = "Returns the ID of the joystick object bound to this. Every controller tracked by the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If provided by the [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 :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The degree to which the controller vibrates. Ranges from `0.0` to `1.0` with precision `.01`. If changed, updates [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the button at index `button` is pressed. See [enum 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 :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , button) ; ret as _ } } # [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] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , controller_id) ; } } # [doc = "The degree to which the controller vibrates. Ranges from `0.0` to `1.0` with precision `.01`. If changed, updates [member 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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rumble) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRController { } unsafe impl GodotObject for ARVRController { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVRController { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRController { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVRController { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVRController { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRController { } impl Instanciable for ARVRController { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_controller_name = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_name\u{0}" . as_ptr () as * const c_char) ; table . get_hand = (gd_api . godot_method_bind_get_method) (class_name , "get_hand\u{0}" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\u{0}" . as_ptr () as * const c_char) ; table . get_joystick_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joystick_axis\u{0}" . as_ptr () as * const c_char) ; table . get_joystick_id = (gd_api . godot_method_bind_get_method) (class_name , "get_joystick_id\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_rumble = (gd_api . godot_method_bind_get_method) (class_name , "get_rumble\u{0}" . as_ptr () as * const c_char) ; table . is_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_button_pressed\u{0}" . as_ptr () as * const c_char) ; table . set_controller_id = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_id\u{0}" . as_ptr () as * const c_char) ; table . set_rumble = (gd_api . godot_method_bind_get_method) (class_name , "set_rumble\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_controller::ARVRController;
            
            pub mod convex_polygon_shape {
                use super::*;
                # [doc = "`core class ConvexPolygonShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "The list of 3D points forming the convex polygon shape."] # [doc = ""] # [inline] pub fn set_points (& self , points : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape { } unsafe impl GodotObject for ConvexPolygonShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape" } } impl std :: ops :: Deref for ConvexPolygonShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConvexPolygonShape { } impl Instanciable for ConvexPolygonShape { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::convex_polygon_shape::ConvexPolygonShape;
            
            pub mod camera {
                use super::*;
                # [doc = "`core class Camera` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Camera { pub const DOPPLER_TRACKING_DISABLED : i64 = 0i64 ; pub const DOPPLER_TRACKING_IDLE_STEP : i64 = 1i64 ; pub const DOPPLER_TRACKING_PHYSICS_STEP : i64 = 2i64 ; pub const KEEP_HEIGHT : i64 = 1i64 ; pub const KEEP_WIDTH : i64 = 0i64 ; pub const PROJECTION_FRUSTUM : i64 = 2i64 ; pub const PROJECTION_ORTHOGONAL : i64 = 1i64 ; pub const PROJECTION_PERSPECTIVE : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable_next) ; } } # [doc = "Returns the camera's RID from the [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 :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Gets the camera transform. Subclassed cameras such as [InterpolatedCamera] may provide different transforms than the [Node] transform."] # [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 :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the given `layer` in the [member 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 :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; ret as _ } } # [doc = "If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular `_process` methods. See [enum DopplerTracking] for possible values."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera :: DopplerTracking (ret) } } # [doc = "The [Environment] to use for this camera."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, `fov` sets the other axis' field of view angle."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member 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 [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]."] # [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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera :: KeepAspect (ret) } } # [doc = "The camera's projection mode. In [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera :: Projection (ret) } } # [doc = "The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, `size` sets the other axis' size length."] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the ancestor [Viewport] is currently using this camera."] # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool_vec3 (method_bind , self . this . sys () . as_ptr () , world_point) ; ret as _ } } # [doc = "Makes this camera the current camera for the [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 :: icallptr_void (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 :: icallptr_vec3_vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; mem :: transmute (ret) } } # [doc = "Returns the 3D point in worldspace that maps to the given 2D coordinate in the [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 :: icallptr_vec3_vec2_f64 (method_bind , self . this . sys () . as_ptr () , screen_point , z_depth) ; mem :: transmute (ret) } } # [doc = "Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the 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 :: icallptr_vec3_vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; mem :: transmute (ret) } } # [doc = "Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the 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 :: icallptr_vec3_vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Enables or disables the given `layer` in the [member 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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , layer , enable) ; } } # [doc = "If `true`, the ancestor [Viewport] is currently using this camera."] # [doc = ""] # [inline] pub fn set_current (& self , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_current ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular `_process` methods. See [enum DopplerTracking] for possible values."] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The [Environment] to use for this camera."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_void_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 [member keep_aspect] locks one axis, `fov` sets the other axis' field of view angle."] # [doc = ""] # [inline] pub fn set_fov (& self , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_fov ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a `size`, an `offset`, and the `z_near` and `z_far` clip planes in world-space units."] # [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 :: icallptr_void_f64_vec2_f64_f64 (method_bind , self . this . sys () . as_ptr () , size , offset , z_near , z_far) ; } } # [doc = "The camera's frustum offset. This can be changed from the default to create \"tilted frustum\" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]."] # [doc = ""] # [inline] pub fn set_frustum_offset (& self , arg0 : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_frustum_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Sets the camera projection to orthogonal mode (see [constant 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 :: icallptr_void_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size , z_near , z_far) ; } } # [doc = "Sets the camera projection to perspective mode (see [constant 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 :: icallptr_void_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , fov , z_near , z_far) ; } } # [doc = "The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size."] # [doc = ""] # [inline] pub fn set_projection (& self , arg0 : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_projection ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, `size` sets the other axis' size length."] # [doc = ""] # [inline] pub fn set_size (& self , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The distance to the far culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn set_zfar (& self , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_zfar ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "The distance to the near culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn set_znear (& self , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_znear ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } # [doc = "Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace."] # [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 :: icallptr_vec2_vec3 (method_bind , self . this . sys () . as_ptr () , world_point) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Camera { } unsafe impl GodotObject for Camera { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Camera { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Camera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Camera { } unsafe impl SubClass < crate :: generated :: node :: Node > for Camera { } unsafe impl SubClass < crate :: generated :: object :: Object > for Camera { } impl Instanciable for Camera { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_camera_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_rid\u{0}" . as_ptr () as * const c_char) ; table . get_camera_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_transform\u{0}" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\u{0}" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\u{0}" . as_ptr () as * const c_char) ; table . get_fov = (gd_api . godot_method_bind_get_method) (class_name , "get_fov\u{0}" . as_ptr () as * const c_char) ; table . get_frustum = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum\u{0}" . as_ptr () as * const c_char) ; table . get_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum_offset\u{0}" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_projection = (gd_api . godot_method_bind_get_method) (class_name , "get_projection\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\u{0}" . as_ptr () as * const c_char) ; table . get_zfar = (gd_api . godot_method_bind_get_method) (class_name , "get_zfar\u{0}" . as_ptr () as * const c_char) ; table . get_znear = (gd_api . godot_method_bind_get_method) (class_name , "get_znear\u{0}" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\u{0}" . as_ptr () as * const c_char) ; table . is_position_behind = (gd_api . godot_method_bind_get_method) (class_name , "is_position_behind\u{0}" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\u{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\u{0}" . as_ptr () as * const c_char) ; table . project_position = (gd_api . godot_method_bind_get_method) (class_name , "project_position\u{0}" . as_ptr () as * const c_char) ; table . project_ray_normal = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_normal\u{0}" . as_ptr () as * const c_char) ; table . project_ray_origin = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_origin\u{0}" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_current = (gd_api . godot_method_bind_get_method) (class_name , "set_current\u{0}" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\u{0}" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\u{0}" . as_ptr () as * const c_char) ; table . set_fov = (gd_api . godot_method_bind_get_method) (class_name , "set_fov\u{0}" . as_ptr () as * const c_char) ; table . set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum\u{0}" . as_ptr () as * const c_char) ; table . set_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum_offset\u{0}" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "set_orthogonal\u{0}" . as_ptr () as * const c_char) ; table . set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "set_perspective\u{0}" . as_ptr () as * const c_char) ; table . set_projection = (gd_api . godot_method_bind_get_method) (class_name , "set_projection\u{0}" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\u{0}" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\u{0}" . as_ptr () as * const c_char) ; table . set_zfar = (gd_api . godot_method_bind_get_method) (class_name , "set_zfar\u{0}" . as_ptr () as * const c_char) ; table . set_znear = (gd_api . godot_method_bind_get_method) (class_name , "set_znear\u{0}" . as_ptr () as * const c_char) ; table . unproject_position = (gd_api . godot_method_bind_get_method) (class_name , "unproject_position\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::camera::Camera;
            
            pub mod undo_redo {
                use super::*;
                # [doc = "`core class UndoRedo` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UndoRedo { pub const MERGE_ALL : i64 = 2i64 ; pub const MERGE_DISABLE : i64 = 0i64 ; pub const MERGE_ENDS : i64 = 1i64 ; } 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 , thread_access :: 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 :: 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 :: 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 :: icallptr_void_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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_reference ; let ret = crate :: icalls :: icallptr_void_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 :: 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 :: 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 :: icallptr_void_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 :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_reference ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , increase_version) ; } } # [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].\nThe way actions are merged is dictated by the `merge_mode` argument. See [enum 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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , merge_mode) ; } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the version. Every time a new action is committed, the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [UndoRedo] is currently committing the action, i.e. running its \"do\" method or property change (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for UndoRedo { } unsafe impl GodotObject for UndoRedo { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "UndoRedo" } } impl std :: ops :: Deref for UndoRedo { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UndoRedo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for UndoRedo { } impl Instanciable for UndoRedo { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_do_property = (gd_api . godot_method_bind_get_method) (class_name , "add_do_property\u{0}" . as_ptr () as * const c_char) ; table . add_do_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_do_reference\u{0}" . as_ptr () as * const c_char) ; table . add_undo_method = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_method\u{0}" . as_ptr () as * const c_char) ; table . add_undo_property = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_property\u{0}" . as_ptr () as * const c_char) ; table . add_undo_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_reference\u{0}" . as_ptr () as * const c_char) ; table . clear_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_history\u{0}" . as_ptr () as * const c_char) ; table . commit_action = (gd_api . godot_method_bind_get_method) (class_name , "commit_action\u{0}" . as_ptr () as * const c_char) ; table . create_action = (gd_api . godot_method_bind_get_method) (class_name , "create_action\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_version = (gd_api . godot_method_bind_get_method) (class_name , "get_version\u{0}" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\u{0}" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\u{0}" . as_ptr () as * const c_char) ; table . is_commiting_action = (gd_api . godot_method_bind_get_method) (class_name , "is_commiting_action\u{0}" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\u{0}" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::undo_redo::UndoRedo;
            
            pub mod remote_transform {
                use super::*;
                # [doc = "`core class RemoteTransform` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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] caches the remote node. It may not notice if the remote node disappears; [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [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 :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_position) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale) ; } } # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform { } unsafe impl GodotObject for RemoteTransform { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RemoteTransform { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: node :: Node > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: object :: Object > for RemoteTransform { } impl Instanciable for RemoteTransform { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "get_remote_node\u{0}" . as_ptr () as * const c_char) ; table . get_update_position = (gd_api . godot_method_bind_get_method) (class_name , "get_update_position\u{0}" . as_ptr () as * const c_char) ; table . get_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_update_rotation\u{0}" . as_ptr () as * const c_char) ; table . get_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_update_scale\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_node\u{0}" . as_ptr () as * const c_char) ; table . set_update_position = (gd_api . godot_method_bind_get_method) (class_name , "set_update_position\u{0}" . as_ptr () as * const c_char) ; table . set_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_update_rotation\u{0}" . as_ptr () as * const c_char) ; table . set_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_update_scale\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::remote_transform::RemoteTransform;
            
            pub mod csg_box {
                use super::*;
                # [doc = "`core class CSGBox` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGBox { } unsafe impl GodotObject for CSGBox { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGBox { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGBox { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGBox { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGBox { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGBox { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGBox { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGBox { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGBox { } impl Instanciable for CSGBox { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\u{0}" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\u{0}" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::csg_box::CSGBox;
            
            pub mod node {
                use super::*;
                # [doc = "`core class Node` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Node { pub const DUPLICATE_GROUPS : i64 = 2i64 ; pub const DUPLICATE_SCRIPTS : i64 = 4i64 ; pub const DUPLICATE_SIGNALS : i64 = 1i64 ; pub const DUPLICATE_USE_INSTANCING : i64 = 8i64 ; pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_DRAG_BEGIN : i64 = 21i64 ; pub const NOTIFICATION_DRAG_END : i64 = 22i64 ; pub const NOTIFICATION_ENTER_TREE : i64 = 10i64 ; pub const NOTIFICATION_EXIT_TREE : i64 = 11i64 ; pub const NOTIFICATION_INSTANCED : i64 = 20i64 ; pub const NOTIFICATION_INTERNAL_PHYSICS_PROCESS : i64 = 26i64 ; pub const NOTIFICATION_INTERNAL_PROCESS : i64 = 25i64 ; pub const NOTIFICATION_MOVED_IN_PARENT : i64 = 12i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; pub const NOTIFICATION_OS_MEMORY_WARNING : i64 = 1009i64 ; pub const NOTIFICATION_PARENTED : i64 = 18i64 ; pub const NOTIFICATION_PATH_CHANGED : i64 = 23i64 ; pub const NOTIFICATION_PAUSED : i64 = 14i64 ; pub const NOTIFICATION_PHYSICS_PROCESS : i64 = 16i64 ; pub const NOTIFICATION_POST_ENTER_TREE : i64 = 27i64 ; pub const NOTIFICATION_PROCESS : i64 = 17i64 ; pub const NOTIFICATION_READY : i64 = 13i64 ; pub const NOTIFICATION_TRANSLATION_CHANGED : i64 = 1010i64 ; pub const NOTIFICATION_UNPARENTED : i64 = 19i64 ; pub const NOTIFICATION_UNPAUSED : i64 = 15i64 ; pub const NOTIFICATION_WM_ABOUT : i64 = 1011i64 ; pub const NOTIFICATION_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; pub const PAUSE_MODE_INHERIT : i64 = 0i64 ; pub const PAUSE_MODE_PROCESS : i64 = 2i64 ; pub const PAUSE_MODE_STOP : i64 = 1i64 ; } 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 , thread_access :: 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 an 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 [method 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], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [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 :: Node > , legible_unique_name : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . add_child ; let ret = crate :: icalls :: icallptr_void_obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , legible_unique_name) ; } } # [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 an 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 :: Node > , child_node : impl AsArg < crate :: generated :: node :: 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 :: icallptr_void_obj_obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , child_node . as_arg_ptr () , legible_unique_name) ; } } # [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 [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree].\nThe `persistent` option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.\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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , group . into () , persistent) ; } } # [doc = "Returns `true` if the node can process while the scene tree is paused (see [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Duplicates the node, returning a new node.\nYou can fine-tune the behavior using the `flags` (see [enum DuplicateFlags]).\n**Note:** It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to [method 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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Finds a descendant of this node whose name matches `mask` as in [method String.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.\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 [method get_node] instead. To avoid using [method 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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . find_node ; let ret = crate :: icalls :: icallptr_obj_str_bool_bool (method_bind , self . this . sys () . as_ptr () , mask . into () , recursive , owned) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Finds the first parent of the current node whose name matches `mask` as in [method String.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 [method get_node] instead. To avoid using [method 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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . find_parent ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , mask . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.\nTo access a child node via its name, use [method get_node]."] # [doc = ""] # [inline] pub fn get_child (& self , idx : i64) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_child ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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]. Set to `null` to use the default [SceneTree] one."] # [doc = ""] # [inline] pub fn custom_multiplayer (& self) -> Option < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_custom_multiplayer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "When a scene is instanced from a file, its topmost node contains the filename from which it was loaded."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns an array listing the groups that the node is a member of."] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree)."] # [doc = ""] # [inline] pub fn multiplayer (& self) -> Option < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_multiplayer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multiplayer_api :: MultiplayerAPI , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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."] # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the peer ID of the network master for this node. See [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFetches a node. The [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, a `null instance` 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 [method 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 :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFetches a node and one of its resources as specified by the [NodePath]'s subname (e.g. `Area2D/CollisionShape2D:shape`). If several nested resources are specified in the [NodePath], the last one will be fetched.\nThe return value is an array of size 3: the first index points to the [Node] (or `null` if not found), the second index points to the [Resource] (or `null` if not found), and the third index is the remaining [NodePath], if any.\nFor example, assuming that `Area2D/CollisionShape2D` is a valid node and that its `shape` property has been assigned a [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 [method get_node], but does not log an error if `path` does not point to a valid [Node]."] # [doc = ""] # [inline] pub fn get_node_or_null (& self , path : impl Into < NodePath >) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_node_or_null ; let ret = crate :: icalls :: icallptr_obj_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing."] # [doc = ""] # [inline] pub fn owner (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_owner ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the parent node of the current node, or a `null instance` if the node lacks a parent."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see [method 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 :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Returns the relative [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 :: Node >) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_path_to ; let ret = crate :: icalls :: icallptr_nodepath_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Pause mode. How the node will behave if the [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: node :: PauseMode (ret) } } # [doc = "Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member 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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this is an instance load placeholder. See [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [SceneTree] that contains this node."] # [doc = ""] # [inline] pub fn get_tree (& self) -> Option < Ref < crate :: generated :: scene_tree :: SceneTree , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_tree ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: scene_tree :: SceneTree , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the node's [Viewport]."] # [doc = ""] # [inline] pub fn get_viewport (& self) -> Option < Ref < crate :: generated :: viewport :: Viewport , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: viewport :: Viewport , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns `true` if the node that the [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 :: icallptr_bool_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Returns `true` if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. `Area2D/CollisionShape2D:shape`. Properties with a non-[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 :: icallptr_bool_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [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 :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_a_parent_of ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_greater_than ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this node is in the specified group. See notes in the description, and the group methods in [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , group . into ()) ; ret as _ } } # [doc = "Returns `true` if this node is currently inside a [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if physics processing is enabled (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if internal physics processing is enabled (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if processing is enabled (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is processing input (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if internal processing is enabled (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is processing unhandled input (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is processing unhandled key input (see [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: Node > , to_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . move_child ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , child_node . as_arg_ptr () , to_position) ; } } # [doc = "Prints all stray nodes (nodes outside the [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 :: icallptr_void (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 [method 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSimilar to [method 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 :: icallptr_void (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 :: icallptr_void_str_arr_bool (method_bind , self . this . sys () . as_ptr () , method . into () , args , parent_first) ; } } # [doc = "Notifies the current node and all its children recursively by calling [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , what) ; } } # [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 [method Object.free]. Use [method Object.is_queued_for_deletion] to check whether a node will be deleted at the end of the frame."] # [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 :: icallptr_void (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] nodes), because their order of drawing depends on their order in the tree, i.e. the further they are on the node list, the higher they are drawn. After using `raise`, a Control will be drawn on top of their 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 :: icallptr_void (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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a child node. The node is NOT deleted and must be deleted manually."] # [doc = ""] # [inline] pub fn remove_child (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . remove_child ; let ret = crate :: icalls :: icallptr_void_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]."] # [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 :: icallptr_void_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# Default Arguments\n* `keep_data` - `false`"] # [doc = ""] # [inline] pub fn replace_by (& self , node : impl AsArg < crate :: generated :: node :: Node > , keep_data : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . replace_by ; let ret = crate :: icalls :: icallptr_void_obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , keep_data) ; } } # [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 [method _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 :: icallptr_void (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], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant].\n**Note:** You can only safely use RPCs on clients after you received the `connected_to_server` signal from the [SceneTree]. You also need to keep track of the connection state, either by the [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 [method rset] and [method 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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , method . into () , mode) ; } } # [doc = "Sends a [method rpc] to a specific peer identified by `peer_id` (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]."] # [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 , method . into () , varargs) ; ret } } # [doc = "Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant]."] # [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 [method rpc] to a specific peer identified by `peer_id` using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]."] # [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 , 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 [method rset_config]. See also [method 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 :: icallptr_void_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 [method rpc] and [method 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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , property . into () , mode) ; } } # [doc = "Remotely changes the property's value on a specific peer identified by `peer_id` (see [method 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 :: icallptr_void_i64_str_var (method_bind , self . this . sys () . as_ptr () , peer_id , 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 :: icallptr_void_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 [method 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 :: icallptr_void_i64_str_var (method_bind , self . this . sys () . as_ptr () , peer_id , property . into () , value . owned_to_variant ()) ; } } # [doc = "The override to the default [MultiplayerAPI]. Set to `null` to use the default [SceneTree] one."] # [doc = ""] # [inline] pub fn set_custom_multiplayer (& self , api : impl AsArg < crate :: generated :: multiplayer_api :: MultiplayerAPI >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_custom_multiplayer ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , fold) ; } } # [doc = "When a scene is instanced from a file, its topmost node contains the filename from which it was loaded."] # [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 :: icallptr_void_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."] # [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 :: icallptr_void_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 :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , id , recursive) ; } } # [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]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing."] # [doc = ""] # [inline] pub fn set_owner (& self , owner : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_owner ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; } } # [doc = "Pause mode. How the node will behave if the [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.iterations_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _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 ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Enables or disables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overridden. Any calls to this before [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Enables or disables input processing. This is not required for GUI controls! Enabled automatically if [method _input] is overridden. Any calls to this before [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _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 ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour."] # [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [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]). Enabled automatically if [method _unhandled_input] is overridden. Any calls to this before [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Enables unhandled key input processing. Enabled automatically if [method _unhandled_key_input] is overridden. Any calls to this before [method _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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets whether this is an instance load placeholder. See [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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , load_placeholder) ; } } # [doc = "Updates the warning displayed for this node in the Scene Dock.\nUse [method _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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Node { } unsafe impl GodotObject for Node { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Node { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Node { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Node { } impl Instanciable for Node { # [inline] fn construct () -> Ref < Self , thread_access :: 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 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_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_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 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 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_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 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 , 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_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_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 , 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 , 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_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 , 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_to_group = (gd_api . godot_method_bind_get_method) (class_name , "add_to_group\u{0}" . as_ptr () as * const c_char) ; table . can_process = (gd_api . godot_method_bind_get_method) (class_name , "can_process\u{0}" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\u{0}" . as_ptr () as * const c_char) ; table . find_node = (gd_api . godot_method_bind_get_method) (class_name , "find_node\u{0}" . as_ptr () as * const c_char) ; table . find_parent = (gd_api . godot_method_bind_get_method) (class_name , "find_parent\u{0}" . as_ptr () as * const c_char) ; table . get_child = (gd_api . godot_method_bind_get_method) (class_name , "get_child\u{0}" . as_ptr () as * const c_char) ; table . get_child_count = (gd_api . godot_method_bind_get_method) (class_name , "get_child_count\u{0}" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\u{0}" . as_ptr () as * const c_char) ; table . get_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_multiplayer\u{0}" . as_ptr () as * const c_char) ; table . get_filename = (gd_api . godot_method_bind_get_method) (class_name , "get_filename\u{0}" . as_ptr () as * const c_char) ; table . get_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_groups\u{0}" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\u{0}" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\u{0}" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\u{0}" . as_ptr () as * const c_char) ; table . get_network_master = (gd_api . godot_method_bind_get_method) (class_name , "get_network_master\u{0}" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_owner\u{0}" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\u{0}" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\u{0}" . as_ptr () as * const c_char) ; table . get_path_to = (gd_api . godot_method_bind_get_method) (class_name , "get_path_to\u{0}" . as_ptr () as * const c_char) ; table . get_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_pause_mode\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_process_priority\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_tree = (gd_api . godot_method_bind_get_method) (class_name , "get_tree\u{0}" . as_ptr () as * const c_char) ; table . get_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport\u{0}" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_displayed_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_displayed_folded\u{0}" . as_ptr () as * const c_char) ; table . is_greater_than = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_than\u{0}" . as_ptr () as * const c_char) ; table . is_in_group = (gd_api . godot_method_bind_get_method) (class_name , "is_in_group\u{0}" . as_ptr () as * const c_char) ; table . is_inside_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_inside_tree\u{0}" . as_ptr () as * const c_char) ; table . is_network_master = (gd_api . godot_method_bind_get_method) (class_name , "is_network_master\u{0}" . as_ptr () as * const c_char) ; table . is_physics_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_processing\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_processing\u{0}" . as_ptr () as * const c_char) ; table . is_processing_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_input\u{0}" . as_ptr () as * const c_char) ; table . is_processing_internal = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_internal\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . move_child = (gd_api . godot_method_bind_get_method) (class_name , "move_child\u{0}" . as_ptr () as * const c_char) ; table . print_stray_nodes = (gd_api . godot_method_bind_get_method) (class_name , "print_stray_nodes\u{0}" . as_ptr () as * const c_char) ; table . print_tree = (gd_api . godot_method_bind_get_method) (class_name , "print_tree\u{0}" . as_ptr () as * const c_char) ; table . print_tree_pretty = (gd_api . godot_method_bind_get_method) (class_name , "print_tree_pretty\u{0}" . as_ptr () as * const c_char) ; table . propagate_call = (gd_api . godot_method_bind_get_method) (class_name , "propagate_call\u{0}" . as_ptr () as * const c_char) ; table . propagate_notification = (gd_api . godot_method_bind_get_method) (class_name , "propagate_notification\u{0}" . as_ptr () as * const c_char) ; table . queue_free = (gd_api . godot_method_bind_get_method) (class_name , "queue_free\u{0}" . as_ptr () as * const c_char) ; table . raise = (gd_api . godot_method_bind_get_method) (class_name , "raise\u{0}" . as_ptr () as * const c_char) ; table . remove_and_skip = (gd_api . godot_method_bind_get_method) (class_name , "remove_and_skip\u{0}" . as_ptr () as * const c_char) ; table . remove_child = (gd_api . godot_method_bind_get_method) (class_name , "remove_child\u{0}" . as_ptr () as * const c_char) ; table . remove_from_group = (gd_api . godot_method_bind_get_method) (class_name , "remove_from_group\u{0}" . as_ptr () as * const c_char) ; table . replace_by = (gd_api . godot_method_bind_get_method) (class_name , "replace_by\u{0}" . as_ptr () as * const c_char) ; table . request_ready = (gd_api . godot_method_bind_get_method) (class_name , "request_ready\u{0}" . as_ptr () as * const c_char) ; table . rpc = (gd_api . godot_method_bind_get_method) (class_name , "rpc\u{0}" . as_ptr () as * const c_char) ; table . rpc_config = (gd_api . godot_method_bind_get_method) (class_name , "rpc_config\u{0}" . as_ptr () as * const c_char) ; table . rpc_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_id\u{0}" . as_ptr () as * const c_char) ; table . rpc_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable\u{0}" . as_ptr () as * const c_char) ; table . rpc_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable_id\u{0}" . as_ptr () as * const c_char) ; table . rset = (gd_api . godot_method_bind_get_method) (class_name , "rset\u{0}" . as_ptr () as * const c_char) ; table . rset_config = (gd_api . godot_method_bind_get_method) (class_name , "rset_config\u{0}" . as_ptr () as * const c_char) ; table . rset_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_id\u{0}" . as_ptr () as * const c_char) ; table . rset_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable\u{0}" . as_ptr () as * const c_char) ; table . rset_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable_id\u{0}" . as_ptr () as * const c_char) ; table . set_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_multiplayer\u{0}" . as_ptr () as * const c_char) ; table . set_display_folded = (gd_api . godot_method_bind_get_method) (class_name , "set_display_folded\u{0}" . as_ptr () as * const c_char) ; table . set_filename = (gd_api . godot_method_bind_get_method) (class_name , "set_filename\u{0}" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\u{0}" . as_ptr () as * const c_char) ; table . set_network_master = (gd_api . godot_method_bind_get_method) (class_name , "set_network_master\u{0}" . as_ptr () as * const c_char) ; table . set_owner = (gd_api . godot_method_bind_get_method) (class_name , "set_owner\u{0}" . as_ptr () as * const c_char) ; table . set_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_pause_mode\u{0}" . as_ptr () as * const c_char) ; table . set_physics_process = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_process\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_process = (gd_api . godot_method_bind_get_method) (class_name , "set_process\u{0}" . as_ptr () as * const c_char) ; table . set_process_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_input\u{0}" . as_ptr () as * const c_char) ; table . set_process_internal = (gd_api . godot_method_bind_get_method) (class_name , "set_process_internal\u{0}" . as_ptr () as * const c_char) ; table . set_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_process_priority\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . update_configuration_warning = (gd_api . godot_method_bind_get_method) (class_name , "update_configuration_warning\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::node::Node;
            
            pub mod shader {
                use super::*;
                # [doc = "`core class Shader` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Shader { pub const MODE_CANVAS_ITEM : i64 = 1i64 ; pub const MODE_PARTICLES : i64 = 2i64 ; pub const MODE_SPATIAL : i64 = 0i64 ; } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_default_texture_param ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: shader :: Mode (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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].\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 :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_default_texture_param ; let ret = crate :: icalls :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shader" } } impl std :: ops :: Deref for Shader { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shader { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shader { } unsafe impl SubClass < crate :: generated :: object :: Object > for Shader { } impl Instanciable for Shader { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_defines\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\u{0}" . as_ptr () as * const c_char) ; table . has_param = (gd_api . godot_method_bind_get_method) (class_name , "has_param\u{0}" . as_ptr () as * const c_char) ; table . set_code = (gd_api . godot_method_bind_get_method) (class_name , "set_code\u{0}" . as_ptr () as * const c_char) ; table . set_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_defines\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::shader::Shader;
            
            pub mod udp_server {
                use super::*;
                # [doc = "`core class UDPServer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 [method 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 :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , bind_address . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available], [method take_connection]). The maximum number of pending connection is defined via [member 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Define the maximum number of pending connections, during [method 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_pending_connections) ; } } # [doc = "Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method 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 :: icallptr_void (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 [method is_connection_available], [method PacketPeerUDP.connect_to_host]."] # [doc = ""] # [inline] pub fn take_connection (& self) -> Option < Ref < crate :: generated :: packet_peer_udp :: PacketPeerUDP , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packet_peer_udp :: PacketPeerUDP , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for UDPServer { } unsafe impl GodotObject for UDPServer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UDPServer" } } impl std :: ops :: Deref for UDPServer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UDPServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UDPServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for UDPServer { } impl Instanciable for UDPServer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . is_connection_available = (gd_api . godot_method_bind_get_method) (class_name , "is_connection_available\u{0}" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\u{0}" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{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\u{0}" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\u{0}" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::udp_server::UDPServer;
            
            pub mod web_socket_client {
                use super::*;
                # [doc = "`core class WebSocketClient` inherits `WebSocketMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 : StringArray , gd_mp_api : bool , custom_headers : StringArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . connect_to_url ; let ret = crate :: icalls :: icallptr_i64_str_strarr_bool_strarr (method_bind , self . this . sys () . as_ptr () , url . into () , protocols , gd_mp_api , custom_headers) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , code , 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn trusted_ssl_certificate (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_trusted_ssl_certificate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_trusted_ssl_certificate (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . set_trusted_ssl_certificate ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketClient { } unsafe impl GodotObject for WebSocketClient { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketClient" } } impl std :: ops :: Deref for WebSocketClient { type Target = crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketClient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketClient { } impl Instanciable for WebSocketClient { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . disconnect_from_host = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_host\u{0}" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\u{0}" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::web_socket_client::WebSocketClient;
            
            pub mod input_map {
                use super::*;
                # [doc = "`core singleton class InputMap` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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\u{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] to an action. This [InputEvent] will trigger the action."] # [doc = ""] # [inline] pub fn action_add_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_add_event ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; } } # [doc = "Removes an [InputEvent] from an action."] # [doc = ""] # [inline] pub fn action_erase_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_erase_event ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Returns `true` if the action has the given [InputEvent] associated with it."] # [doc = ""] # [inline] pub fn action_has_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_has_event ; let ret = crate :: icalls :: icallptr_bool_str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; ret as _ } } # [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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone) ; } } # [doc = "Adds an empty action to the [InputMap] with a configurable `deadzone`.\nAn [InputEvent] can then be added to this action with [method 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 :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone) ; } } # [doc = "Removes an action from the [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 :: icallptr_void_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] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior."] # [doc = ""] # [inline] pub fn event_is_action (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent > , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . event_is_action ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns an array of [InputEvent]s associated with a given action."] # [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]."] # [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] 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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Clears all [InputEventAction] in the [InputMap] and load it anew from [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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputMap { } unsafe impl GodotObject for InputMap { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InputMap" } } impl std :: ops :: Deref for InputMap { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: 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_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_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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . action_erase_event = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_event\u{0}" . as_ptr () as * const c_char) ; table . action_erase_events = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_events\u{0}" . as_ptr () as * const c_char) ; table . action_has_event = (gd_api . godot_method_bind_get_method) (class_name , "action_has_event\u{0}" . as_ptr () as * const c_char) ; table . action_set_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "action_set_deadzone\u{0}" . as_ptr () as * const c_char) ; table . add_action = (gd_api . godot_method_bind_get_method) (class_name , "add_action\u{0}" . as_ptr () as * const c_char) ; table . erase_action = (gd_api . godot_method_bind_get_method) (class_name , "erase_action\u{0}" . as_ptr () as * const c_char) ; table . event_is_action = (gd_api . godot_method_bind_get_method) (class_name , "event_is_action\u{0}" . as_ptr () as * const c_char) ; table . get_action_list = (gd_api . godot_method_bind_get_method) (class_name , "get_action_list\u{0}" . as_ptr () as * const c_char) ; table . get_actions = (gd_api . godot_method_bind_get_method) (class_name , "get_actions\u{0}" . as_ptr () as * const c_char) ; table . has_action = (gd_api . godot_method_bind_get_method) (class_name , "has_action\u{0}" . as_ptr () as * const c_char) ; table . load_from_globals = (gd_api . godot_method_bind_get_method) (class_name , "load_from_globals\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::input_map::InputMap;
            
            pub mod sprite_3d {
                use super::*;
                # [doc = "`core class Sprite3D` inherits `SpriteBase3D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 - [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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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. [member vframes] or [member hframes] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] 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 :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The region of the atlas texture to display. [member 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 :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "[Texture] object to draw. If [member GeometryInstance.material_override] is used, this will be overridden."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [member 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Current frame to display from sprite sheet. [member vframes] or [member hframes] 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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] 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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , hframes) ; } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [member 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The region of the atlas texture to display. [member 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 :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "[Texture] object to draw. If [member GeometryInstance.material_override] is used, this will be overridden."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , vframes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sprite3D { } unsafe impl GodotObject for Sprite3D { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Sprite3D { type Target = crate :: generated :: sprite_base_3d :: SpriteBase3D ; # [inline] fn deref (& self) -> & crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sprite3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sprite_base_3d :: SpriteBase3D > for Sprite3D { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Sprite3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Sprite3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Sprite3D { } impl Instanciable for Sprite3D { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_coords\u{0}" . as_ptr () as * const c_char) ; table . get_hframes = (gd_api . godot_method_bind_get_method) (class_name , "get_hframes\u{0}" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\u{0}" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\u{0}" . as_ptr () as * const c_char) ; table . get_vframes = (gd_api . godot_method_bind_get_method) (class_name , "get_vframes\u{0}" . as_ptr () as * const c_char) ; table . is_region = (gd_api . godot_method_bind_get_method) (class_name , "is_region\u{0}" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\u{0}" . as_ptr () as * const c_char) ; table . set_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_coords\u{0}" . as_ptr () as * const c_char) ; table . set_hframes = (gd_api . godot_method_bind_get_method) (class_name , "set_hframes\u{0}" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\u{0}" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\u{0}" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\u{0}" . as_ptr () as * const c_char) ; table . set_vframes = (gd_api . godot_method_bind_get_method) (class_name , "set_vframes\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::sprite_3d::Sprite3D;
            
            pub mod animation_node_blend_2 {
                use super::*;
                # [doc = "`core class AnimationNodeBlend2` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 [method 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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method 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 :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend2 { } unsafe impl GodotObject for AnimationNodeBlend2 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend2" } } impl std :: ops :: Deref for AnimationNodeBlend2 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlend2 { } impl Instanciable for AnimationNodeBlend2 { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::animation_node_blend_2::AnimationNodeBlend2;
            
            pub mod config_file {
                use super::*;
                # [doc = "`core class ConfigFile` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (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 :: icallptr_void_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 :: icallptr_void_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 >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_section_keys ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns an array of all defined section identifiers."] # [doc = ""] # [inline] pub fn get_sections (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_sections ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [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 :: icallptr_var_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , section . into () , key . into ()) ; ret as _ } } # [doc = "Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.\nReturns one of the [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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] object which the method was called on.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load_encrypted (& self , path : impl Into < GodotString > , key : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load_encrypted ; let ret = crate :: icalls :: icallptr_i64_str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (ret as _) } } # [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] object which the method was called on.\nReturns one of the [enum Error] 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Parses the 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 [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , data . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.\nReturns one of the [enum Error] 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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [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 [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save_encrypted (& self , path : impl Into < GodotString > , key : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save_encrypted ; let ret = crate :: icalls :: icallptr_i64_str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [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 [enum Error] 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 :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (ret as _) } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConfigFile" } } impl std :: ops :: Deref for ConfigFile { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConfigFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConfigFile { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConfigFile { } impl Instanciable for ConfigFile { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . erase_section = (gd_api . godot_method_bind_get_method) (class_name , "erase_section\u{0}" . as_ptr () as * const c_char) ; table . erase_section_key = (gd_api . godot_method_bind_get_method) (class_name , "erase_section_key\u{0}" . as_ptr () as * const c_char) ; table . get_section_keys = (gd_api . godot_method_bind_get_method) (class_name , "get_section_keys\u{0}" . as_ptr () as * const c_char) ; table . get_sections = (gd_api . godot_method_bind_get_method) (class_name , "get_sections\u{0}" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\u{0}" . as_ptr () as * const c_char) ; table . has_section = (gd_api . godot_method_bind_get_method) (class_name , "has_section\u{0}" . as_ptr () as * const c_char) ; table . has_section_key = (gd_api . godot_method_bind_get_method) (class_name , "has_section_key\u{0}" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\u{0}" . as_ptr () as * const c_char) ; table . load_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted\u{0}" . as_ptr () as * const c_char) ; table . load_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted_pass\u{0}" . as_ptr () as * const c_char) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\u{0}" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\u{0}" . as_ptr () as * const c_char) ; table . save_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted\u{0}" . as_ptr () as * const c_char) ; table . save_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted_pass\u{0}" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::config_file::ConfigFile;
            
            pub mod audio_effect_band_pass_filter {
                use super::*;
                # [doc = "`core class AudioEffectBandPassFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectBandPassFilter" } } impl std :: ops :: Deref for AudioEffectBandPassFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectBandPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectBandPassFilter { } impl Instanciable for AudioEffectBandPassFilter { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::audio_effect_band_pass_filter::AudioEffectBandPassFilter;
            
            pub mod popup_dialog {
                use super::*;
                # [doc = "`core class PopupDialog` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PopupDialog { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for PopupDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for PopupDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PopupDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for PopupDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for PopupDialog { } impl Instanciable for PopupDialog { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{0}" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
            }
            pub use crate::generated::popup_dialog::PopupDialog;
            
            pub mod visual_script_local_var {
                use super::*;
                # [doc = "`core class VisualScriptLocalVar` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVar { } unsafe impl GodotObject for VisualScriptLocalVar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVar" } } impl std :: ops :: Deref for VisualScriptLocalVar { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVar { } impl Instanciable for VisualScriptLocalVar { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\u{0}" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\u{0}" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script_local_var::VisualScriptLocalVar;
            
            pub mod editor_scene_importer {
                use super::*;
                # [doc = "`tools class EditorSceneImporter` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorSceneImporter { pub const IMPORT_ANIMATION : i64 = 2i64 ; pub const IMPORT_ANIMATION_DETECT_LOOP : i64 = 4i64 ; pub const IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS : i64 = 16i64 ; pub const IMPORT_ANIMATION_KEEP_VALUE_TRACKS : i64 = 32i64 ; pub const IMPORT_ANIMATION_OPTIMIZE : i64 = 8i64 ; pub const IMPORT_FAIL_ON_MISSING_DEPENDENCIES : i64 = 512i64 ; pub const IMPORT_GENERATE_TANGENT_ARRAYS : i64 = 256i64 ; pub const IMPORT_MATERIALS_IN_INSTANCES : i64 = 1024i64 ; pub const IMPORT_SCENE : i64 = 1i64 ; pub const IMPORT_USE_COMPRESSION : i64 = 2048i64 ; } 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 :: Animation , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSceneImporterMethodTable :: get (get_api ()) . import_animation_from_other_importer ; let ret = crate :: icalls :: icallptr_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags , bake_fps) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn import_scene_from_other_importer (& self , path : impl Into < GodotString > , flags : i64 , bake_fps : i64) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSceneImporterMethodTable :: get (get_api ()) . import_scene_from_other_importer ; let ret = crate :: icalls :: icallptr_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags , bake_fps) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSceneImporter { } unsafe impl GodotObject for EditorSceneImporter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSceneImporter" } } impl std :: ops :: Deref for EditorSceneImporter { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSceneImporter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSceneImporter { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::editor_scene_importer::EditorSceneImporter;
            
            pub mod aspect_ratio_container {
                use super::*;
                # [doc = "`core class AspectRatioContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } # [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 } } # [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 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AspectRatioContainer { pub const ALIGN_BEGIN : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_END : i64 = 2i64 ; pub const STRETCH_COVER : i64 = 3i64 ; pub const STRETCH_FIT : i64 = 2i64 ; pub const STRETCH_HEIGHT_CONTROLS_WIDTH : i64 = 1i64 ; pub const STRETCH_WIDTH_CONTROLS_HEIGHT : i64 = 0i64 ; } 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 , thread_access :: 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 = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [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 :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: StretchMode (ret) } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_horizontal) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_vertical) ; } } # [doc = ""] # [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 :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AspectRatioContainer { } unsafe impl GodotObject for AspectRatioContainer { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AspectRatioContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AspectRatioContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AspectRatioContainer { } impl Instanciable for AspectRatioContainer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_vertical\u{0}" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\u{0}" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\u{0}" . as_ptr () as * const c_char) ; table . set_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_horizontal\u{0}" . as_ptr () as * const c_char) ; table . set_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_vertical\u{0}" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\u{0}" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::aspect_ratio_container::AspectRatioContainer;
            
            pub mod stream_peer_buffer {
                use super::*;
                # [doc = "`core class StreamPeerBuffer` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn duplicate (& self) -> Option < Ref < crate :: generated :: stream_peer_buffer :: StreamPeerBuffer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer_buffer :: StreamPeerBuffer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn data_array (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_data_array ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data_array (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . set_data_array ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerBuffer { } unsafe impl GodotObject for StreamPeerBuffer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerBuffer" } } impl std :: ops :: Deref for StreamPeerBuffer { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerBuffer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerBuffer { } impl Instanciable for StreamPeerBuffer { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\u{0}" . as_ptr () as * const c_char) ; table . get_data_array = (gd_api . godot_method_bind_get_method) (class_name , "get_data_array\u{0}" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\u{0}" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\u{0}" . as_ptr () as * const c_char) ; table . set_data_array = (gd_api . godot_method_bind_get_method) (class_name , "set_data_array\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::stream_peer_buffer::StreamPeerBuffer;
            
            pub mod resource_interactive_loader {
                use super::*;
                # [doc = "`core class ResourceInteractiveLoader` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . get_resource ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the load stage. The total amount of stages can be queried with [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total amount of stages (calls to [method 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Polls the loading operation, i.e. loads a data chunk up to the next stage.\nReturns [constant OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed.\nReturns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].\nReturns another [enum Error] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.\nReturns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].\nReturns another [enum Error] 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceInteractiveLoader { } unsafe impl GodotObject for ResourceInteractiveLoader { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceInteractiveLoader" } } impl std :: ops :: Deref for ResourceInteractiveLoader { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceInteractiveLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ResourceInteractiveLoader { } unsafe impl SubClass < crate :: generated :: object :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_stage = (gd_api . godot_method_bind_get_method) (class_name , "get_stage\u{0}" . as_ptr () as * const c_char) ; table . get_stage_count = (gd_api . godot_method_bind_get_method) (class_name , "get_stage_count\u{0}" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\u{0}" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::resource_interactive_loader::ResourceInteractiveLoader;
            
            pub mod visual_script {
                use super::*;
                # [doc = "`core class VisualScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void_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 :: icallptr_void_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 :: visual_script_node :: VisualScriptNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_str_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , 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 :: icallptr_void_str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , default_value . owned_to_variant () , export) ; } } # [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 :: icallptr_void_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , _type , argname . into () , index) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; VariantType :: from_sys (ret as _) } } # [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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; } } # [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 :: icallptr_void_str_i64_str (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , 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 :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , _type) ; } } # [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 :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , withidx) ; } } # [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 :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [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 :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [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 :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node (& self , func : impl Into < GodotString > , id : i64) -> Option < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec2_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; mem :: transmute (ret) } } # [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 :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_dict_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Dictionary :: from_sys (ret) } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_bool_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ret as _ } } # [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 :: icallptr_bool_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; ret as _ } } # [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 :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [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 :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [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 :: icallptr_void_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 :: icallptr_void_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 :: icallptr_void_str_i64_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , 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 :: icallptr_void_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 :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , enable) ; } } # [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 :: icallptr_void_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 RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScript" } } impl std :: ops :: Deref for VisualScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for VisualScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScript { } impl Instanciable for VisualScript { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . add_function = (gd_api . godot_method_bind_get_method) (class_name , "add_function\u{0}" . as_ptr () as * const c_char) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\u{0}" . as_ptr () as * const c_char) ; table . add_variable = (gd_api . godot_method_bind_get_method) (class_name , "add_variable\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{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\u{0}" . as_ptr () as * const c_char) ; table . data_connect = (gd_api . godot_method_bind_get_method) (class_name , "data_connect\u{0}" . as_ptr () as * const c_char) ; table . data_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "data_disconnect\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_function_scroll\u{0}" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\u{0}" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_export\u{0}" . as_ptr () as * const c_char) ; table . get_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_info\u{0}" . as_ptr () as * const c_char) ; table . has_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_custom_signal\u{0}" . as_ptr () as * const c_char) ; table . has_data_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_data_connection\u{0}" . as_ptr () as * const c_char) ; table . has_function = (gd_api . godot_method_bind_get_method) (class_name , "has_function\u{0}" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\u{0}" . as_ptr () as * const c_char) ; table . has_sequence_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_sequence_connection\u{0}" . as_ptr () as * const c_char) ; table . has_variable = (gd_api . godot_method_bind_get_method) (class_name , "has_variable\u{0}" . as_ptr () as * const c_char) ; table . remove_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_signal\u{0}" . as_ptr () as * const c_char) ; table . remove_function = (gd_api . godot_method_bind_get_method) (class_name , "remove_function\u{0}" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\u{0}" . as_ptr () as * const c_char) ; table . remove_variable = (gd_api . godot_method_bind_get_method) (class_name , "remove_variable\u{0}" . as_ptr () as * const c_char) ; table . rename_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "rename_custom_signal\u{0}" . as_ptr () as * const c_char) ; table . rename_function = (gd_api . godot_method_bind_get_method) (class_name , "rename_function\u{0}" . as_ptr () as * const c_char) ; table . rename_variable = (gd_api . godot_method_bind_get_method) (class_name , "rename_variable\u{0}" . as_ptr () as * const c_char) ; table . sequence_connect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_connect\u{0}" . as_ptr () as * const c_char) ; table . sequence_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_disconnect\u{0}" . as_ptr () as * const c_char) ; table . set_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_function_scroll\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\u{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\u{0}" . as_ptr () as * const c_char) ; table . set_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_export\u{0}" . as_ptr () as * const c_char) ; table . set_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_info\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::visual_script::VisualScript;
            
            pub mod arvr_anchor {
                use super::*;
                # [doc = "`core class ARVRAnchor` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [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 :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [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 :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If provided by the [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 :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_plane (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [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 :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , anchor_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRAnchor { } unsafe impl GodotObject for ARVRAnchor { type RefKind = ref_kind :: 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 :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVRAnchor { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRAnchor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRAnchor { } impl Instanciable for ARVRAnchor { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . get_anchor_name = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_name\u{0}" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\u{0}" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\u{0}" . as_ptr () as * const c_char) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\u{0}" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\u{0}" . as_ptr () as * const c_char) ; table . set_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_id\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::arvr_anchor::ARVRAnchor;
            
            pub mod mesh_data_tool {
                use super::*;
                # [doc = "`core class MeshDataTool` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } 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 , thread_access :: 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 :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a new surface to specified [Mesh] with edited data."] # [doc = ""] # [inline] pub fn commit_to_surface (& self , mesh : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . commit_to_surface ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Uses specified surface of given [Mesh] to populate data for MeshDataTool.\nRequires [Mesh] with primitive type [constant Mesh.PRIMITIVE_TRIANGLES]."] # [doc = ""] # [inline] pub fn create_from_surface (& self , mesh : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh > , surface : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . create_from_surface ; let ret = crate :: icalls :: icallptr_i64_obj_i64 (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , surface) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns the number of edges in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns array of faces that touch given edge."] # [doc = ""] # [inline] pub fn get_edge_faces (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_edge_faces ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , vertex) ; ret as _ } } # [doc = "Returns the number of faces in this [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns specified edge associated with given face.\nEdge argument must 2 or less 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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , edge) ; ret as _ } } # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the specified vertex of the given face.\nVertex argument must be 2 or less 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 :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , vertex) ; ret as _ } } # [doc = "Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of `3` because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is `1` and [constant 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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the material assigned to the [Mesh]."] # [doc = ""] # [inline] pub fn get_material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the bones of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_bones (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_bones ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the total number of vertices in [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 :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an array of edges that share the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_edges (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_edges ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [doc = "Returns an array of faces that share the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_faces (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_faces ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [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 :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [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 :: icallptr_vec3_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_plane_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [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 :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns bone weights of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_weights (& self , idx : i64) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_weights ; let ret = crate :: icalls :: icallptr_f32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Float32Array :: from_sys (ret) } } # [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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , meta . owned_to_variant ()) ; } } # [doc = "Sets the material to be used by newly-constructed [Mesh]."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx , vertex) ; } } # [doc = "Sets the bones of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_bones (& self , idx : i64 , bones : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_bones ; let ret = crate :: icalls :: icallptr_void_i64_i32arr (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_plane (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , 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 :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , uv2) ; } } # [doc = "Sets the bone weights of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_weights (& self , idx : i64 , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_weights ; let ret = crate :: icalls :: icallptr_void_i64_f32arr (method_bind , self . this . sys () . as_ptr () , idx , weights) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshDataTool { } unsafe impl GodotObject for MeshDataTool { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshDataTool" } } impl std :: ops :: Deref for MeshDataTool { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshDataTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshDataTool { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshDataTool { } impl Instanciable for MeshDataTool { # [inline] fn construct () -> Ref < Self , thread_access :: 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 = 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\u{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\u{0}" . as_ptr () as * const c_char) ; table . commit_to_surface = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_surface\u{0}" . as_ptr () as * const c_char) ; table . create_from_surface = (gd_api . godot_method_bind_get_method) (class_name , "create_from_surface\u{0}" . as_ptr () as * const c_char) ; table . get_edge_count = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_count\u{0}" . as_ptr () as * const c_char) ; table . get_edge_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_faces\u{0}" . as_ptr () as * const c_char) ; table . get_edge_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_meta\u{0}" . as_ptr () as * const c_char) ; table . get_edge_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_vertex\u{0}" . as_ptr () as * const c_char) ; table . get_face_count = (gd_api . godot_method_bind_get_method) (class_name , "get_face_count\u{0}" . as_ptr () as * const c_char) ; table . get_face_edge = (gd_api . godot_method_bind_get_method) (class_name , "get_face_edge\u{0}" . as_ptr () as * const c_char) ; table . get_face_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_face_meta\u{0}" . as_ptr () as * const c_char) ; table . get_face_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_face_normal\u{0}" . as_ptr () as * const c_char) ; table . get_face_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_face_vertex\u{0}" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\u{0}" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\u{0}" . as_ptr () as * const c_char) ; table . get_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_bones = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_bones\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_color = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_color\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_count\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_edges = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_edges\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_faces\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_meta\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_normal\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_tangent\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_uv\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_uv2\u{0}" . as_ptr () as * const c_char) ; table . get_vertex_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_weights\u{0}" . as_ptr () as * const c_char) ; table . set_edge_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_meta\u{0}" . as_ptr () as * const c_char) ; table . set_face_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_face_meta\u{0}" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\u{0}" . as_ptr () as * const c_char) ; table . set_vertex = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_bones = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_bones\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_color = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_color\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_meta\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_normal\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_tangent\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_uv\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_uv2\u{0}" . as_ptr () as * const c_char) ; table . set_vertex_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_weights\u{0}" . as_ptr () as * const c_char) ; } } }
            }
            pub use crate::generated::mesh_data_tool::MeshDataTool;
            
            pub mod ip_unix {
                use super::*;
                # [doc = "`core class IP_Unix` inherits `IP` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/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 `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\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 { this : RawObject < Self > , } impl IP_Unix { } impl gdnative_core :: private :: godot_object :: Sealed for IP_Unix { } unsafe impl GodotObject for IP_Unix { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "IP_Unix" } } impl std :: ops :: Deref for IP_Unix { type Target = crate :: generated :: ip :: IP ; # [inline] fn deref (& self) -> & crate :: generated :: ip :: IP { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IP_Unix { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ip :: IP { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ip :: IP > for IP_Unix { } unsafe impl SubClass < crate :: generated :: object :: Object > for IP_Unix { }
            }
            pub use crate::generated::ip_unix::IP_Unix;