[INFO] fetching crate gdnative-bindings-lily 0.9.3... [INFO] checking gdnative-bindings-lily-0.9.3 against try#a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d for pr-145342-1 [INFO] extracting crate gdnative-bindings-lily 0.9.3 into /workspace/builds/worker-2-tc2/source [INFO] started tweaking crates.io crate gdnative-bindings-lily 0.9.3 [INFO] finished tweaking crates.io crate gdnative-bindings-lily 0.9.3 [INFO] tweaked toml for crates.io crate gdnative-bindings-lily 0.9.3 written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate gdnative-bindings-lily 0.9.3 on toolchain a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 67 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.9.3) [INFO] [stderr] Adding gdnative-core v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding gdnative-sys v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding gdnative_bindings_generator v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding heck v0.3.3 (available: v0.5.0) [INFO] [stderr] Adding mini-internal v0.1.13 (available: v0.1.42) [INFO] [stderr] Adding miniserde v0.1.13 (available: v0.1.42) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9da1e9eae6e069eadf5cd5726cf9f59cd0d7fa62f5012e3110b4a6c1ad347b58 [INFO] running `Command { std: "docker" "start" "-a" "9da1e9eae6e069eadf5cd5726cf9f59cd0d7fa62f5012e3110b4a6c1ad347b58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9da1e9eae6e069eadf5cd5726cf9f59cd0d7fa62f5012e3110b4a6c1ad347b58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9da1e9eae6e069eadf5cd5726cf9f59cd0d7fa62f5012e3110b4a6c1ad347b58", kill_on_drop: false }` [INFO] [stdout] 9da1e9eae6e069eadf5cd5726cf9f59cd0d7fa62f5012e3110b4a6c1ad347b58 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d394b6e25e1822665d5198193dff8d4c07655736e88e1a4e5ab018807052ad80 [INFO] running `Command { std: "docker" "start" "-a" "d394b6e25e1822665d5198193dff8d4c07655736e88e1a4e5ab018807052ad80", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling version_check v0.9.5 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling ryu v1.0.20 [INFO] [stderr] Compiling cfg-if v1.0.3 [INFO] [stderr] Compiling regex-syntax v0.8.6 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling bindgen v0.56.0 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling lazycell v1.3.0 [INFO] [stderr] Compiling libloading v0.8.8 [INFO] [stderr] Compiling peeking_take_while v0.1.2 [INFO] [stderr] Compiling lazy_static v1.5.0 [INFO] [stderr] Compiling bitflags v1.3.2 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling xmlparser v0.13.6 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling unindent v0.1.11 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling nom v5.1.3 [INFO] [stderr] Compiling ahash v0.7.8 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling roxmltree v0.14.1 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking approx v0.4.0 [INFO] [stderr] Compiling regex-automata v0.4.10 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Compiling regex v1.11.2 [INFO] [stderr] Compiling mini-internal v0.1.13 [INFO] [stderr] Compiling gdnative-impl-proc-macros v0.9.3 [INFO] [stderr] Compiling miniserde v0.1.13 [INFO] [stderr] Compiling gdnative_bindings_generator v0.9.3 [INFO] [stderr] Compiling gdnative-bindings-lily v0.9.3 (/opt/rustwide/workdir) [INFO] [stderr] Compiling gdnative-sys v0.9.3 [INFO] [stderr] Checking gdnative-core v0.9.3 [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:10:1439 [INFO] [stdout] | [INFO] [stdout] 10 | ...el_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { this : RawObject < Self > , } impl AudioStreamMicrophone { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamMicrophone` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:34:1512 [INFO] [stdout] | [INFO] [stdout] 34 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectLowPassFilter { this : RawObject < Self > , } impl AudioEffectLowPassFilter { #... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectLowPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:52:1365 [INFO] [stdout] | [INFO] [stdout] 52 | ...camel_case_types)] # [derive (Debug)] pub struct AudioBusLayout { this : RawObject < Self > , } impl AudioBusLayout { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioBusLayout` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:94:1194 [INFO] [stdout] | [INFO] [stdout] 94 | ..._camel_case_types)] # [derive (Debug)] pub struct InputDefault { this : RawObject < Self > , } impl InputDefault { } impl gdnative_cor... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `InputDefault` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:112:1478 [INFO] [stdout] | [INFO] [stdout] 112 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { this : RawObject < Self > , } impl VisualShaderNodeVectorClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:148:1872 [INFO] [stdout] | [INFO] [stdout] 148 | ...camel_case_types)] # [derive (Debug)] pub struct MarginContainer { this : RawObject < Self > , } impl MarginContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `MarginContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:220:1293 [INFO] [stdout] | [INFO] [stdout] 220 | ...camel_case_types)] # [derive (Debug)] pub struct RootMotionView { this : RawObject < Self > , } impl RootMotionView { } impl gdnative_... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `RootMotionView` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:346:1349 [INFO] [stdout] | [INFO] [stdout] 346 | ...mel_case_types)] # [derive (Debug)] pub struct AudioEffectInstance { this : RawObject < Self > , } impl AudioEffectInstance { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectInstance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:352:1437 [INFO] [stdout] | [INFO] [stdout] 352 | ...mel_case_types)] # [derive (Debug)] pub struct AnimationNodeOutput { this : RawObject < Self > , } impl AnimationNodeOutput { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeOutput` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:394:1398 [INFO] [stdout] | [INFO] [stdout] 394 | ..._camel_case_types)] # [derive (Debug)] pub struct StyleBoxEmpty { this : RawObject < Self > , } impl StyleBoxEmpty { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `StyleBoxEmpty` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:400:1760 [INFO] [stdout] | [INFO] [stdout] 400 | ...n_camel_case_types)] # [derive (Debug)] pub struct Position3D { this : RawObject < Self > , } impl Position3D { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Position3D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:412:1478 [INFO] [stdout] | [INFO] [stdout] 412 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarClamp { this : RawObject < Self > , } impl VisualShaderNodeScalarClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:418:1458 [INFO] [stdout] | [INFO] [stdout] 418 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeSwitch { this : RawObject < Self > , } impl VisualShaderNodeSwitch { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:502:1258 [INFO] [stdout] | [INFO] [stdout] 502 | ...on_camel_case_types)] # [derive (Debug)] pub struct Separator { this : RawObject < Self > , } impl Separator { } impl gdnative_core ::... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Separator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:514:1462 [INFO] [stdout] | [INFO] [stdout] 514 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFresnel { this : RawObject < Self > , } impl VisualShaderNodeFresnel { # ... [INFO] [stdout] | ----------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeFresnel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:520:1434 [INFO] [stdout] | [INFO] [stdout] 520 | ...amel_case_types)] # [derive (Debug)] pub struct VisualScriptSelf { this : RawObject < Self > , } impl VisualScriptSelf { # [doc = "Cre... [INFO] [stdout] | ---------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSelf` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:526:1846 [INFO] [stdout] | [INFO] [stdout] 526 | ...non_camel_case_types)] # [derive (Debug)] pub struct HSlider { this : RawObject < Self > , } impl HSlider { # [doc = "Creates a new in... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSlider` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:556:1498 [INFO] [stdout] | [INFO] [stdout] 556 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSc... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:568:1842 [INFO] [stdout] | [INFO] [stdout] 568 | ...n_camel_case_types)] # [derive (Debug)] pub struct HSeparator { this : RawObject < Self > , } impl HSeparator { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSeparator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:574:1926 [INFO] [stdout] | [INFO] [stdout] 574 | ...camel_case_types)] # [derive (Debug)] pub struct HSplitContainer { this : RawObject < Self > , } impl HSplitContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSplitContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:580:1434 [INFO] [stdout] | [INFO] [stdout] 580 | ..._case_types)] # [derive (Debug)] pub struct AnimationTrackEditPlugin { this : RawObject < Self > , } impl AnimationTrackEditPlugin { }... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationTrackEditPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:640:1520 [INFO] [stdout] | [INFO] [stdout] 640 | ...case_types)] # [derive (Debug)] pub struct AudioEffectBandLimitFilter { this : RawObject < Self > , } impl AudioEffectBandLimitFilter ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectBandLimitFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:700:1460 [INFO] [stdout] | [INFO] [stdout] 700 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ6 { this : RawObject < Self > , } impl AudioEffectEQ6 { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ6` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:706:1458 [INFO] [stdout] | [INFO] [stdout] 706 | ...se_types)] # [derive (Debug)] pub struct EditorResourceConversionPlugin { this : RawObject < Self > , } impl EditorResourceConversionP... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorResourceConversionPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:760:1926 [INFO] [stdout] | [INFO] [stdout] 760 | ...camel_case_types)] # [derive (Debug)] pub struct VSplitContainer { this : RawObject < Self > , } impl VSplitContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VSplitContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:772:1482 [INFO] [stdout] | [INFO] [stdout] 772 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeOuterProduct { this : RawObject < Self > , } impl VisualShaderNodeOuterProdu... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeOuterProduct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:790:1906 [INFO] [stdout] | [INFO] [stdout] 790 | ...n_camel_case_types)] # [derive (Debug)] pub struct CSGCombiner { this : RawObject < Self > , } impl CSGCombiner { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CSGCombiner` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:802:1490 [INFO] [stdout] | [INFO] [stdout] 802 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDistance { this : RawObject < Self > , } impl VisualShaderNodeVectorDis... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorDistance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:808:1830 [INFO] [stdout] | [INFO] [stdout] 808 | ...n_camel_case_types)] # [derive (Debug)] pub struct PopupPanel { this : RawObject < Self > , } impl PopupPanel { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PopupPanel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:838:1862 [INFO] [stdout] | [INFO] [stdout] 838 | ...on_camel_case_types)] # [derive (Debug)] pub struct CheckBox { this : RawObject < Self > , } impl CheckBox { # [doc = "Creates a new i... [INFO] [stdout] | -------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CheckBox` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:904:1506 [INFO] [stdout] | [INFO] [stdout] 904 | ..._types)] # [derive (Debug)] pub struct VisualShaderNodeTransformDecompose { this : RawObject < Self > , } impl VisualShaderNodeTransfo... [INFO] [stdout] | ---------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformDecompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:940:1498 [INFO] [stdout] | [INFO] [stdout] 940 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeScalarSm... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1000:1908 [INFO] [stdout] | [INFO] [stdout] 1000 | ..._camel_case_types)] # [derive (Debug)] pub struct HBoxContainer { this : RawObject < Self > , } impl HBoxContainer { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HBoxContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1006:1846 [INFO] [stdout] | [INFO] [stdout] 1006 | ...non_camel_case_types)] # [derive (Debug)] pub struct VSlider { this : RawObject < Self > , } impl VSlider { # [doc = "Creates a new in... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VSlider` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1024:1494 [INFO] [stdout] | [INFO] [stdout] 1024 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarMix { this : RawObject < Self > , } impl VisualShaderNodeVectorSc... [INFO] [stdout] | ------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarMix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1054:1446 [INFO] [stdout] | [INFO] [stdout] 1054 | ...mel_case_types)] # [derive (Debug)] pub struct VisualScriptSubCall { this : RawObject < Self > , } impl VisualScriptSubCall { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSubCall` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1060:1337 [INFO] [stdout] | [INFO] [stdout] 1060 | ...amel_case_types)] # [derive (Debug)] pub struct ResourceImporter { this : RawObject < Self > , } impl ResourceImporter { } impl gdnati... [INFO] [stdout] | ---------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceImporter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1078:1474 [INFO] [stdout] | [INFO] [stdout] 1078 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeDotProduct { this : RawObject < Self > , } impl VisualShaderNodeDotProduct ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeDotProduct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1114:1553 [INFO] [stdout] | [INFO] [stdout] 1114 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSwitch { this : RawObject < Self > , } impl VisualShaderNodeScalarSwit... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1306:1454 [INFO] [stdout] | [INFO] [stdout] 1306 | ...ase_types)] # [derive (Debug)] pub struct AudioStreamPlaybackResampled { this : RawObject < Self > , } impl AudioStreamPlaybackResampl... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamPlaybackResampled` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1324:1707 [INFO] [stdout] | [INFO] [stdout] 1324 | ..._camel_case_types)] # [derive (Debug)] pub struct JNISingleton { this : RawObject < Self > , } impl JNISingleton { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `JNISingleton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1336:1450 [INFO] [stdout] | [INFO] [stdout] 1336 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptFunction { this : RawObject < Self > , } impl VisualScriptFunction { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptFunction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1342:1798 [INFO] [stdout] | [INFO] [stdout] 1342 | ...n_camel_case_types)] # [derive (Debug)] pub struct Position2D { this : RawObject < Self > , } impl Position2D { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Position2D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1366:1321 [INFO] [stdout] | [INFO] [stdout] 1366 | ..._camel_case_types)] # [derive (Debug)] pub struct SpatialGizmo { this : RawObject < Self > , } impl SpatialGizmo { } impl gdnative_cor... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `SpatialGizmo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1378:1458 [INFO] [stdout] | [INFO] [stdout] 1378 | ...l_case_types)] # [derive (Debug)] pub struct VisualScriptExpression { this : RawObject < Self > , } impl VisualScriptExpression { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptExpression` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1408:1426 [INFO] [stdout] | [INFO] [stdout] 1408 | ...on_camel_case_types)] # [derive (Debug)] pub struct PointMesh { this : RawObject < Self > , } impl PointMesh { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PointMesh` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1432:1408 [INFO] [stdout] | [INFO] [stdout] 1432 | ...el_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { this : RawObject < Self > , } impl ARVRInterfaceGDNative { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ARVRInterfaceGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1438:1353 [INFO] [stdout] | [INFO] [stdout] 1438 | ...n_camel_case_types)] # [derive (Debug)] pub struct AudioEffect { this : RawObject < Self > , } impl AudioEffect { } impl gdnative_core... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffect` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1468:1486 [INFO] [stdout] | [INFO] [stdout] 1468 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorRefract { this : RawObject < Self > , } impl VisualShaderNodeVectorRef... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorRefract` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1474:1244 [INFO] [stdout] | [INFO] [stdout] 1474 | ...amel_case_types)] # [derive (Debug)] pub struct Physics2DServerSW { this : RawObject < Self > , } impl Physics2DServerSW { } impl gdna... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Physics2DServerSW` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1528:1486 [INFO] [stdout] | [INFO] [stdout] 1528 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorCompose { this : RawObject < Self > , } impl VisualShaderNodeVectorCom... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorCompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1546:1771 [INFO] [stdout] | [INFO] [stdout] 1546 | ...(non_camel_case_types)] # [derive (Debug)] pub struct Panel { this : RawObject < Self > , } impl Panel { # [doc = "Creates a new insta... [INFO] [stdout] | ----- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Panel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1588:1341 [INFO] [stdout] | [INFO] [stdout] 1588 | ...on_camel_case_types)] # [derive (Debug)] pub struct TextFile { this : RawObject < Self > , } impl TextFile { # [doc = "Creates a new i... [INFO] [stdout] | -------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TextFile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1624:1307 [INFO] [stdout] | [INFO] [stdout] 1624 | ...case_types)] # [derive (Debug)] pub struct Physics2DDirectBodyStateSW { this : RawObject < Self > , } impl Physics2DDirectBodyStateSW ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Physics2DDirectBodyStateSW` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1654:1353 [INFO] [stdout] | [INFO] [stdout] 1654 | ...el_case_types)] # [derive (Debug)] pub struct ResourceFormatLoader { this : RawObject < Self > , } impl ResourceFormatLoader { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceFormatLoader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1660:1482 [INFO] [stdout] | [INFO] [stdout] 1660 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorInterp { this : RawObject < Self > , } impl VisualShaderNodeVectorInte... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorInterp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1708:1478 [INFO] [stdout] | [INFO] [stdout] 1708 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeDeterminant { this : RawObject < Self > , } impl VisualShaderNodeDeterminan... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeDeterminant` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1768:1498 [INFO] [stdout] | [INFO] [stdout] 1768 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSm... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1816:1246 [INFO] [stdout] | [INFO] [stdout] 1816 | ...mel_case_types)] # [derive (Debug)] pub struct BulletPhysicsServer { this : RawObject < Self > , } impl BulletPhysicsServer { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `BulletPhysicsServer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1828:1457 [INFO] [stdout] | [INFO] [stdout] 1828 | ...ase_types)] # [derive (Debug)] pub struct WebRTCPeerConnectionGDNative { this : RawObject < Self > , } impl WebRTCPeerConnectionGDNati... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `WebRTCPeerConnectionGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1858:1450 [INFO] [stdout] | [INFO] [stdout] 1858 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIndexGet { this : RawObject < Self > , } impl VisualScriptIndexGet { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIndexGet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1888:1552 [INFO] [stdout] | [INFO] [stdout] 1888 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeVec3Uniform { this : RawObject < Self > , } impl VisualShaderNodeVec3Unifor... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVec3Uniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1900:1454 [INFO] [stdout] | [INFO] [stdout] 1900 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptSceneTree { this : RawObject < Self > , } impl VisualScriptSceneTree { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSceneTree` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1912:1572 [INFO] [stdout] | [INFO] [stdout] 1912 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformUniform { this : RawObject < Self > , } impl VisualShaderNodeTransfor... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1930:1652 [INFO] [stdout] | [INFO] [stdout] 1930 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalEx... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeGlobalExpression` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1966:1450 [INFO] [stdout] | [INFO] [stdout] 1966 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIndexSet { this : RawObject < Self > , } impl VisualScriptIndexSet { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIndexSet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2008:1458 [INFO] [stdout] | [INFO] [stdout] 2008 | ...se_types)] # [derive (Debug)] pub struct EditorResourcePreviewGenerator { this : RawObject < Self > , } impl EditorResourcePreviewGene... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorResourcePreviewGenerator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2032:1442 [INFO] [stdout] | [INFO] [stdout] 2032 | ...mel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeIf { this : RawObject < Self > , } impl VisualShaderNodeIf { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeIf` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2050:1482 [INFO] [stdout] | [INFO] [stdout] 2050 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarInterp { this : RawObject < Self > , } impl VisualShaderNodeScalarInte... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarInterp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2092:1873 [INFO] [stdout] | [INFO] [stdout] 2092 | ...n_camel_case_types)] # [derive (Debug)] pub struct HScrollBar { this : RawObject < Self > , } impl HScrollBar { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HScrollBar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2104:1470 [INFO] [stdout] | [INFO] [stdout] 2104 | ..._case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorLen { this : RawObject < Self > , } impl VisualShaderNodeVectorLen {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorLen` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2128:1560 [INFO] [stdout] | [INFO] [stdout] 2128 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarUniform { this : RawObject < Self > , } impl VisualShaderNodeScalarUni... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2158:1349 [INFO] [stdout] | [INFO] [stdout] 2158 | ...mel_case_types)] # [derive (Debug)] pub struct ResourceFormatSaver { this : RawObject < Self > , } impl ResourceFormatSaver { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceFormatSaver` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2164:1365 [INFO] [stdout] | [INFO] [stdout] 2164 | ...camel_case_types)] # [derive (Debug)] pub struct RichTextEffect { this : RawObject < Self > , } impl RichTextEffect { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `RichTextEffect` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2176:1874 [INFO] [stdout] | [INFO] [stdout] 2176 | ...n_camel_case_types)] # [derive (Debug)] pub struct ToolButton { this : RawObject < Self > , } impl ToolButton { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ToolButton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2182:1908 [INFO] [stdout] | [INFO] [stdout] 2182 | ..._camel_case_types)] # [derive (Debug)] pub struct VBoxContainer { this : RawObject < Self > , } impl VBoxContainer { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VBoxContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2194:1442 [INFO] [stdout] | [INFO] [stdout] 2194 | ...mel_case_types)] # [derive (Debug)] pub struct VisualScriptSwitch { this : RawObject < Self > , } impl VisualScriptSwitch { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2248:1309 [INFO] [stdout] | [INFO] [stdout] 2248 | ...ase_types)] # [derive (Debug)] pub struct BulletPhysicsDirectBodyState { this : RawObject < Self > , } impl BulletPhysicsDirectBodySta... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `BulletPhysicsDirectBodyState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2266:1464 [INFO] [stdout] | [INFO] [stdout] 2266 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ21 { this : RawObject < Self > , } impl AudioEffectEQ21 { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ21` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2302:1353 [INFO] [stdout] | [INFO] [stdout] 2302 | ...n_camel_case_types)] # [derive (Debug)] pub struct VideoStream { this : RawObject < Self > , } impl VideoStream { } impl gdnative_core... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VideoStream` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2404:1450 [INFO] [stdout] | [INFO] [stdout] 2404 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIterator { this : RawObject < Self > , } impl VisualScriptIterator { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIterator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2428:1520 [INFO] [stdout] | [INFO] [stdout] 2428 | ...case_types)] # [derive (Debug)] pub struct AudioEffectHighShelfFilter { this : RawObject < Self > , } impl AudioEffectHighShelfFilter ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectHighShelfFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2434:1445 [INFO] [stdout] | [INFO] [stdout] 2434 | ...el_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeSeek { this : RawObject < Self > , } impl AnimationNodeTimeSeek { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeTimeSeek` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2482:1458 [INFO] [stdout] | [INFO] [stdout] 2482 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOutput { this : RawObject < Self > , } impl VisualShaderNodeOutput { } im... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeOutput` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2494:1564 [INFO] [stdout] | [INFO] [stdout] 2494 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeBooleanUniform { this : RawObject < Self > , } impl VisualShaderNodeBooleanUn... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeBooleanUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2506:1464 [INFO] [stdout] | [INFO] [stdout] 2506 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ10 { this : RawObject < Self > , } impl AudioEffectEQ10 { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ10` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2674:1498 [INFO] [stdout] | [INFO] [stdout] 2674 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformCompose { this : RawObject < Self > , } impl VisualShaderNodeTransfor... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformCompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2698:1494 [INFO] [stdout] | [INFO] [stdout] 2698 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDecompose { this : RawObject < Self > , } impl VisualShaderNodeVectorDe... [INFO] [stdout] | ------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorDecompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2722:1832 [INFO] [stdout] | [INFO] [stdout] 2722 | ...on_camel_case_types)] # [derive (Debug)] pub struct SpotLight { this : RawObject < Self > , } impl SpotLight { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `SpotLight` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2776:1836 [INFO] [stdout] | [INFO] [stdout] 2776 | ...n_camel_case_types)] # [derive (Debug)] pub struct PopupDialog { this : RawObject < Self > , } impl PopupDialog { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PopupDialog` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2818:1522 [INFO] [stdout] | [INFO] [stdout] 2818 | ..._case_types)] # [derive (Debug)] pub struct VisualScriptComposeArray { this : RawObject < Self > , } impl VisualScriptComposeArray { #... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptComposeArray` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2836:1387 [INFO] [stdout] | [INFO] [stdout] 2836 | ...mel_case_types)] # [derive (Debug)] pub struct StreamPeerGDNative { this : RawObject < Self > , } impl StreamPeerGDNative { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `StreamPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2878:1309 [INFO] [stdout] | [INFO] [stdout] 2878 | ...on_camel_case_types)] # [derive (Debug)] pub struct JavaClass { this : RawObject < Self > , } impl JavaClass { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `JavaClass` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2890:1516 [INFO] [stdout] | [INFO] [stdout] 2890 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectBandPassFilter { this : RawObject < Self > , } impl AudioEffectBandPassFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectBandPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2920:1438 [INFO] [stdout] | [INFO] [stdout] 2920 | ...amel_case_types)] # [derive (Debug)] pub struct VisualScriptWhile { this : RawObject < Self > , } impl VisualScriptWhile { # [doc = "C... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptWhile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2950:1165 [INFO] [stdout] | [INFO] [stdout] 2950 | ...non_camel_case_types)] # [derive (Debug)] pub struct IP_Unix { this : RawObject < Self > , } impl IP_Unix { } impl gdnative_core :: pr... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `IP_Unix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2992:1490 [INFO] [stdout] | [INFO] [stdout] 2992 | ...l_case_types)] # [derive (Debug)] pub struct MultiplayerPeerGDNative { this : RawObject < Self > , } impl MultiplayerPeerGDNative { # ... [INFO] [stdout] | ----------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `MultiplayerPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3046:1349 [INFO] [stdout] | [INFO] [stdout] 3046 | ...mel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayback { this : RawObject < Self > , } impl AudioStreamPlayback { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamPlayback` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3058:1880 [INFO] [stdout] | [INFO] [stdout] 3058 | ...n_camel_case_types)] # [derive (Debug)] pub struct CheckButton { this : RawObject < Self > , } impl CheckButton { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CheckButton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3076:1866 [INFO] [stdout] | [INFO] [stdout] 3076 | ...camel_case_types)] # [derive (Debug)] pub struct PanelContainer { this : RawObject < Self > , } impl PanelContainer { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PanelContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3100:1688 [INFO] [stdout] | [INFO] [stdout] 3100 | ...ypes)] # [derive (Debug)] pub struct VisualShaderNodeTextureUniformTriplanar { this : RawObject < Self > , } impl VisualShaderNodeText... [INFO] [stdout] | --------------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTextureUniformTriplanar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3106:1454 [INFO] [stdout] | [INFO] [stdout] 3106 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptCondition { this : RawObject < Self > , } impl VisualScriptCondition { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptCondition` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3130:1842 [INFO] [stdout] | [INFO] [stdout] 3130 | ...n_camel_case_types)] # [derive (Debug)] pub struct VSeparator { this : RawObject < Self > , } impl VSeparator { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VSeparator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3136:1478 [INFO] [stdout] | [INFO] [stdout] 3136 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeFaceForward { this : RawObject < Self > , } impl VisualShaderNodeFaceForwar... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeFaceForward` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3142:1792 [INFO] [stdout] | [INFO] [stdout] 3142 | ...n_camel_case_types)] # [derive (Debug)] pub struct ARVRCamera { this : RawObject < Self > , } impl ARVRCamera { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ARVRCamera` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3196:1522 [INFO] [stdout] | [INFO] [stdout] 3196 | ...ypes)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVecto... [INFO] [stdout] | -------------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3208:1387 [INFO] [stdout] | [INFO] [stdout] 3208 | ...mel_case_types)] # [derive (Debug)] pub struct PacketPeerGDNative { this : RawObject < Self > , } impl PacketPeerGDNative { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PacketPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3244:1400 [INFO] [stdout] | [INFO] [stdout] 3244 | ...on_camel_case_types)] # [derive (Debug)] pub struct Texture3D { this : RawObject < Self > , } impl Texture3D { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Texture3D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3262:1186 [INFO] [stdout] | [INFO] [stdout] 3262 | ...camel_case_types)] # [derive (Debug)] pub struct GlobalConstants { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_u... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `GlobalConstants` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3280:1495 [INFO] [stdout] | [INFO] [stdout] 3280 | ...l_case_types)] # [derive (Debug)] pub struct EditorSceneImporterFBX { this : RawObject < Self > , } impl EditorSceneImporterFBX { } im... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorSceneImporterFBX` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3358:1477 [INFO] [stdout] | [INFO] [stdout] 3358 | ..._case_types)] # [derive (Debug)] pub struct WebRTCDataChannelGDNative { this : RawObject < Self > , } impl WebRTCDataChannelGDNative {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `WebRTCDataChannelGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3370:1429 [INFO] [stdout] | [INFO] [stdout] 3370 | ...amel_case_types)] # [derive (Debug)] pub struct AnimationRootNode { this : RawObject < Self > , } impl AnimationRootNode { # [doc = "C... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationRootNode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3448:1458 [INFO] [stdout] | [INFO] [stdout] 3448 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCustom { this : RawObject < Self > , } impl VisualShaderNodeCustom { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeCustom` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3460:1458 [INFO] [stdout] | [INFO] [stdout] 3460 | ...l_case_types)] # [derive (Debug)] pub struct VisualScriptCustomNode { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , ... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptCustomNode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3484:1504 [INFO] [stdout] | [INFO] [stdout] 3484 | ...l_case_types)] # [derive (Debug)] pub struct AudioEffectNotchFilter { this : RawObject < Self > , } impl AudioEffectNotchFilter { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectNotchFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3490:1412 [INFO] [stdout] | [INFO] [stdout] 3490 | ..._camel_case_types)] # [derive (Debug)] pub struct TextureArray { this : RawObject < Self > , } impl TextureArray { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TextureArray` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3538:1516 [INFO] [stdout] | [INFO] [stdout] 3538 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectHighPassFilter { this : RawObject < Self > , } impl AudioEffectHighPassFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectHighPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3574:1652 [INFO] [stdout] | [INFO] [stdout] 3574 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeCubeMapUniform { this : RawObject < Self > , } impl VisualShaderNodeCubeMapUn... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeCubeMapUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3592:1516 [INFO] [stdout] | [INFO] [stdout] 3592 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectLowShelfFilter { this : RawObject < Self > , } impl AudioEffectLowShelfFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectLowShelfFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3598:1873 [INFO] [stdout] | [INFO] [stdout] 3598 | ...n_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { this : RawObject < Self > , } impl VScrollBar { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VScrollBar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3640:1449 [INFO] [stdout] | [INFO] [stdout] 3640 | ...l_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeScale { this : RawObject < Self > , } impl AnimationNodeTimeScale { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeTimeScale` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3700:1321 [INFO] [stdout] | [INFO] [stdout] 3700 | ..._camel_case_types)] # [derive (Debug)] pub struct TriangleMesh { this : RawObject < Self > , } impl TriangleMesh { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TriangleMesh` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3718:1556 [INFO] [stdout] | [INFO] [stdout] 3718 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeColorUniform { this : RawObject < Self > , } impl VisualShaderNodeColorUnifo... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeColorUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3748:1470 [INFO] [stdout] | [INFO] [stdout] 3748 | ...mel_case_types)] # [derive (Debug)] pub struct EditorImportPlugin { this : RawObject < Self > , } impl EditorImportPlugin { } impl gdn... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorImportPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:4:11175 [INFO] [stdout] | [INFO] [stdout] 4 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 4 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:10:3599 [INFO] [stdout] | [INFO] [stdout] 10 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 10 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:16:6114 [INFO] [stdout] | [INFO] [stdout] 16 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 16 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:22:7833 [INFO] [stdout] | [INFO] [stdout] 22 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 22 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:28:6442 [INFO] [stdout] | [INFO] [stdout] 28 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 28 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_recording = (gd_api . godot_method_bind_get_method) (class_name , "get_recording\0" . as_ptr () as * const c_char) ; table . is_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "is_recording_active\0" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\0" . as_ptr () as * const c_char) ; table . set_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "set_recording_active\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:34:3883 [INFO] [stdout] | [INFO] [stdout] 34 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 34 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:40:12374 [INFO] [stdout] | [INFO] [stdout] 40 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 40 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_property_info = (gd_api . godot_method_bind_get_method) (class_name , "add_property_info\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_order = (gd_api . godot_method_bind_get_method) (class_name , "get_order\0" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\0" . as_ptr () as * const c_char) ; table . globalize_path = (gd_api . godot_method_bind_get_method) (class_name , "globalize_path\0" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\0" . as_ptr () as * const c_char) ; table . load_resource_pack = (gd_api . godot_method_bind_get_method) (class_name , "load_resource_pack\0" . as_ptr () as * const c_char) ; table . localize_path = (gd_api . godot_method_bind_get_method) (class_name , "localize_path\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_custom = (gd_api . godot_method_bind_get_method) (class_name , "save_custom\0" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\0" . as_ptr () as * const c_char) ; table . set_order = (gd_api . godot_method_bind_get_method) (class_name , "set_order\0" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:46:10770 [INFO] [stdout] | [INFO] [stdout] 46 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 46 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_build_mode\0" . as_ptr () as * const c_char) ; table . get_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . set_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_build_mode\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision\0" . as_ptr () as * const c_char) ; table . set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:52:3287 [INFO] [stdout] | [INFO] [stdout] 52 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 52 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:58:3598 [INFO] [stdout] | [INFO] [stdout] 58 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 58 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:64:7729 [INFO] [stdout] | [INFO] [stdout] 64 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 64 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clamp_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "clamp_split_offset\0" . as_ptr () as * const c_char) ; table . get_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "get_dragger_visibility\0" . as_ptr () as * const c_char) ; table . get_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_split_offset\0" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\0" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\0" . as_ptr () as * const c_char) ; table . set_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_dragger_visibility\0" . as_ptr () as * const c_char) ; table . set_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_split_offset\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:70:60563 [INFO] [stdout] | [INFO] [stdout] 70 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 70 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_color_region = (gd_api . godot_method_bind_get_method) (class_name , "add_color_region\0" . as_ptr () as * const c_char) ; table . add_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "add_keyword_color\0" . as_ptr () as * const c_char) ; table . can_fold = (gd_api . godot_method_bind_get_method) (class_name , "can_fold\0" . as_ptr () as * const c_char) ; table . center_viewport_to_cursor = (gd_api . godot_method_bind_get_method) (class_name , "center_viewport_to_cursor\0" . as_ptr () as * const c_char) ; table . clear_colors = (gd_api . godot_method_bind_get_method) (class_name , "clear_colors\0" . as_ptr () as * const c_char) ; table . clear_undo_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_undo_history\0" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_get_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_column\0" . as_ptr () as * const c_char) ; table . cursor_get_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_line\0" . as_ptr () as * const c_char) ; table . cursor_is_block_mode = (gd_api . godot_method_bind_get_method) (class_name , "cursor_is_block_mode\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_set_block_mode = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_block_mode\0" . as_ptr () as * const c_char) ; table . cursor_set_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_column\0" . as_ptr () as * const c_char) ; table . cursor_set_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_line\0" . as_ptr () as * const c_char) ; table . cut = (gd_api . godot_method_bind_get_method) (class_name , "cut\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . draw_minimap = (gd_api . godot_method_bind_get_method) (class_name , "draw_minimap\0" . as_ptr () as * const c_char) ; table . fold_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "fold_all_lines\0" . as_ptr () as * const c_char) ; table . fold_line = (gd_api . godot_method_bind_get_method) (class_name , "fold_line\0" . as_ptr () as * const c_char) ; table . get_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "get_breakpoints\0" . as_ptr () as * const c_char) ; table . get_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scroll\0" . as_ptr () as * const c_char) ; table . get_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "get_keyword_color\0" . as_ptr () as * const c_char) ; table . get_line = (gd_api . godot_method_bind_get_method) (class_name , "get_line\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\0" . as_ptr () as * const c_char) ; table . get_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_width\0" . as_ptr () as * const c_char) ; table . get_selection_from_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_from_column\0" . as_ptr () as * const c_char) ; table . get_selection_from_line = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_from_line\0" . as_ptr () as * const c_char) ; table . get_selection_text = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_text\0" . as_ptr () as * const c_char) ; table . get_selection_to_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_to_column\0" . as_ptr () as * const c_char) ; table . get_selection_to_line = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_to_line\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_v_scroll_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll_speed\0" . as_ptr () as * const c_char) ; table . get_word_under_cursor = (gd_api . godot_method_bind_get_method) (class_name , "get_word_under_cursor\0" . as_ptr () as * const c_char) ; table . has_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "has_keyword_color\0" . as_ptr () as * const c_char) ; table . insert_text_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "insert_text_at_cursor\0" . as_ptr () as * const c_char) ; table . is_breakpoint_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_breakpoint_gutter_enabled\0" . as_ptr () as * const c_char) ; table . is_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . is_drawing_fold_gutter = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_fold_gutter\0" . as_ptr () as * const c_char) ; table . is_drawing_minimap = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_minimap\0" . as_ptr () as * const c_char) ; table . is_drawing_spaces = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_spaces\0" . as_ptr () as * const c_char) ; table . is_drawing_tabs = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_tabs\0" . as_ptr () as * const c_char) ; table . is_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_folded\0" . as_ptr () as * const c_char) ; table . is_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_hiding_enabled\0" . as_ptr () as * const c_char) ; table . is_highlight_all_occurrences_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_highlight_all_occurrences_enabled\0" . as_ptr () as * const c_char) ; table . is_highlight_current_line_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_highlight_current_line_enabled\0" . as_ptr () as * const c_char) ; table . is_line_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_line_hidden\0" . as_ptr () as * const c_char) ; table . is_line_set_as_bookmark = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_bookmark\0" . as_ptr () as * const c_char) ; table . is_line_set_as_breakpoint = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_breakpoint\0" . as_ptr () as * const c_char) ; table . is_line_set_as_safe = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_safe\0" . as_ptr () as * const c_char) ; table . is_overriding_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_selected_font_color\0" . as_ptr () as * const c_char) ; table . is_readonly = (gd_api . godot_method_bind_get_method) (class_name , "is_readonly\0" . as_ptr () as * const c_char) ; table . is_right_click_moving_caret = (gd_api . godot_method_bind_get_method) (class_name , "is_right_click_moving_caret\0" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\0" . as_ptr () as * const c_char) ; table . is_selection_active = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_active\0" . as_ptr () as * const c_char) ; table . is_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . is_show_line_numbers_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_show_line_numbers_enabled\0" . as_ptr () as * const c_char) ; table . is_smooth_scroll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_smooth_scroll_enabled\0" . as_ptr () as * const c_char) ; table . is_syntax_coloring_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_syntax_coloring_enabled\0" . as_ptr () as * const c_char) ; table . is_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . is_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_wrap_enabled\0" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\0" . as_ptr () as * const c_char) ; table . paste = (gd_api . godot_method_bind_get_method) (class_name , "paste\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . remove_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "remove_breakpoints\0" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\0" . as_ptr () as * const c_char) ; table . set_breakpoint_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_breakpoint_gutter_enabled\0" . as_ptr () as * const c_char) ; table . set_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_fold_gutter = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_fold_gutter\0" . as_ptr () as * const c_char) ; table . set_draw_spaces = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_spaces\0" . as_ptr () as * const c_char) ; table . set_draw_tabs = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_tabs\0" . as_ptr () as * const c_char) ; table . set_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_h_scroll\0" . as_ptr () as * const c_char) ; table . set_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_hiding_enabled\0" . as_ptr () as * const c_char) ; table . set_highlight_all_occurrences = (gd_api . godot_method_bind_get_method) (class_name , "set_highlight_all_occurrences\0" . as_ptr () as * const c_char) ; table . set_highlight_current_line = (gd_api . godot_method_bind_get_method) (class_name , "set_highlight_current_line\0" . as_ptr () as * const c_char) ; table . set_line = (gd_api . godot_method_bind_get_method) (class_name , "set_line\0" . as_ptr () as * const c_char) ; table . set_line_as_bookmark = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_bookmark\0" . as_ptr () as * const c_char) ; table . set_line_as_breakpoint = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_breakpoint\0" . as_ptr () as * const c_char) ; table . set_line_as_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_hidden\0" . as_ptr () as * const c_char) ; table . set_line_as_safe = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_safe\0" . as_ptr () as * const c_char) ; table . set_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_width\0" . as_ptr () as * const c_char) ; table . set_override_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "set_override_selected_font_color\0" . as_ptr () as * const c_char) ; table . set_readonly = (gd_api . godot_method_bind_get_method) (class_name , "set_readonly\0" . as_ptr () as * const c_char) ; table . set_right_click_moves_caret = (gd_api . godot_method_bind_get_method) (class_name , "set_right_click_moves_caret\0" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\0" . as_ptr () as * const c_char) ; table . set_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . set_show_line_numbers = (gd_api . godot_method_bind_get_method) (class_name , "set_show_line_numbers\0" . as_ptr () as * const c_char) ; table . set_smooth_scroll_enable = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_scroll_enable\0" . as_ptr () as * const c_char) ; table . set_syntax_coloring = (gd_api . godot_method_bind_get_method) (class_name , "set_syntax_coloring\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll\0" . as_ptr () as * const c_char) ; table . set_v_scroll_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll_speed\0" . as_ptr () as * const c_char) ; table . set_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . set_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_wrap_enabled\0" . as_ptr () as * const c_char) ; table . toggle_fold_line = (gd_api . godot_method_bind_get_method) (class_name , "toggle_fold_line\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; table . unfold_line = (gd_api . godot_method_bind_get_method) (class_name , "unfold_line\0" . as_ptr () as * const c_char) ; table . unhide_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "unhide_all_lines\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:76:28077 [INFO] [stdout] | [INFO] [stdout] 76 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 76 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . follow_method = (gd_api . godot_method_bind_get_method) (class_name , "follow_method\0" . as_ptr () as * const c_char) ; table . follow_property = (gd_api . godot_method_bind_get_method) (class_name , "follow_property\0" . as_ptr () as * const c_char) ; table . get_runtime = (gd_api . godot_method_bind_get_method) (class_name , "get_runtime\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_tween_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_tween_process_mode\0" . as_ptr () as * const c_char) ; table . interpolate_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_callback\0" . as_ptr () as * const c_char) ; table . interpolate_deferred_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_deferred_callback\0" . as_ptr () as * const c_char) ; table . interpolate_method = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_method\0" . as_ptr () as * const c_char) ; table . interpolate_property = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_property\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . is_repeat = (gd_api . godot_method_bind_get_method) (class_name , "is_repeat\0" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\0" . as_ptr () as * const c_char) ; table . remove_all = (gd_api . godot_method_bind_get_method) (class_name , "remove_all\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . reset_all = (gd_api . godot_method_bind_get_method) (class_name , "reset_all\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; table . resume_all = (gd_api . godot_method_bind_get_method) (class_name , "resume_all\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_repeat = (gd_api . godot_method_bind_get_method) (class_name , "set_repeat\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_tween_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_tween_process_mode\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . stop_all = (gd_api . godot_method_bind_get_method) (class_name , "stop_all\0" . as_ptr () as * const c_char) ; table . targeting_method = (gd_api . godot_method_bind_get_method) (class_name , "targeting_method\0" . as_ptr () as * const c_char) ; table . targeting_property = (gd_api . godot_method_bind_get_method) (class_name , "targeting_property\0" . as_ptr () as * const c_char) ; table . tell = (gd_api . godot_method_bind_get_method) (class_name , "tell\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:82:6013 [INFO] [stdout] | [INFO] [stdout] 82 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 82 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_math_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_math_constant\0" . as_ptr () as * const c_char) ; table . set_math_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_math_constant\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:88:11569 [INFO] [stdout] | [INFO] [stdout] 88 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 88 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_hand = (gd_api . godot_method_bind_get_method) (class_name , "get_hand\0" . as_ptr () as * const c_char) ; table . get_joy_id = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_id\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_orientation\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_rumble = (gd_api . godot_method_bind_get_method) (class_name , "get_rumble\0" . as_ptr () as * const c_char) ; table . get_tracker_id = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_id\0" . as_ptr () as * const c_char) ; table . get_tracks_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_orientation\0" . as_ptr () as * const c_char) ; table . get_tracks_position = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_position\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_type = (gd_api . godot_method_bind_get_method) (class_name , "get_type\0" . as_ptr () as * const c_char) ; table . set_rumble = (gd_api . godot_method_bind_get_method) (class_name , "set_rumble\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:100:36435 [INFO] [stdout] | [INFO] [stdout] 100 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 100 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_force\0" . as_ptr () as * const c_char) ; table . get_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_torque\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\0" . as_ptr () as * const c_char) ; table . get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inertia\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_able_to_sleep = (gd_api . godot_method_bind_get_method) (class_name , "is_able_to_sleep\0" . as_ptr () as * const c_char) ; table . is_contact_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_contact_monitor_enabled\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . is_using_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "is_using_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_force\0" . as_ptr () as * const c_char) ; table . set_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_torque\0" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\0" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\0" . as_ptr () as * const c_char) ; table . set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_inertia = (gd_api . godot_method_bind_get_method) (class_name , "set_inertia\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\0" . as_ptr () as * const c_char) ; table . set_use_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "set_use_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; table . test_motion = (gd_api . godot_method_bind_get_method) (class_name , "test_motion\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:106:5564 [INFO] [stdout] | [INFO] [stdout] 106 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 106 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constructor = (gd_api . godot_method_bind_get_method) (class_name , "get_constructor\0" . as_ptr () as * const c_char) ; table . get_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "get_constructor_type\0" . as_ptr () as * const c_char) ; table . set_constructor = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor\0" . as_ptr () as * const c_char) ; table . set_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:112:3784 [INFO] [stdout] | [INFO] [stdout] 112 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 112 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:118:12387 [INFO] [stdout] | [INFO] [stdout] 118 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 118 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_button = (gd_api . godot_method_bind_get_method) (class_name , "add_button\0" . as_ptr () as * const c_char) ; table . add_cancel = (gd_api . godot_method_bind_get_method) (class_name , "add_cancel\0" . as_ptr () as * const c_char) ; table . get_hide_on_ok = (gd_api . godot_method_bind_get_method) (class_name , "get_hide_on_ok\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_ok = (gd_api . godot_method_bind_get_method) (class_name , "get_ok\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . has_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "has_autowrap\0" . as_ptr () as * const c_char) ; table . register_text_enter = (gd_api . godot_method_bind_get_method) (class_name , "register_text_enter\0" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\0" . as_ptr () as * const c_char) ; table . set_hide_on_ok = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_ok\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:124:13362 [INFO] [stdout] | [INFO] [stdout] 124 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 124 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_convex_collision = (gd_api . godot_method_bind_get_method) (class_name , "create_convex_collision\0" . as_ptr () as * const c_char) ; table . create_debug_tangents = (gd_api . godot_method_bind_get_method) (class_name , "create_debug_tangents\0" . as_ptr () as * const c_char) ; table . create_trimesh_collision = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_collision\0" . as_ptr () as * const c_char) ; table . get_active_material = (gd_api . godot_method_bind_get_method) (class_name , "get_active_material\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_path\0" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\0" . as_ptr () as * const c_char) ; table . get_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_material\0" . as_ptr () as * const c_char) ; table . get_surface_material_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_material_count\0" . as_ptr () as * const c_char) ; table . is_software_skinning_transform_normals_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_software_skinning_transform_normals_enabled\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton_path\0" . as_ptr () as * const c_char) ; table . set_skin = (gd_api . godot_method_bind_get_method) (class_name , "set_skin\0" . as_ptr () as * const c_char) ; table . set_software_skinning_transform_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_software_skinning_transform_normals\0" . as_ptr () as * const c_char) ; table . set_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "set_surface_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:130:4309 [INFO] [stdout] | [INFO] [stdout] 130 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 130 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:136:5720 [INFO] [stdout] | [INFO] [stdout] 136 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 136 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . is_flat = (gd_api . godot_method_bind_get_method) (class_name , "is_flat\0" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\0" . as_ptr () as * const c_char) ; table . set_flat = (gd_api . godot_method_bind_get_method) (class_name , "set_flat\0" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\0" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:142:7568 [INFO] [stdout] | [INFO] [stdout] 142 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 142 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_current_length = (gd_api . godot_method_bind_get_method) (class_name , "get_current_length\0" . as_ptr () as * const c_char) ; table . get_current_node = (gd_api . godot_method_bind_get_method) (class_name , "get_current_node\0" . as_ptr () as * const c_char) ; table . get_current_play_position = (gd_api . godot_method_bind_get_method) (class_name , "get_current_play_position\0" . as_ptr () as * const c_char) ; table . get_travel_path = (gd_api . godot_method_bind_get_method) (class_name , "get_travel_path\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . travel = (gd_api . godot_method_bind_get_method) (class_name , "travel\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:148:4589 [INFO] [stdout] | [INFO] [stdout] 148 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 148 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:154:17437 [INFO] [stdout] | [INFO] [stdout] 154 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 154 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close_connection = (gd_api . godot_method_bind_get_method) (class_name , "close_connection\0" . as_ptr () as * const c_char) ; table . create_client = (gd_api . godot_method_bind_get_method) (class_name , "create_client\0" . as_ptr () as * const c_char) ; table . create_server = (gd_api . godot_method_bind_get_method) (class_name , "create_server\0" . as_ptr () as * const c_char) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\0" . as_ptr () as * const c_char) ; table . get_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "get_channel_count\0" . as_ptr () as * const c_char) ; table . get_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_compression_mode\0" . as_ptr () as * const c_char) ; table . get_last_packet_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_last_packet_channel\0" . as_ptr () as * const c_char) ; table . get_packet_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_channel\0" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\0" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\0" . as_ptr () as * const c_char) ; table . get_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_channel\0" . as_ptr () as * const c_char) ; table . is_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_always_ordered\0" . as_ptr () as * const c_char) ; table . is_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dtls_enabled\0" . as_ptr () as * const c_char) ; table . is_dtls_verify_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dtls_verify_enabled\0" . as_ptr () as * const c_char) ; table . is_server_relay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_server_relay_enabled\0" . as_ptr () as * const c_char) ; table . set_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "set_always_ordered\0" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\0" . as_ptr () as * const c_char) ; table . set_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "set_channel_count\0" . as_ptr () as * const c_char) ; table . set_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compression_mode\0" . as_ptr () as * const c_char) ; table . set_dtls_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_certificate\0" . as_ptr () as * const c_char) ; table . set_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_enabled\0" . as_ptr () as * const c_char) ; table . set_dtls_key = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_key\0" . as_ptr () as * const c_char) ; table . set_dtls_verify_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_verify_enabled\0" . as_ptr () as * const c_char) ; table . set_peer_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_peer_timeout\0" . as_ptr () as * const c_char) ; table . set_server_relay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_server_relay_enabled\0" . as_ptr () as * const c_char) ; table . set_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_channel\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:160:12136 [INFO] [stdout] | [INFO] [stdout] 160 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 160 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . cast_motion = (gd_api . godot_method_bind_get_method) (class_name , "cast_motion\0" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\0" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\0" . as_ptr () as * const c_char) ; table . intersect_point = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point\0" . as_ptr () as * const c_char) ; table . intersect_point_on_canvas = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point_on_canvas\0" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\0" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:166:85086 [INFO] [stdout] | [INFO] [stdout] 166 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 166 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_albedo = (gd_api . godot_method_bind_get_method) (class_name , "get_albedo\0" . as_ptr () as * const c_char) ; table . get_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . get_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "get_anisotropy\0" . as_ptr () as * const c_char) ; table . get_ao_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ao_light_affect\0" . as_ptr () as * const c_char) ; table . get_ao_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_ao_texture_channel\0" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\0" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat\0" . as_ptr () as * const c_char) ; table . get_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat_gloss\0" . as_ptr () as * const c_char) ; table . get_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mode\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_flip_binormal = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_flip_binormal\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_flip_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_flip_tangent\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_max_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_max_layers\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_min_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_min_layers\0" . as_ptr () as * const c_char) ; table . get_depth_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_draw_mode\0" . as_ptr () as * const c_char) ; table . get_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_scale\0" . as_ptr () as * const c_char) ; table . get_detail_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_blend_mode\0" . as_ptr () as * const c_char) ; table . get_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_uv\0" . as_ptr () as * const c_char) ; table . get_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_diffuse_mode\0" . as_ptr () as * const c_char) ; table . get_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade\0" . as_ptr () as * const c_char) ; table . get_distance_fade_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade_max_distance\0" . as_ptr () as * const c_char) ; table . get_distance_fade_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade_min_distance\0" . as_ptr () as * const c_char) ; table . get_emission = (gd_api . godot_method_bind_get_method) (class_name , "get_emission\0" . as_ptr () as * const c_char) ; table . get_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_energy\0" . as_ptr () as * const c_char) ; table . get_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_operator\0" . as_ptr () as * const c_char) ; table . get_feature = (gd_api . godot_method_bind_get_method) (class_name , "get_feature\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_grow = (gd_api . godot_method_bind_get_method) (class_name , "get_grow\0" . as_ptr () as * const c_char) ; table . get_line_width = (gd_api . godot_method_bind_get_method) (class_name , "get_line_width\0" . as_ptr () as * const c_char) ; table . get_metallic = (gd_api . godot_method_bind_get_method) (class_name , "get_metallic\0" . as_ptr () as * const c_char) ; table . get_metallic_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_metallic_texture_channel\0" . as_ptr () as * const c_char) ; table . get_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_scale\0" . as_ptr () as * const c_char) ; table . get_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . get_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . get_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . get_point_size = (gd_api . godot_method_bind_get_method) (class_name , "get_point_size\0" . as_ptr () as * const c_char) ; table . get_proximity_fade_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_proximity_fade_distance\0" . as_ptr () as * const c_char) ; table . get_refraction = (gd_api . godot_method_bind_get_method) (class_name , "get_refraction\0" . as_ptr () as * const c_char) ; table . get_refraction_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_refraction_texture_channel\0" . as_ptr () as * const c_char) ; table . get_rim = (gd_api . godot_method_bind_get_method) (class_name , "get_rim\0" . as_ptr () as * const c_char) ; table . get_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "get_rim_tint\0" . as_ptr () as * const c_char) ; table . get_roughness = (gd_api . godot_method_bind_get_method) (class_name , "get_roughness\0" . as_ptr () as * const c_char) ; table . get_roughness_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_roughness_texture_channel\0" . as_ptr () as * const c_char) ; table . get_specular = (gd_api . godot_method_bind_get_method) (class_name , "get_specular\0" . as_ptr () as * const c_char) ; table . get_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_specular_mode\0" . as_ptr () as * const c_char) ; table . get_subsurface_scattering_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_subsurface_scattering_strength\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_transmission = (gd_api . godot_method_bind_get_method) (class_name , "get_transmission\0" . as_ptr () as * const c_char) ; table . get_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_offset\0" . as_ptr () as * const c_char) ; table . get_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_scale\0" . as_ptr () as * const c_char) ; table . get_uv1_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . get_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_offset\0" . as_ptr () as * const c_char) ; table . get_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_scale\0" . as_ptr () as * const c_char) ; table . get_uv2_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . is_depth_deep_parallax_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_depth_deep_parallax_enabled\0" . as_ptr () as * const c_char) ; table . is_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_grow_enabled\0" . as_ptr () as * const c_char) ; table . is_proximity_fade_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_proximity_fade_enabled\0" . as_ptr () as * const c_char) ; table . set_albedo = (gd_api . godot_method_bind_get_method) (class_name , "set_albedo\0" . as_ptr () as * const c_char) ; table . set_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . set_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "set_anisotropy\0" . as_ptr () as * const c_char) ; table . set_ao_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ao_light_affect\0" . as_ptr () as * const c_char) ; table . set_ao_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_ao_texture_channel\0" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat\0" . as_ptr () as * const c_char) ; table . set_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat_gloss\0" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_flip_binormal = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_flip_binormal\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_flip_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_flip_tangent\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_max_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_max_layers\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_min_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_min_layers\0" . as_ptr () as * const c_char) ; table . set_depth_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_draw_mode\0" . as_ptr () as * const c_char) ; table . set_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_scale\0" . as_ptr () as * const c_char) ; table . set_detail_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_blend_mode\0" . as_ptr () as * const c_char) ; table . set_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_uv\0" . as_ptr () as * const c_char) ; table . set_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_diffuse_mode\0" . as_ptr () as * const c_char) ; table . set_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade\0" . as_ptr () as * const c_char) ; table . set_distance_fade_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade_max_distance\0" . as_ptr () as * const c_char) ; table . set_distance_fade_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade_min_distance\0" . as_ptr () as * const c_char) ; table . set_emission = (gd_api . godot_method_bind_get_method) (class_name , "set_emission\0" . as_ptr () as * const c_char) ; table . set_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_energy\0" . as_ptr () as * const c_char) ; table . set_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_operator\0" . as_ptr () as * const c_char) ; table . set_feature = (gd_api . godot_method_bind_get_method) (class_name , "set_feature\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_grow = (gd_api . godot_method_bind_get_method) (class_name , "set_grow\0" . as_ptr () as * const c_char) ; table . set_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_enabled\0" . as_ptr () as * const c_char) ; table . set_line_width = (gd_api . godot_method_bind_get_method) (class_name , "set_line_width\0" . as_ptr () as * const c_char) ; table . set_metallic = (gd_api . godot_method_bind_get_method) (class_name , "set_metallic\0" . as_ptr () as * const c_char) ; table . set_metallic_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_metallic_texture_channel\0" . as_ptr () as * const c_char) ; table . set_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_scale\0" . as_ptr () as * const c_char) ; table . set_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . set_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . set_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . set_point_size = (gd_api . godot_method_bind_get_method) (class_name , "set_point_size\0" . as_ptr () as * const c_char) ; table . set_proximity_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_proximity_fade\0" . as_ptr () as * const c_char) ; table . set_proximity_fade_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_proximity_fade_distance\0" . as_ptr () as * const c_char) ; table . set_refraction = (gd_api . godot_method_bind_get_method) (class_name , "set_refraction\0" . as_ptr () as * const c_char) ; table . set_refraction_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_refraction_texture_channel\0" . as_ptr () as * const c_char) ; table . set_rim = (gd_api . godot_method_bind_get_method) (class_name , "set_rim\0" . as_ptr () as * const c_char) ; table . set_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "set_rim_tint\0" . as_ptr () as * const c_char) ; table . set_roughness = (gd_api . godot_method_bind_get_method) (class_name , "set_roughness\0" . as_ptr () as * const c_char) ; table . set_roughness_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_roughness_texture_channel\0" . as_ptr () as * const c_char) ; table . set_specular = (gd_api . godot_method_bind_get_method) (class_name , "set_specular\0" . as_ptr () as * const c_char) ; table . set_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_specular_mode\0" . as_ptr () as * const c_char) ; table . set_subsurface_scattering_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_subsurface_scattering_strength\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_transmission = (gd_api . godot_method_bind_get_method) (class_name , "set_transmission\0" . as_ptr () as * const c_char) ; table . set_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_offset\0" . as_ptr () as * const c_char) ; table . set_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_scale\0" . as_ptr () as * const c_char) ; table . set_uv1_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . set_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_offset\0" . as_ptr () as * const c_char) ; table . set_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_scale\0" . as_ptr () as * const c_char) ; table . set_uv2_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:172:18262 [INFO] [stdout] | [INFO] [stdout] 172 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 172 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_exception = (gd_api . godot_method_bind_get_method) (class_name , "add_exception\0" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\0" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\0" . as_ptr () as * const c_char) ; table . force_raycast_update = (gd_api . godot_method_bind_get_method) (class_name , "force_raycast_update\0" . as_ptr () as * const c_char) ; table . get_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_to\0" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\0" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\0" . as_ptr () as * const c_char) ; table . get_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_parent_body\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . is_colliding = (gd_api . godot_method_bind_get_method) (class_name , "is_colliding\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\0" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\0" . as_ptr () as * const c_char) ; table . set_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_to\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_parent_body\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:178:10577 [INFO] [stdout] | [INFO] [stdout] 178 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 178 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:184:32706 [INFO] [stdout] | [INFO] [stdout] 184 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 184 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\0" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\0" . as_ptr () as * const c_char) ; table . get_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_box_extents\0" . as_ptr () as * const c_char) ; table . get_emission_color_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_color_texture\0" . as_ptr () as * const c_char) ; table . get_emission_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normal_texture\0" . as_ptr () as * const c_char) ; table . get_emission_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_point_count\0" . as_ptr () as * const c_char) ; table . get_emission_point_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_point_texture\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_param_texture\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_trail_color_modifier = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_color_modifier\0" . as_ptr () as * const c_char) ; table . get_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_divisor\0" . as_ptr () as * const c_char) ; table . get_trail_size_modifier = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_size_modifier\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_box_extents\0" . as_ptr () as * const c_char) ; table . set_emission_color_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_color_texture\0" . as_ptr () as * const c_char) ; table . set_emission_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normal_texture\0" . as_ptr () as * const c_char) ; table . set_emission_point_count = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_point_count\0" . as_ptr () as * const c_char) ; table . set_emission_point_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_point_texture\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_param_texture\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_trail_color_modifier = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_color_modifier\0" . as_ptr () as * const c_char) ; table . set_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_divisor\0" . as_ptr () as * const c_char) ; table . set_trail_size_modifier = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_size_modifier\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:190:7431 [INFO] [stdout] | [INFO] [stdout] 190 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 190 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "can_drop_data_fw\0" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\0" . as_ptr () as * const c_char) ; table . get_current_script = (gd_api . godot_method_bind_get_method) (class_name , "get_current_script\0" . as_ptr () as * const c_char) ; table . get_drag_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_data_fw\0" . as_ptr () as * const c_char) ; table . get_open_scripts = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scripts\0" . as_ptr () as * const c_char) ; table . goto_line = (gd_api . godot_method_bind_get_method) (class_name , "goto_line\0" . as_ptr () as * const c_char) ; table . open_script_create_dialog = (gd_api . godot_method_bind_get_method) (class_name , "open_script_create_dialog\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:196:4664 [INFO] [stdout] | [INFO] [stdout] 196 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 196 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; table . set_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:202:9922 [INFO] [stdout] | [INFO] [stdout] 202 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 202 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\0" . as_ptr () as * const c_char) ; table . draw_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect_region\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_alpha = (gd_api . godot_method_bind_get_method) (class_name , "has_alpha\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:208:16095 [INFO] [stdout] | [INFO] [stdout] 208 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 208 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . get_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_level_db\0" . as_ptr () as * const c_char) ; table . get_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . get_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_level_db\0" . as_ptr () as * const c_char) ; table . get_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_pan\0" . as_ptr () as * const c_char) ; table . get_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_level_db\0" . as_ptr () as * const c_char) ; table . get_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_pan\0" . as_ptr () as * const c_char) ; table . is_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "is_feedback_active\0" . as_ptr () as * const c_char) ; table . is_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap1_active\0" . as_ptr () as * const c_char) ; table . is_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap2_active\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_active\0" . as_ptr () as * const c_char) ; table . set_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . set_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_level_db\0" . as_ptr () as * const c_char) ; table . set_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . set_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_active\0" . as_ptr () as * const c_char) ; table . set_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_level_db\0" . as_ptr () as * const c_char) ; table . set_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_pan\0" . as_ptr () as * const c_char) ; table . set_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_active\0" . as_ptr () as * const c_char) ; table . set_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_level_db\0" . as_ptr () as * const c_char) ; table . set_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_pan\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:214:14333 [INFO] [stdout] | [INFO] [stdout] 214 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 214 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "create_shape_owner\0" . as_ptr () as * const c_char) ; table . get_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\0" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\0" . as_ptr () as * const c_char) ; table . is_shape_owner_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_owner_disabled\0" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\0" . as_ptr () as * const c_char) ; table . set_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\0" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_add_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_clear_shapes\0" . as_ptr () as * const c_char) ; table . shape_owner_get_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_count\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_index\0" . as_ptr () as * const c_char) ; table . shape_owner_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_transform\0" . as_ptr () as * const c_char) ; table . shape_owner_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_remove_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_disabled\0" . as_ptr () as * const c_char) ; table . shape_owner_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:226:36596 [INFO] [stdout] | [INFO] [stdout] 226 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 226 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_group = (gd_api . godot_method_bind_get_method) (class_name , "call_group\0" . as_ptr () as * const c_char) ; table . call_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "call_group_flags\0" . as_ptr () as * const c_char) ; table . change_scene = (gd_api . godot_method_bind_get_method) (class_name , "change_scene\0" . as_ptr () as * const c_char) ; table . change_scene_to = (gd_api . godot_method_bind_get_method) (class_name , "change_scene_to\0" . as_ptr () as * const c_char) ; table . create_timer = (gd_api . godot_method_bind_get_method) (class_name , "create_timer\0" . as_ptr () as * const c_char) ; table . get_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_current_scene\0" . as_ptr () as * const c_char) ; table . get_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_scene_root\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\0" . as_ptr () as * const c_char) ; table . get_network_connected_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_network_connected_peers\0" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\0" . as_ptr () as * const c_char) ; table . get_network_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_network_unique_id\0" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\0" . as_ptr () as * const c_char) ; table . get_nodes_in_group = (gd_api . godot_method_bind_get_method) (class_name , "get_nodes_in_group\0" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\0" . as_ptr () as * const c_char) ; table . get_rpc_sender_id = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_sender_id\0" . as_ptr () as * const c_char) ; table . has_group = (gd_api . godot_method_bind_get_method) (class_name , "has_group\0" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\0" . as_ptr () as * const c_char) ; table . is_debugging_collisions_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_debugging_collisions_hint\0" . as_ptr () as * const c_char) ; table . is_debugging_navigation_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_debugging_navigation_hint\0" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\0" . as_ptr () as * const c_char) ; table . is_multiplayer_poll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_multiplayer_poll_enabled\0" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\0" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\0" . as_ptr () as * const c_char) ; table . is_refusing_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_network_connections\0" . as_ptr () as * const c_char) ; table . is_using_font_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "is_using_font_oversampling\0" . as_ptr () as * const c_char) ; table . notify_group = (gd_api . godot_method_bind_get_method) (class_name , "notify_group\0" . as_ptr () as * const c_char) ; table . notify_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "notify_group_flags\0" . as_ptr () as * const c_char) ; table . queue_delete = (gd_api . godot_method_bind_get_method) (class_name , "queue_delete\0" . as_ptr () as * const c_char) ; table . quit = (gd_api . godot_method_bind_get_method) (class_name , "quit\0" . as_ptr () as * const c_char) ; table . reload_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "reload_current_scene\0" . as_ptr () as * const c_char) ; table . set_auto_accept_quit = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_accept_quit\0" . as_ptr () as * const c_char) ; table . set_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_current_scene\0" . as_ptr () as * const c_char) ; table . set_debug_collisions_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_collisions_hint\0" . as_ptr () as * const c_char) ; table . set_debug_navigation_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_navigation_hint\0" . as_ptr () as * const c_char) ; table . set_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "set_edited_scene_root\0" . as_ptr () as * const c_char) ; table . set_group = (gd_api . godot_method_bind_get_method) (class_name , "set_group\0" . as_ptr () as * const c_char) ; table . set_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_group_flags\0" . as_ptr () as * const c_char) ; table . set_input_as_handled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_handled\0" . as_ptr () as * const c_char) ; table . set_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_multiplayer\0" . as_ptr () as * const c_char) ; table . set_multiplayer_poll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_multiplayer_poll_enabled\0" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\0" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\0" . as_ptr () as * const c_char) ; table . set_quit_on_go_back = (gd_api . godot_method_bind_get_method) (class_name , "set_quit_on_go_back\0" . as_ptr () as * const c_char) ; table . set_refuse_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_network_connections\0" . as_ptr () as * const c_char) ; table . set_screen_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_stretch\0" . as_ptr () as * const c_char) ; table . set_use_font_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_use_font_oversampling\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:232:69283 [INFO] [stdout] | [INFO] [stdout] 232 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 232 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_child = (gd_api . godot_method_bind_get_method) (class_name , "add_child\0" . as_ptr () as * const c_char) ; table . add_child_below_node = (gd_api . godot_method_bind_get_method) (class_name , "add_child_below_node\0" . as_ptr () as * const c_char) ; table . add_to_group = (gd_api . godot_method_bind_get_method) (class_name , "add_to_group\0" . as_ptr () as * const c_char) ; table . can_process = (gd_api . godot_method_bind_get_method) (class_name , "can_process\0" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . find_node = (gd_api . godot_method_bind_get_method) (class_name , "find_node\0" . as_ptr () as * const c_char) ; table . find_parent = (gd_api . godot_method_bind_get_method) (class_name , "find_parent\0" . as_ptr () as * const c_char) ; table . get_child = (gd_api . godot_method_bind_get_method) (class_name , "get_child\0" . as_ptr () as * const c_char) ; table . get_child_count = (gd_api . godot_method_bind_get_method) (class_name , "get_child_count\0" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\0" . as_ptr () as * const c_char) ; table . get_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_multiplayer\0" . as_ptr () as * const c_char) ; table . get_filename = (gd_api . godot_method_bind_get_method) (class_name , "get_filename\0" . as_ptr () as * const c_char) ; table . get_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_groups\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_network_master = (gd_api . godot_method_bind_get_method) (class_name , "get_network_master\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_and_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_node_and_resource\0" . as_ptr () as * const c_char) ; table . get_node_or_null = (gd_api . godot_method_bind_get_method) (class_name , "get_node_or_null\0" . as_ptr () as * const c_char) ; table . get_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_owner\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_path_to = (gd_api . godot_method_bind_get_method) (class_name , "get_path_to\0" . as_ptr () as * const c_char) ; table . get_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_pause_mode\0" . as_ptr () as * const c_char) ; table . get_physics_process_delta_time = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_process_delta_time\0" . as_ptr () as * const c_char) ; table . get_position_in_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_position_in_parent\0" . as_ptr () as * const c_char) ; table . get_process_delta_time = (gd_api . godot_method_bind_get_method) (class_name , "get_process_delta_time\0" . as_ptr () as * const c_char) ; table . get_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_process_priority\0" . as_ptr () as * const c_char) ; table . get_scene_instance_load_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_scene_instance_load_placeholder\0" . as_ptr () as * const c_char) ; table . get_tree = (gd_api . godot_method_bind_get_method) (class_name , "get_tree\0" . as_ptr () as * const c_char) ; table . get_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_node_and_resource = (gd_api . godot_method_bind_get_method) (class_name , "has_node_and_resource\0" . as_ptr () as * const c_char) ; table . is_a_parent_of = (gd_api . godot_method_bind_get_method) (class_name , "is_a_parent_of\0" . as_ptr () as * const c_char) ; table . is_displayed_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_displayed_folded\0" . as_ptr () as * const c_char) ; table . is_greater_than = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_than\0" . as_ptr () as * const c_char) ; table . is_in_group = (gd_api . godot_method_bind_get_method) (class_name , "is_in_group\0" . as_ptr () as * const c_char) ; table . is_inside_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_inside_tree\0" . as_ptr () as * const c_char) ; table . is_network_master = (gd_api . godot_method_bind_get_method) (class_name , "is_network_master\0" . as_ptr () as * const c_char) ; table . is_physics_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_processing\0" . as_ptr () as * const c_char) ; table . is_physics_processing_internal = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_processing_internal\0" . as_ptr () as * const c_char) ; table . is_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_processing\0" . as_ptr () as * const c_char) ; table . is_processing_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_input\0" . as_ptr () as * const c_char) ; table . is_processing_internal = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_internal\0" . as_ptr () as * const c_char) ; table . is_processing_unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_unhandled_input\0" . as_ptr () as * const c_char) ; table . is_processing_unhandled_key_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_unhandled_key_input\0" . as_ptr () as * const c_char) ; table . move_child = (gd_api . godot_method_bind_get_method) (class_name , "move_child\0" . as_ptr () as * const c_char) ; table . print_stray_nodes = (gd_api . godot_method_bind_get_method) (class_name , "print_stray_nodes\0" . as_ptr () as * const c_char) ; table . print_tree = (gd_api . godot_method_bind_get_method) (class_name , "print_tree\0" . as_ptr () as * const c_char) ; table . print_tree_pretty = (gd_api . godot_method_bind_get_method) (class_name , "print_tree_pretty\0" . as_ptr () as * const c_char) ; table . propagate_call = (gd_api . godot_method_bind_get_method) (class_name , "propagate_call\0" . as_ptr () as * const c_char) ; table . propagate_notification = (gd_api . godot_method_bind_get_method) (class_name , "propagate_notification\0" . as_ptr () as * const c_char) ; table . queue_free = (gd_api . godot_method_bind_get_method) (class_name , "queue_free\0" . as_ptr () as * const c_char) ; table . raise = (gd_api . godot_method_bind_get_method) (class_name , "raise\0" . as_ptr () as * const c_char) ; table . remove_and_skip = (gd_api . godot_method_bind_get_method) (class_name , "remove_and_skip\0" . as_ptr () as * const c_char) ; table . remove_child = (gd_api . godot_method_bind_get_method) (class_name , "remove_child\0" . as_ptr () as * const c_char) ; table . remove_from_group = (gd_api . godot_method_bind_get_method) (class_name , "remove_from_group\0" . as_ptr () as * const c_char) ; table . replace_by = (gd_api . godot_method_bind_get_method) (class_name , "replace_by\0" . as_ptr () as * const c_char) ; table . request_ready = (gd_api . godot_method_bind_get_method) (class_name , "request_ready\0" . as_ptr () as * const c_char) ; table . rpc = (gd_api . godot_method_bind_get_method) (class_name , "rpc\0" . as_ptr () as * const c_char) ; table . rpc_config = (gd_api . godot_method_bind_get_method) (class_name , "rpc_config\0" . as_ptr () as * const c_char) ; table . rpc_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_id\0" . as_ptr () as * const c_char) ; table . rpc_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable\0" . as_ptr () as * const c_char) ; table . rpc_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable_id\0" . as_ptr () as * const c_char) ; table . rset = (gd_api . godot_method_bind_get_method) (class_name , "rset\0" . as_ptr () as * const c_char) ; table . rset_config = (gd_api . godot_method_bind_get_method) (class_name , "rset_config\0" . as_ptr () as * const c_char) ; table . rset_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_id\0" . as_ptr () as * const c_char) ; table . rset_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable\0" . as_ptr () as * const c_char) ; table . rset_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable_id\0" . as_ptr () as * const c_char) ; table . set_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_multiplayer\0" . as_ptr () as * const c_char) ; table . set_display_folded = (gd_api . godot_method_bind_get_method) (class_name , "set_display_folded\0" . as_ptr () as * const c_char) ; table . set_filename = (gd_api . godot_method_bind_get_method) (class_name , "set_filename\0" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\0" . as_ptr () as * const c_char) ; table . set_network_master = (gd_api . godot_method_bind_get_method) (class_name , "set_network_master\0" . as_ptr () as * const c_char) ; table . set_owner = (gd_api . godot_method_bind_get_method) (class_name , "set_owner\0" . as_ptr () as * const c_char) ; table . set_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_pause_mode\0" . as_ptr () as * const c_char) ; table . set_physics_process = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_process\0" . as_ptr () as * const c_char) ; table . set_physics_process_internal = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_process_internal\0" . as_ptr () as * const c_char) ; table . set_process = (gd_api . godot_method_bind_get_method) (class_name , "set_process\0" . as_ptr () as * const c_char) ; table . set_process_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_input\0" . as_ptr () as * const c_char) ; table . set_process_internal = (gd_api . godot_method_bind_get_method) (class_name , "set_process_internal\0" . as_ptr () as * const c_char) ; table . set_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_process_priority\0" . as_ptr () as * const c_char) ; table . set_process_unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_unhandled_input\0" . as_ptr () as * const c_char) ; table . set_process_unhandled_key_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_unhandled_key_input\0" . as_ptr () as * const c_char) ; table . set_scene_instance_load_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_scene_instance_load_placeholder\0" . as_ptr () as * const c_char) ; table . update_configuration_warning = (gd_api . godot_method_bind_get_method) (class_name , "update_configuration_warning\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:238:4537 [INFO] [stdout] | [INFO] [stdout] 238 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 238 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_peer\0" . as_ptr () as * const c_char) ; table . set_buffers = (gd_api . godot_method_bind_get_method) (class_name , "set_buffers\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:244:41714 [INFO] [stdout] | [INFO] [stdout] 244 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 244 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . convert_from_particles = (gd_api . godot_method_bind_get_method) (class_name , "convert_from_particles\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\0" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_box_extents\0" . as_ptr () as * const c_char) ; table . get_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\0" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\0" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_box_extents\0" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\0" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\0" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:250:5411 [INFO] [stdout] | [INFO] [stdout] 250 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 250 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . get_typed = (gd_api . godot_method_bind_get_method) (class_name , "get_typed\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:256:11978 [INFO] [stdout] | [INFO] [stdout] 256 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 256 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_animation = (gd_api . godot_method_bind_get_method) (class_name , "add_animation\0" . as_ptr () as * const c_char) ; table . add_frame = (gd_api . godot_method_bind_get_method) (class_name , "add_frame\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_all = (gd_api . godot_method_bind_get_method) (class_name , "clear_all\0" . as_ptr () as * const c_char) ; table . get_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_loop\0" . as_ptr () as * const c_char) ; table . get_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_names\0" . as_ptr () as * const c_char) ; table . get_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_speed\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_count = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_count\0" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\0" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\0" . as_ptr () as * const c_char) ; table . remove_frame = (gd_api . godot_method_bind_get_method) (class_name , "remove_frame\0" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\0" . as_ptr () as * const c_char) ; table . set_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_loop\0" . as_ptr () as * const c_char) ; table . set_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_speed\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:262:90357 [INFO] [stdout] | [INFO] [stdout] 262 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 262 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . area_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_add_shape\0" . as_ptr () as * const c_char) ; table . area_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\0" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\0" . as_ptr () as * const c_char) ; table . area_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\0" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\0" . as_ptr () as * const c_char) ; table . area_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_count\0" . as_ptr () as * const c_char) ; table . area_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_transform\0" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\0" . as_ptr () as * const c_char) ; table . area_get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\0" . as_ptr () as * const c_char) ; table . area_is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "area_is_ray_pickable\0" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\0" . as_ptr () as * const c_char) ; table . area_set_area_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_area_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_layer\0" . as_ptr () as * const c_char) ; table . area_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_mask\0" . as_ptr () as * const c_char) ; table . area_set_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\0" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\0" . as_ptr () as * const c_char) ; table . area_set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_ray_pickable\0" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\0" . as_ptr () as * const c_char) ; table . area_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . area_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_transform\0" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\0" . as_ptr () as * const c_char) ; table . area_set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\0" . as_ptr () as * const c_char) ; table . body_add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_central_force\0" . as_ptr () as * const c_char) ; table . body_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_add_collision_exception\0" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\0" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\0" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\0" . as_ptr () as * const c_char) ; table . body_apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_central_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . body_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\0" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\0" . as_ptr () as * const c_char) ; table . body_get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_layer\0" . as_ptr () as * const c_char) ; table . body_get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_mask\0" . as_ptr () as * const c_char) ; table . body_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_direct_state\0" . as_ptr () as * const c_char) ; table . body_get_kinematic_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "body_get_kinematic_safe_margin\0" . as_ptr () as * const c_char) ; table . body_get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\0" . as_ptr () as * const c_char) ; table . body_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\0" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\0" . as_ptr () as * const c_char) ; table . body_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_count\0" . as_ptr () as * const c_char) ; table . body_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_transform\0" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\0" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\0" . as_ptr () as * const c_char) ; table . body_is_axis_locked = (gd_api . godot_method_bind_get_method) (class_name , "body_is_axis_locked\0" . as_ptr () as * const c_char) ; table . body_is_continuous_collision_detection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "body_is_continuous_collision_detection_enabled\0" . as_ptr () as * const c_char) ; table . body_is_omitting_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_is_omitting_force_integration\0" . as_ptr () as * const c_char) ; table . body_is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "body_is_ray_pickable\0" . as_ptr () as * const c_char) ; table . body_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\0" . as_ptr () as * const c_char) ; table . body_set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_lock\0" . as_ptr () as * const c_char) ; table . body_set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_velocity\0" . as_ptr () as * const c_char) ; table . body_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_layer\0" . as_ptr () as * const c_char) ; table . body_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_mask\0" . as_ptr () as * const c_char) ; table . body_set_enable_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "body_set_enable_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . body_set_force_integration_callback = (gd_api . godot_method_bind_get_method) (class_name , "body_set_force_integration_callback\0" . as_ptr () as * const c_char) ; table . body_set_kinematic_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "body_set_kinematic_safe_margin\0" . as_ptr () as * const c_char) ; table . body_set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\0" . as_ptr () as * const c_char) ; table . body_set_omit_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_set_omit_force_integration\0" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\0" . as_ptr () as * const c_char) ; table . body_set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "body_set_ray_pickable\0" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\0" . as_ptr () as * const c_char) ; table . body_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . body_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_transform\0" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\0" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\0" . as_ptr () as * const c_char) ; table . cone_twist_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "cone_twist_joint_get_param\0" . as_ptr () as * const c_char) ; table . cone_twist_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "cone_twist_joint_set_param\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_get_flag = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_get_flag\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_get_param\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_set_flag\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_set_param\0" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\0" . as_ptr () as * const c_char) ; table . hinge_joint_get_flag = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_get_flag\0" . as_ptr () as * const c_char) ; table . hinge_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_get_param\0" . as_ptr () as * const c_char) ; table . hinge_joint_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_set_flag\0" . as_ptr () as * const c_char) ; table . hinge_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_set_param\0" . as_ptr () as * const c_char) ; table . joint_create_cone_twist = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_cone_twist\0" . as_ptr () as * const c_char) ; table . joint_create_generic_6dof = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_generic_6dof\0" . as_ptr () as * const c_char) ; table . joint_create_hinge = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_hinge\0" . as_ptr () as * const c_char) ; table . joint_create_pin = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_pin\0" . as_ptr () as * const c_char) ; table . joint_create_slider = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_slider\0" . as_ptr () as * const c_char) ; table . joint_get_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_solver_priority\0" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\0" . as_ptr () as * const c_char) ; table . joint_set_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_solver_priority\0" . as_ptr () as * const c_char) ; table . pin_joint_get_local_a = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_local_a\0" . as_ptr () as * const c_char) ; table . pin_joint_get_local_b = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_local_b\0" . as_ptr () as * const c_char) ; table . pin_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_param\0" . as_ptr () as * const c_char) ; table . pin_joint_set_local_a = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_local_a\0" . as_ptr () as * const c_char) ; table . pin_joint_set_local_b = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_local_b\0" . as_ptr () as * const c_char) ; table . pin_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_param\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . shape_create = (gd_api . godot_method_bind_get_method) (class_name , "shape_create\0" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\0" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\0" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\0" . as_ptr () as * const c_char) ; table . slider_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "slider_joint_get_param\0" . as_ptr () as * const c_char) ; table . slider_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "slider_joint_set_param\0" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\0" . as_ptr () as * const c_char) ; table . space_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "space_get_direct_state\0" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\0" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\0" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\0" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:268:15608 [INFO] [stdout] | [INFO] [stdout] 268 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 268 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action = (gd_api . godot_method_bind_get_method) (class_name , "get_action\0" . as_ptr () as * const c_char) ; table . get_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "get_bitmask\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_pressed\0" . as_ptr () as * const c_char) ; table . get_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_mode\0" . as_ptr () as * const c_char) ; table . is_passby_press_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_passby_press_enabled\0" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\0" . as_ptr () as * const c_char) ; table . is_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_centered\0" . as_ptr () as * const c_char) ; table . is_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_visible\0" . as_ptr () as * const c_char) ; table . set_action = (gd_api . godot_method_bind_get_method) (class_name , "set_action\0" . as_ptr () as * const c_char) ; table . set_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "set_bitmask\0" . as_ptr () as * const c_char) ; table . set_passby_press = (gd_api . godot_method_bind_get_method) (class_name , "set_passby_press\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; table . set_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_centered\0" . as_ptr () as * const c_char) ; table . set_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_visible\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_pressed\0" . as_ptr () as * const c_char) ; table . set_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:274:9194 [INFO] [stdout] | [INFO] [stdout] 274 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 274 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\0" . as_ptr () as * const c_char) ; table . get_ascent = (gd_api . godot_method_bind_get_method) (class_name , "get_ascent\0" . as_ptr () as * const c_char) ; table . get_char_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_size\0" . as_ptr () as * const c_char) ; table . get_descent = (gd_api . godot_method_bind_get_method) (class_name , "get_descent\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_string_size\0" . as_ptr () as * const c_char) ; table . get_wordwrap_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_wordwrap_string_size\0" . as_ptr () as * const c_char) ; table . has_outline = (gd_api . godot_method_bind_get_method) (class_name , "has_outline\0" . as_ptr () as * const c_char) ; table . is_distance_field_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_distance_field_hint\0" . as_ptr () as * const c_char) ; table . update_changes = (gd_api . godot_method_bind_get_method) (class_name , "update_changes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:280:5847 [INFO] [stdout] | [INFO] [stdout] 280 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 280 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:286:4819 [INFO] [stdout] | [INFO] [stdout] 286 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 286 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:292:5440 [INFO] [stdout] | [INFO] [stdout] 292 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 292 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_percent_visible\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:298:5611 [INFO] [stdout] | [INFO] [stdout] 298 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 298 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cancel = (gd_api . godot_method_bind_get_method) (class_name , "get_cancel\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:304:5442 [INFO] [stdout] | [INFO] [stdout] 304 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 304 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_world_scale\0" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:310:4221 [INFO] [stdout] | [INFO] [stdout] 310 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 310 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:316:9444 [INFO] [stdout] | [INFO] [stdout] 316 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 316 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounds_geometry = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds_geometry\0" . as_ptr () as * const c_char) ; table . get_controller = (gd_api . godot_method_bind_get_method) (class_name , "get_controller\0" . as_ptr () as * const c_char) ; table . get_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "get_optional_features\0" . as_ptr () as * const c_char) ; table . get_reference_space_type = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_space_type\0" . as_ptr () as * const c_char) ; table . get_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "get_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . get_required_features = (gd_api . godot_method_bind_get_method) (class_name , "get_required_features\0" . as_ptr () as * const c_char) ; table . get_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_session_mode\0" . as_ptr () as * const c_char) ; table . get_visibility_state = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_state\0" . as_ptr () as * const c_char) ; table . is_session_supported = (gd_api . godot_method_bind_get_method) (class_name , "is_session_supported\0" . as_ptr () as * const c_char) ; table . set_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "set_optional_features\0" . as_ptr () as * const c_char) ; table . set_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "set_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . set_required_features = (gd_api . godot_method_bind_get_method) (class_name , "set_required_features\0" . as_ptr () as * const c_char) ; table . set_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_session_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:322:26008 [INFO] [stdout] | [INFO] [stdout] 322 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 322 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_signal\0" . as_ptr () as * const c_char) ; table . add_function = (gd_api . godot_method_bind_get_method) (class_name , "add_function\0" . as_ptr () as * const c_char) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_variable = (gd_api . godot_method_bind_get_method) (class_name , "add_variable\0" . as_ptr () as * const c_char) ; table . custom_signal_add_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_add_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_count = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_count\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_remove_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_remove_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_swap_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_swap_argument\0" . as_ptr () as * const c_char) ; table . data_connect = (gd_api . godot_method_bind_get_method) (class_name , "data_connect\0" . as_ptr () as * const c_char) ; table . data_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "data_disconnect\0" . as_ptr () as * const c_char) ; table . get_function_node_id = (gd_api . godot_method_bind_get_method) (class_name , "get_function_node_id\0" . as_ptr () as * const c_char) ; table . get_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_function_scroll\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_default_value\0" . as_ptr () as * const c_char) ; table . get_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_export\0" . as_ptr () as * const c_char) ; table . get_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_info\0" . as_ptr () as * const c_char) ; table . has_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_custom_signal\0" . as_ptr () as * const c_char) ; table . has_data_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_data_connection\0" . as_ptr () as * const c_char) ; table . has_function = (gd_api . godot_method_bind_get_method) (class_name , "has_function\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_sequence_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_sequence_connection\0" . as_ptr () as * const c_char) ; table . has_variable = (gd_api . godot_method_bind_get_method) (class_name , "has_variable\0" . as_ptr () as * const c_char) ; table . remove_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_signal\0" . as_ptr () as * const c_char) ; table . remove_function = (gd_api . godot_method_bind_get_method) (class_name , "remove_function\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_variable = (gd_api . godot_method_bind_get_method) (class_name , "remove_variable\0" . as_ptr () as * const c_char) ; table . rename_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "rename_custom_signal\0" . as_ptr () as * const c_char) ; table . rename_function = (gd_api . godot_method_bind_get_method) (class_name , "rename_function\0" . as_ptr () as * const c_char) ; table . rename_variable = (gd_api . godot_method_bind_get_method) (class_name , "rename_variable\0" . as_ptr () as * const c_char) ; table . sequence_connect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_connect\0" . as_ptr () as * const c_char) ; table . sequence_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_disconnect\0" . as_ptr () as * const c_char) ; table . set_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_function_scroll\0" . as_ptr () as * const c_char) ; table . set_instance_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_base_type\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_default_value\0" . as_ptr () as * const c_char) ; table . set_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_export\0" . as_ptr () as * const c_char) ; table . set_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_info\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:328:11242 [INFO] [stdout] | [INFO] [stdout] 328 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 328 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_outline = (gd_api . godot_method_bind_get_method) (class_name , "add_outline\0" . as_ptr () as * const c_char) ; table . add_outline_at_index = (gd_api . godot_method_bind_get_method) (class_name , "add_outline_at_index\0" . as_ptr () as * const c_char) ; table . add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "add_polygon\0" . as_ptr () as * const c_char) ; table . clear_outlines = (gd_api . godot_method_bind_get_method) (class_name , "clear_outlines\0" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\0" . as_ptr () as * const c_char) ; table . get_outline = (gd_api . godot_method_bind_get_method) (class_name , "get_outline\0" . as_ptr () as * const c_char) ; table . get_outline_count = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_count\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\0" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\0" . as_ptr () as * const c_char) ; table . make_polygons_from_outlines = (gd_api . godot_method_bind_get_method) (class_name , "make_polygons_from_outlines\0" . as_ptr () as * const c_char) ; table . remove_outline = (gd_api . godot_method_bind_get_method) (class_name , "remove_outline\0" . as_ptr () as * const c_char) ; table . set_outline = (gd_api . godot_method_bind_get_method) (class_name , "set_outline\0" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:334:6387 [INFO] [stdout] | [INFO] [stdout] 334 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 334 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\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\0" . as_ptr () as * const c_char) ; table . generate_rsa = (gd_api . godot_method_bind_get_method) (class_name , "generate_rsa\0" . as_ptr () as * const c_char) ; table . generate_self_signed_certificate = (gd_api . godot_method_bind_get_method) (class_name , "generate_self_signed_certificate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:340:8426 [INFO] [stdout] | [INFO] [stdout] 340 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 340 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . collide = (gd_api . godot_method_bind_get_method) (class_name , "collide\0" . as_ptr () as * const c_char) ; table . collide_and_get_contacts = (gd_api . godot_method_bind_get_method) (class_name , "collide_and_get_contacts\0" . as_ptr () as * const c_char) ; table . collide_with_motion = (gd_api . godot_method_bind_get_method) (class_name , "collide_with_motion\0" . as_ptr () as * const c_char) ; table . collide_with_motion_and_get_contacts = (gd_api . godot_method_bind_get_method) (class_name , "collide_with_motion_and_get_contacts\0" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . get_custom_solver_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_solver_bias\0" . as_ptr () as * const c_char) ; table . set_custom_solver_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_solver_bias\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:352:3579 [INFO] [stdout] | [INFO] [stdout] 352 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 352 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:358:3498 [INFO] [stdout] | [INFO] [stdout] 358 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 358 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . wrap = (gd_api . godot_method_bind_get_method) (class_name , "wrap\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:364:16637 [INFO] [stdout] | [INFO] [stdout] 364 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 364 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_convex_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_convex_shape\0" . as_ptr () as * const c_char) ; table . create_outline = (gd_api . godot_method_bind_get_method) (class_name , "create_outline\0" . as_ptr () as * const c_char) ; table . create_trimesh_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_shape\0" . as_ptr () as * const c_char) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\0" . as_ptr () as * const c_char) ; table . get_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_count\0" . as_ptr () as * const c_char) ; table . set_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_blend_shape_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_blend_shape_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_material\0" . as_ptr () as * const c_char) ; table . surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:370:7086 [INFO] [stdout] | [INFO] [stdout] 370 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 370 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_font_path = (gd_api . godot_method_bind_get_method) (class_name , "get_font_path\0" . as_ptr () as * const c_char) ; table . get_hinting = (gd_api . godot_method_bind_get_method) (class_name , "get_hinting\0" . as_ptr () as * const c_char) ; table . is_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "is_antialiased\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_font_path = (gd_api . godot_method_bind_get_method) (class_name , "set_font_path\0" . as_ptr () as * const c_char) ; table . set_hinting = (gd_api . godot_method_bind_get_method) (class_name , "set_hinting\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:376:26994 [INFO] [stdout] | [INFO] [stdout] 376 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 376 | # [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¬_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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\0" . as_ptr () as * const c_char) ; table . get_connection = (gd_api . godot_method_bind_get_method) (class_name , "get_connection\0" . as_ptr () as * const c_char) ; table . get_read_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "get_read_chunk_size\0" . as_ptr () as * const c_char) ; table . get_response_body_length = (gd_api . godot_method_bind_get_method) (class_name , "get_response_body_length\0" . as_ptr () as * const c_char) ; table . get_response_code = (gd_api . godot_method_bind_get_method) (class_name , "get_response_code\0" . as_ptr () as * const c_char) ; table . get_response_headers = (gd_api . godot_method_bind_get_method) (class_name , "get_response_headers\0" . as_ptr () as * const c_char) ; table . get_response_headers_as_dictionary = (gd_api . godot_method_bind_get_method) (class_name , "get_response_headers_as_dictionary\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . has_response = (gd_api . godot_method_bind_get_method) (class_name , "has_response\0" . as_ptr () as * const c_char) ; table . is_blocking_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_response_chunked = (gd_api . godot_method_bind_get_method) (class_name , "is_response_chunked\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . query_string_from_dict = (gd_api . godot_method_bind_get_method) (class_name , "query_string_from_dict\0" . as_ptr () as * const c_char) ; table . read_response_body_chunk = (gd_api . godot_method_bind_get_method) (class_name , "read_response_body_chunk\0" . as_ptr () as * const c_char) ; table . request = (gd_api . godot_method_bind_get_method) (class_name , "request\0" . as_ptr () as * const c_char) ; table . request_raw = (gd_api . godot_method_bind_get_method) (class_name , "request_raw\0" . as_ptr () as * const c_char) ; table . set_blocking_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blocking_mode\0" . as_ptr () as * const c_char) ; table . set_connection = (gd_api . godot_method_bind_get_method) (class_name , "set_connection\0" . as_ptr () as * const c_char) ; table . set_read_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "set_read_chunk_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:382:9289 [INFO] [stdout] | [INFO] [stdout] 382 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 382 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_display_to_lens = (gd_api . godot_method_bind_get_method) (class_name , "get_display_to_lens\0" . as_ptr () as * const c_char) ; table . get_display_width = (gd_api . godot_method_bind_get_method) (class_name , "get_display_width\0" . as_ptr () as * const c_char) ; table . get_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "get_eye_height\0" . as_ptr () as * const c_char) ; table . get_iod = (gd_api . godot_method_bind_get_method) (class_name , "get_iod\0" . as_ptr () as * const c_char) ; table . get_k1 = (gd_api . godot_method_bind_get_method) (class_name , "get_k1\0" . as_ptr () as * const c_char) ; table . get_k2 = (gd_api . godot_method_bind_get_method) (class_name , "get_k2\0" . as_ptr () as * const c_char) ; table . get_oversample = (gd_api . godot_method_bind_get_method) (class_name , "get_oversample\0" . as_ptr () as * const c_char) ; table . set_display_to_lens = (gd_api . godot_method_bind_get_method) (class_name , "set_display_to_lens\0" . as_ptr () as * const c_char) ; table . set_display_width = (gd_api . godot_method_bind_get_method) (class_name , "set_display_width\0" . as_ptr () as * const c_char) ; table . set_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "set_eye_height\0" . as_ptr () as * const c_char) ; table . set_iod = (gd_api . godot_method_bind_get_method) (class_name , "set_iod\0" . as_ptr () as * const c_char) ; table . set_k1 = (gd_api . godot_method_bind_get_method) (class_name , "set_k1\0" . as_ptr () as * const c_char) ; table . set_k2 = (gd_api . godot_method_bind_get_method) (class_name , "set_k2\0" . as_ptr () as * const c_char) ; table . set_oversample = (gd_api . godot_method_bind_get_method) (class_name , "set_oversample\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:388:13743 [INFO] [stdout] | [INFO] [stdout] 388 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 388 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_as_ratio\0" . as_ptr () as * const c_char) ; table . get_max = (gd_api . godot_method_bind_get_method) (class_name , "get_max\0" . as_ptr () as * const c_char) ; table . get_min = (gd_api . godot_method_bind_get_method) (class_name , "get_min\0" . as_ptr () as * const c_char) ; table . get_page = (gd_api . godot_method_bind_get_method) (class_name , "get_page\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\0" . as_ptr () as * const c_char) ; table . is_greater_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_allowed\0" . as_ptr () as * const c_char) ; table . is_lesser_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_lesser_allowed\0" . as_ptr () as * const c_char) ; table . is_ratio_exp = (gd_api . godot_method_bind_get_method) (class_name , "is_ratio_exp\0" . as_ptr () as * const c_char) ; table . is_using_rounded_values = (gd_api . godot_method_bind_get_method) (class_name , "is_using_rounded_values\0" . as_ptr () as * const c_char) ; table . set_allow_greater = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_greater\0" . as_ptr () as * const c_char) ; table . set_allow_lesser = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_lesser\0" . as_ptr () as * const c_char) ; table . set_as_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_as_ratio\0" . as_ptr () as * const c_char) ; table . set_exp_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_exp_ratio\0" . as_ptr () as * const c_char) ; table . set_max = (gd_api . godot_method_bind_get_method) (class_name , "set_max\0" . as_ptr () as * const c_char) ; table . set_min = (gd_api . godot_method_bind_get_method) (class_name , "set_min\0" . as_ptr () as * const c_char) ; table . set_page = (gd_api . godot_method_bind_get_method) (class_name , "set_page\0" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\0" . as_ptr () as * const c_char) ; table . set_use_rounded_values = (gd_api . godot_method_bind_get_method) (class_name , "set_use_rounded_values\0" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\0" . as_ptr () as * const c_char) ; table . share = (gd_api . godot_method_bind_get_method) (class_name , "share\0" . as_ptr () as * const c_char) ; table . unshare = (gd_api . godot_method_bind_get_method) (class_name , "unshare\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:394:3398 [INFO] [stdout] | [INFO] [stdout] 394 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 394 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:400:4189 [INFO] [stdout] | [INFO] [stdout] 400 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 400 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:406:27207 [INFO] [stdout] | [INFO] [stdout] 406 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 406 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus_name\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\0" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\0" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\0" . as_ptr () as * const c_char) ; table . get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_space_override_mode\0" . as_ptr () as * const c_char) ; table . is_gravity_a_point = (gd_api . godot_method_bind_get_method) (class_name , "is_gravity_a_point\0" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\0" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\0" . as_ptr () as * const c_char) ; table . is_overriding_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_audio_bus\0" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\0" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_name\0" . as_ptr () as * const c_char) ; table . set_audio_bus_override = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_override\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . set_gravity_is_point = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_is_point\0" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\0" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\0" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\0" . as_ptr () as * const c_char) ; table . set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_space_override_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:412:3784 [INFO] [stdout] | [INFO] [stdout] 412 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 412 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:418:3679 [INFO] [stdout] | [INFO] [stdout] 418 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 418 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:424:5505 [INFO] [stdout] | [INFO] [stdout] 424 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 424 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:430:35317 [INFO] [stdout] | [INFO] [stdout] 430 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 430 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . build_box_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_box_planes\0" . as_ptr () as * const c_char) ; table . build_capsule_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_capsule_planes\0" . as_ptr () as * const c_char) ; table . build_cylinder_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_cylinder_planes\0" . as_ptr () as * const c_char) ; table . clip_polygon = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygon\0" . as_ptr () as * const c_char) ; table . clip_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygons_2d\0" . as_ptr () as * const c_char) ; table . clip_polyline_with_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "clip_polyline_with_polygon_2d\0" . as_ptr () as * const c_char) ; table . convex_hull_2d = (gd_api . godot_method_bind_get_method) (class_name , "convex_hull_2d\0" . as_ptr () as * const c_char) ; table . exclude_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "exclude_polygons_2d\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_2d\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_uncapped = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_uncapped\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_uncapped_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_uncapped_2d\0" . as_ptr () as * const c_char) ; table . get_closest_points_between_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_points_between_segments\0" . as_ptr () as * const c_char) ; table . get_closest_points_between_segments_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_points_between_segments_2d\0" . as_ptr () as * const c_char) ; table . get_uv84_normal_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_uv84_normal_bit\0" . as_ptr () as * const c_char) ; table . intersect_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "intersect_polygons_2d\0" . as_ptr () as * const c_char) ; table . intersect_polyline_with_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "intersect_polyline_with_polygon_2d\0" . as_ptr () as * const c_char) ; table . is_point_in_circle = (gd_api . godot_method_bind_get_method) (class_name , "is_point_in_circle\0" . as_ptr () as * const c_char) ; table . is_point_in_polygon = (gd_api . godot_method_bind_get_method) (class_name , "is_point_in_polygon\0" . as_ptr () as * const c_char) ; table . is_polygon_clockwise = (gd_api . godot_method_bind_get_method) (class_name , "is_polygon_clockwise\0" . as_ptr () as * const c_char) ; table . line_intersects_line_2d = (gd_api . godot_method_bind_get_method) (class_name , "line_intersects_line_2d\0" . as_ptr () as * const c_char) ; table . make_atlas = (gd_api . godot_method_bind_get_method) (class_name , "make_atlas\0" . as_ptr () as * const c_char) ; table . merge_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "merge_polygons_2d\0" . as_ptr () as * const c_char) ; table . offset_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polygon_2d\0" . as_ptr () as * const c_char) ; table . offset_polyline_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polyline_2d\0" . as_ptr () as * const c_char) ; table . point_is_inside_triangle = (gd_api . godot_method_bind_get_method) (class_name , "point_is_inside_triangle\0" . as_ptr () as * const c_char) ; table . ray_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "ray_intersects_triangle\0" . as_ptr () as * const c_char) ; table . segment_intersects_circle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_circle\0" . as_ptr () as * const c_char) ; table . segment_intersects_convex = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_convex\0" . as_ptr () as * const c_char) ; table . segment_intersects_cylinder = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_cylinder\0" . as_ptr () as * const c_char) ; table . segment_intersects_segment_2d = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_segment_2d\0" . as_ptr () as * const c_char) ; table . segment_intersects_sphere = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_sphere\0" . as_ptr () as * const c_char) ; table . segment_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_triangle\0" . as_ptr () as * const c_char) ; table . triangulate_delaunay_2d = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_delaunay_2d\0" . as_ptr () as * const c_char) ; table . triangulate_polygon = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:436:10690 [INFO] [stdout] | [INFO] [stdout] 436 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 436 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\0" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:442:5009 [INFO] [stdout] | [INFO] [stdout] 442 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 442 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . import_animation_from_other_importer = (gd_api . godot_method_bind_get_method) (class_name , "import_animation_from_other_importer\0" . as_ptr () as * const c_char) ; table . import_scene_from_other_importer = (gd_api . godot_method_bind_get_method) (class_name , "import_scene_from_other_importer\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:448:5646 [INFO] [stdout] | [INFO] [stdout] 448 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 448 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_columns\0" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:454:33429 [INFO] [stdout] | [INFO] [stdout] 454 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 454 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_lock\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia_tensor = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia_tensor\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_able_to_sleep = (gd_api . godot_method_bind_get_method) (class_name , "is_able_to_sleep\0" . as_ptr () as * const c_char) ; table . is_contact_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_contact_monitor_enabled\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . is_using_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "is_using_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . is_using_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "is_using_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\0" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\0" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\0" . as_ptr () as * const c_char) ; table . set_use_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "set_use_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . set_use_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "set_use_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:460:4567 [INFO] [stdout] | [INFO] [stdout] 460 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 460 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . set_node_path = (gd_api . godot_method_bind_get_method) (class_name , "set_node_path\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:466:3756 [INFO] [stdout] | [INFO] [stdout] 466 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 466 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:472:6880 [INFO] [stdout] | [INFO] [stdout] 472 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 472 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:478:21553 [INFO] [stdout] | [INFO] [stdout] 478 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 478 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_interval\0" . as_ptr () as * const c_char) ; table . get_baked_length = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_length\0" . as_ptr () as * const c_char) ; table . get_baked_points = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_points\0" . as_ptr () as * const c_char) ; table . get_baked_tilts = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_tilts\0" . as_ptr () as * const c_char) ; table . get_baked_up_vectors = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_up_vectors\0" . as_ptr () as * const c_char) ; table . get_closest_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_offset\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_in = (gd_api . godot_method_bind_get_method) (class_name , "get_point_in\0" . as_ptr () as * const c_char) ; table . get_point_out = (gd_api . godot_method_bind_get_method) (class_name , "get_point_out\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_point_tilt\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . interpolate_baked_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked_up_vector\0" . as_ptr () as * const c_char) ; table . interpolatef = (gd_api . godot_method_bind_get_method) (class_name , "interpolatef\0" . as_ptr () as * const c_char) ; table . is_up_vector_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_up_vector_enabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_interval\0" . as_ptr () as * const c_char) ; table . set_point_in = (gd_api . godot_method_bind_get_method) (class_name , "set_point_in\0" . as_ptr () as * const c_char) ; table . set_point_out = (gd_api . godot_method_bind_get_method) (class_name , "set_point_out\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_point_tilt\0" . as_ptr () as * const c_char) ; table . set_up_vector_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_up_vector_enabled\0" . as_ptr () as * const c_char) ; table . tessellate = (gd_api . godot_method_bind_get_method) (class_name , "tessellate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:484:18993 [INFO] [stdout] | [INFO] [stdout] 484 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 484 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . add_triangle = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle\0" . as_ptr () as * const c_char) ; table . get_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "get_auto_triangles\0" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_triangle_count = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_count\0" . as_ptr () as * const c_char) ; table . get_triangle_point = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_point\0" . as_ptr () as * const c_char) ; table . get_x_label = (gd_api . godot_method_bind_get_method) (class_name , "get_x_label\0" . as_ptr () as * const c_char) ; table . get_y_label = (gd_api . godot_method_bind_get_method) (class_name , "get_y_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . remove_triangle = (gd_api . godot_method_bind_get_method) (class_name , "remove_triangle\0" . as_ptr () as * const c_char) ; table . set_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_triangles\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_x_label = (gd_api . godot_method_bind_get_method) (class_name , "set_x_label\0" . as_ptr () as * const c_char) ; table . set_y_label = (gd_api . godot_method_bind_get_method) (class_name , "set_y_label\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:490:7737 [INFO] [stdout] | [INFO] [stdout] 490 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 490 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . is_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "is_absorbent\0" . as_ptr () as * const c_char) ; table . is_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_rough\0" . as_ptr () as * const c_char) ; table . set_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "set_absorbent\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_rough\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:496:5821 [INFO] [stdout] | [INFO] [stdout] 496 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 496 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_audio_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_stream\0" . as_ptr () as * const c_char) ; table . get_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "get_random_pitch\0" . as_ptr () as * const c_char) ; table . set_audio_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_stream\0" . as_ptr () as * const c_char) ; table . set_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "set_random_pitch\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:508:8263 [INFO] [stdout] | [INFO] [stdout] 508 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 508 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "get_is_hemisphere\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "set_is_hemisphere\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:514:3700 [INFO] [stdout] | [INFO] [stdout] 514 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 514 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:520:3553 [INFO] [stdout] | [INFO] [stdout] 520 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 520 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:526:4465 [INFO] [stdout] | [INFO] [stdout] 526 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 526 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:532:6810 [INFO] [stdout] | [INFO] [stdout] 532 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 532 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\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\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:538:6499 [INFO] [stdout] | [INFO] [stdout] 538 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 538 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_peer\0" . as_ptr () as * const c_char) ; table . set_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_peer\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:544:5720 [INFO] [stdout] | [INFO] [stdout] 544 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 544 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:550:18544 [INFO] [stdout] | [INFO] [stdout] 550 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 550 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\0" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\0" . as_ptr () as * const c_char) ; table . get_available_point_id = (gd_api . godot_method_bind_get_method) (class_name , "get_available_point_id\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_position_in_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_position_in_segment\0" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\0" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\0" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_point_weight_scale\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\0" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\0" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_point_weight_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:556:3889 [INFO] [stdout] | [INFO] [stdout] 556 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 556 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:562:7401 [INFO] [stdout] | [INFO] [stdout] 562 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 562 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mode\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_closed = (gd_api . godot_method_bind_get_method) (class_name , "is_closed\0" . as_ptr () as * const c_char) ; table . set_closed = (gd_api . godot_method_bind_get_method) (class_name , "set_closed\0" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:568:4464 [INFO] [stdout] | [INFO] [stdout] 568 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 568 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:574:4781 [INFO] [stdout] | [INFO] [stdout] 574 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 574 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:586:8754 [INFO] [stdout] | [INFO] [stdout] 586 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 586 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:592:4396 [INFO] [stdout] | [INFO] [stdout] 592 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 592 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:598:10939 [INFO] [stdout] | [INFO] [stdout] 598 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 598 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:604:9477 [INFO] [stdout] | [INFO] [stdout] 604 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 604 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_config_file = (gd_api . godot_method_bind_get_method) (class_name , "get_config_file\0" . as_ptr () as * const c_char) ; table . get_current_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dependencies\0" . as_ptr () as * const c_char) ; table . get_current_library_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_library_path\0" . as_ptr () as * const c_char) ; table . get_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_symbol_prefix\0" . as_ptr () as * const c_char) ; table . is_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "is_reloadable\0" . as_ptr () as * const c_char) ; table . is_singleton = (gd_api . godot_method_bind_get_method) (class_name , "is_singleton\0" . as_ptr () as * const c_char) ; table . set_config_file = (gd_api . godot_method_bind_get_method) (class_name , "set_config_file\0" . as_ptr () as * const c_char) ; table . set_load_once = (gd_api . godot_method_bind_get_method) (class_name , "set_load_once\0" . as_ptr () as * const c_char) ; table . set_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "set_reloadable\0" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\0" . as_ptr () as * const c_char) ; table . set_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_symbol_prefix\0" . as_ptr () as * const c_char) ; table . should_load_once = (gd_api . godot_method_bind_get_method) (class_name , "should_load_once\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:610:11603 [INFO] [stdout] | [INFO] [stdout] 610 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 610 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_user = (gd_api . godot_method_bind_get_method) (class_name , "add_user\0" . as_ptr () as * const c_char) ; table . clear_data = (gd_api . godot_method_bind_get_method) (class_name , "clear_data\0" . as_ptr () as * const c_char) ; table . clear_users = (gd_api . godot_method_bind_get_method) (class_name , "clear_users\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_space_transform\0" . as_ptr () as * const c_char) ; table . get_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_subdiv\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_octree = (gd_api . godot_method_bind_get_method) (class_name , "get_octree\0" . as_ptr () as * const c_char) ; table . get_user_count = (gd_api . godot_method_bind_get_method) (class_name , "get_user_count\0" . as_ptr () as * const c_char) ; table . get_user_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_user_lightmap\0" . as_ptr () as * const c_char) ; table . get_user_path = (gd_api . godot_method_bind_get_method) (class_name , "get_user_path\0" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\0" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\0" . as_ptr () as * const c_char) ; table . set_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_space_transform\0" . as_ptr () as * const c_char) ; table . set_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_subdiv\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\0" . as_ptr () as * const c_char) ; table . set_octree = (gd_api . godot_method_bind_get_method) (class_name , "set_octree\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:616:4217 [INFO] [stdout] | [INFO] [stdout] 616 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 616 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\0" . as_ptr () as * const c_char) ; table . set_plane = (gd_api . godot_method_bind_get_method) (class_name , "set_plane\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:622:7960 [INFO] [stdout] | [INFO] [stdout] 622 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 622 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:628:8763 [INFO] [stdout] | [INFO] [stdout] 628 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 628 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_id\0" . as_ptr () as * const c_char) ; table . get_anchor_name = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_name\0" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_id\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:634:8119 [INFO] [stdout] | [INFO] [stdout] 634 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 634 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bottom_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_bottom_radius\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . get_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_top_radius\0" . as_ptr () as * const c_char) ; table . set_bottom_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; table . set_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_top_radius\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:640:3927 [INFO] [stdout] | [INFO] [stdout] 640 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 640 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:646:6252 [INFO] [stdout] | [INFO] [stdout] 646 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 646 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:652:11026 [INFO] [stdout] | [INFO] [stdout] 652 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 652 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:658:8442 [INFO] [stdout] | [INFO] [stdout] 658 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 658 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cube_map = (gd_api . godot_method_bind_get_method) (class_name , "get_cube_map\0" . as_ptr () as * const c_char) ; table . get_source = (gd_api . godot_method_bind_get_method) (class_name , "get_source\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_cube_map = (gd_api . godot_method_bind_get_method) (class_name , "set_cube_map\0" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:664:5624 [INFO] [stdout] | [INFO] [stdout] 664 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 664 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_top_left = (gd_api . godot_method_bind_get_method) (class_name , "is_using_top_left\0" . as_ptr () as * const c_char) ; table . set_use_top_left = (gd_api . godot_method_bind_get_method) (class_name , "set_use_top_left\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:670:8557 [INFO] [stdout] | [INFO] [stdout] 670 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 670 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\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\0" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\0" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . get_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_tilt\0" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\0" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; table . set_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_tilt\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:676:22273 [INFO] [stdout] | [INFO] [stdout] 676 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 676 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_all_slots = (gd_api . godot_method_bind_get_method) (class_name , "clear_all_slots\0" . as_ptr () as * const c_char) ; table . clear_slot = (gd_api . godot_method_bind_get_method) (class_name , "clear_slot\0" . as_ptr () as * const c_char) ; table . get_connection_input_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_color\0" . as_ptr () as * const c_char) ; table . get_connection_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_count\0" . as_ptr () as * const c_char) ; table . get_connection_input_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_position\0" . as_ptr () as * const c_char) ; table . get_connection_input_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_type\0" . as_ptr () as * const c_char) ; table . get_connection_output_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_color\0" . as_ptr () as * const c_char) ; table . get_connection_output_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_count\0" . as_ptr () as * const c_char) ; table . get_connection_output_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_position\0" . as_ptr () as * const c_char) ; table . get_connection_output_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_type\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_overlay = (gd_api . godot_method_bind_get_method) (class_name , "get_overlay\0" . as_ptr () as * const c_char) ; table . get_slot_color_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_left\0" . as_ptr () as * const c_char) ; table . get_slot_color_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_right\0" . as_ptr () as * const c_char) ; table . get_slot_type_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_left\0" . as_ptr () as * const c_char) ; table . get_slot_type_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_right\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . is_close_button_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_close_button_visible\0" . as_ptr () as * const c_char) ; table . is_comment = (gd_api . godot_method_bind_get_method) (class_name , "is_comment\0" . as_ptr () as * const c_char) ; table . is_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_resizable\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_left = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_left\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_right = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_right\0" . as_ptr () as * const c_char) ; table . set_comment = (gd_api . godot_method_bind_get_method) (class_name , "set_comment\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_overlay = (gd_api . godot_method_bind_get_method) (class_name , "set_overlay\0" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\0" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\0" . as_ptr () as * const c_char) ; table . set_show_close_button = (gd_api . godot_method_bind_get_method) (class_name , "set_show_close_button\0" . as_ptr () as * const c_char) ; table . set_slot = (gd_api . godot_method_bind_get_method) (class_name , "set_slot\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:682:4369 [INFO] [stdout] | [INFO] [stdout] 682 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 682 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:688:12810 [INFO] [stdout] | [INFO] [stdout] 688 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 688 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mode\0" . as_ptr () as * const c_char) ; table . get_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . get_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . get_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . get_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_animation\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mode\0" . as_ptr () as * const c_char) ; table . set_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . set_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . set_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . set_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_animation\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:694:5633 [INFO] [stdout] | [INFO] [stdout] 694 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 694 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_instance = (gd_api . godot_method_bind_get_method) (class_name , "create_instance\0" . as_ptr () as * const c_char) ; table . get_instance_path = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_path\0" . as_ptr () as * const c_char) ; table . get_stored_values = (gd_api . godot_method_bind_get_method) (class_name , "get_stored_values\0" . as_ptr () as * const c_char) ; table . replace_by_instance = (gd_api . godot_method_bind_get_method) (class_name , "replace_by_instance\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:700:3619 [INFO] [stdout] | [INFO] [stdout] 700 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 700 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:706:2890 [INFO] [stdout] | [INFO] [stdout] 706 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 706 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:712:7448 [INFO] [stdout] | [INFO] [stdout] 712 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 712 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:718:11972 [INFO] [stdout] | [INFO] [stdout] 718 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 718 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input = (gd_api . godot_method_bind_get_method) (class_name , "add_input\0" . as_ptr () as * const c_char) ; table . blend_animation = (gd_api . godot_method_bind_get_method) (class_name , "blend_animation\0" . as_ptr () as * const c_char) ; table . blend_input = (gd_api . godot_method_bind_get_method) (class_name , "blend_input\0" . as_ptr () as * const c_char) ; table . blend_node = (gd_api . godot_method_bind_get_method) (class_name , "blend_node\0" . as_ptr () as * const c_char) ; table . get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_input_count\0" . as_ptr () as * const c_char) ; table . get_input_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_name\0" . as_ptr () as * const c_char) ; table . get_parameter = (gd_api . godot_method_bind_get_method) (class_name , "get_parameter\0" . as_ptr () as * const c_char) ; table . is_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_filter_enabled\0" . as_ptr () as * const c_char) ; table . is_path_filtered = (gd_api . godot_method_bind_get_method) (class_name , "is_path_filtered\0" . as_ptr () as * const c_char) ; table . remove_input = (gd_api . godot_method_bind_get_method) (class_name , "remove_input\0" . as_ptr () as * const c_char) ; table . set_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_enabled\0" . as_ptr () as * const c_char) ; table . set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_path\0" . as_ptr () as * const c_char) ; table . set_parameter = (gd_api . godot_method_bind_get_method) (class_name , "set_parameter\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:724:5667 [INFO] [stdout] | [INFO] [stdout] 724 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 724 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\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\0" . as_ptr () as * const c_char) ; table . get_result_object = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object\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\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\0" . as_ptr () as * const c_char) ; table . get_result_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_result_rid\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:730:15292 [INFO] [stdout] | [INFO] [stdout] 730 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 730 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_target\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_target\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:736:13632 [INFO] [stdout] | [INFO] [stdout] 736 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 736 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\0" . as_ptr () as * const c_char) ; table . find_item_by_name = (gd_api . godot_method_bind_get_method) (class_name , "find_item_by_name\0" . as_ptr () as * const c_char) ; table . get_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_item_list\0" . as_ptr () as * const c_char) ; table . get_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh\0" . as_ptr () as * const c_char) ; table . get_item_name = (gd_api . godot_method_bind_get_method) (class_name , "get_item_name\0" . as_ptr () as * const c_char) ; table . get_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh\0" . as_ptr () as * const c_char) ; table . get_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . get_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_item_preview\0" . as_ptr () as * const c_char) ; table . get_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shapes\0" . as_ptr () as * const c_char) ; table . get_last_unused_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_last_unused_item_id\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . set_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh\0" . as_ptr () as * const c_char) ; table . set_item_name = (gd_api . godot_method_bind_get_method) (class_name , "set_item_name\0" . as_ptr () as * const c_char) ; table . set_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh\0" . as_ptr () as * const c_char) ; table . set_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . set_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_item_preview\0" . as_ptr () as * const c_char) ; table . set_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shapes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:742:21662 [INFO] [stdout] | [INFO] [stdout] 742 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 742 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_center_of_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_center_of_mass\0" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\0" . as_ptr () as * const c_char) ; table . get_contact_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_id\0" . as_ptr () as * const c_char) ; table . get_contact_collider_object = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_object\0" . as_ptr () as * const c_char) ; table . get_contact_collider_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_position\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape\0" . as_ptr () as * const c_char) ; table . get_contact_collider_velocity_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_velocity_at_position\0" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\0" . as_ptr () as * const c_char) ; table . get_contact_impulse = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_impulse\0" . as_ptr () as * const c_char) ; table . get_contact_local_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_normal\0" . as_ptr () as * const c_char) ; table . get_contact_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_position\0" . as_ptr () as * const c_char) ; table . get_contact_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_shape\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\0" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_principal_inertia_axes = (gd_api . godot_method_bind_get_method) (class_name , "get_principal_inertia_axes\0" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_total_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_angular_damp\0" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\0" . as_ptr () as * const c_char) ; table . get_total_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_linear_damp\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:748:4080 [INFO] [stdout] | [INFO] [stdout] 748 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 748 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_step\0" . as_ptr () as * const c_char) ; table . set_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_step\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:754:6196 [INFO] [stdout] | [INFO] [stdout] 754 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 754 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_resource\0" . as_ptr () as * const c_char) ; table . get_stage = (gd_api . godot_method_bind_get_method) (class_name , "get_stage\0" . as_ptr () as * const c_char) ; table . get_stage_count = (gd_api . godot_method_bind_get_method) (class_name , "get_stage_count\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:760:4781 [INFO] [stdout] | [INFO] [stdout] 760 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 760 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:766:28957 [INFO] [stdout] | [INFO] [stdout] 766 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 766 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_area_mask\0" . as_ptr () as * const c_char) ; table . get_attenuation_filter_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_filter_cutoff_hz\0" . as_ptr () as * const c_char) ; table . get_attenuation_filter_db = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_filter_db\0" . as_ptr () as * const c_char) ; table . get_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_model\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\0" . as_ptr () as * const c_char) ; table . get_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_angle\0" . as_ptr () as * const c_char) ; table . get_emission_angle_filter_attenuation_db = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_angle_filter_attenuation_db\0" . as_ptr () as * const c_char) ; table . get_max_db = (gd_api . godot_method_bind_get_method) (class_name , "get_max_db\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . get_out_of_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_out_of_range_mode\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_db\0" . as_ptr () as * const c_char) ; table . get_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_size\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_emission_angle_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_emission_angle_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\0" . as_ptr () as * const c_char) ; table . set_attenuation_filter_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_filter_cutoff_hz\0" . as_ptr () as * const c_char) ; table . set_attenuation_filter_db = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_filter_db\0" . as_ptr () as * const c_char) ; table . set_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_model\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\0" . as_ptr () as * const c_char) ; table . set_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle\0" . as_ptr () as * const c_char) ; table . set_emission_angle_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle_enabled\0" . as_ptr () as * const c_char) ; table . set_emission_angle_filter_attenuation_db = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle_filter_attenuation_db\0" . as_ptr () as * const c_char) ; table . set_max_db = (gd_api . godot_method_bind_get_method) (class_name , "set_max_db\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; table . set_out_of_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_out_of_range_mode\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_db\0" . as_ptr () as * const c_char) ; table . set_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_size\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:772:3805 [INFO] [stdout] | [INFO] [stdout] 772 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 772 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:778:14839 [INFO] [stdout] | [INFO] [stdout] 778 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 778 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_interpolation\0" . as_ptr () as * const c_char) ; table . get_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "get_magnet_position\0" . as_ptr () as * const c_char) ; table . get_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "get_max_iterations\0" . as_ptr () as * const c_char) ; table . get_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_min_distance\0" . as_ptr () as * const c_char) ; table . get_parent_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_skeleton\0" . as_ptr () as * const c_char) ; table . get_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_root_bone\0" . as_ptr () as * const c_char) ; table . get_target_node = (gd_api . godot_method_bind_get_method) (class_name , "get_target_node\0" . as_ptr () as * const c_char) ; table . get_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_target_transform\0" . as_ptr () as * const c_char) ; table . get_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_tip_bone\0" . as_ptr () as * const c_char) ; table . is_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "is_override_tip_basis\0" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\0" . as_ptr () as * const c_char) ; table . is_using_magnet = (gd_api . godot_method_bind_get_method) (class_name , "is_using_magnet\0" . as_ptr () as * const c_char) ; table . set_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation\0" . as_ptr () as * const c_char) ; table . set_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "set_magnet_position\0" . as_ptr () as * const c_char) ; table . set_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_max_iterations\0" . as_ptr () as * const c_char) ; table . set_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_min_distance\0" . as_ptr () as * const c_char) ; table . set_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "set_override_tip_basis\0" . as_ptr () as * const c_char) ; table . set_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_root_bone\0" . as_ptr () as * const c_char) ; table . set_target_node = (gd_api . godot_method_bind_get_method) (class_name , "set_target_node\0" . as_ptr () as * const c_char) ; table . set_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_target_transform\0" . as_ptr () as * const c_char) ; table . set_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_tip_bone\0" . as_ptr () as * const c_char) ; table . set_use_magnet = (gd_api . godot_method_bind_get_method) (class_name , "set_use_magnet\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:784:5187 [INFO] [stdout] | [INFO] [stdout] 784 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 784 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:790:4656 [INFO] [stdout] | [INFO] [stdout] 790 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 790 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:796:9464 [INFO] [stdout] | [INFO] [stdout] 796 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 796 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply = (gd_api . godot_method_bind_get_method) (class_name , "apply\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\0" . as_ptr () as * const c_char) ; table . get_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_prefix\0" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_prefix\0" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:802:3847 [INFO] [stdout] | [INFO] [stdout] 802 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 802 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:808:4420 [INFO] [stdout] | [INFO] [stdout] 808 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 808 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:814:16205 [INFO] [stdout] | [INFO] [stdout] 814 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 814 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input_port = (gd_api . godot_method_bind_get_method) (class_name , "add_input_port\0" . as_ptr () as * const c_char) ; table . add_output_port = (gd_api . godot_method_bind_get_method) (class_name , "add_output_port\0" . as_ptr () as * const c_char) ; table . clear_input_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_input_ports\0" . as_ptr () as * const c_char) ; table . clear_output_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_output_ports\0" . as_ptr () as * const c_char) ; table . get_free_input_port_id = (gd_api . godot_method_bind_get_method) (class_name , "get_free_input_port_id\0" . as_ptr () as * const c_char) ; table . get_free_output_port_id = (gd_api . godot_method_bind_get_method) (class_name , "get_free_output_port_id\0" . as_ptr () as * const c_char) ; table . get_input_port_count = (gd_api . godot_method_bind_get_method) (class_name , "get_input_port_count\0" . as_ptr () as * const c_char) ; table . get_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_inputs\0" . as_ptr () as * const c_char) ; table . get_output_port_count = (gd_api . godot_method_bind_get_method) (class_name , "get_output_port_count\0" . as_ptr () as * const c_char) ; table . get_outputs = (gd_api . godot_method_bind_get_method) (class_name , "get_outputs\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . has_input_port = (gd_api . godot_method_bind_get_method) (class_name , "has_input_port\0" . as_ptr () as * const c_char) ; table . has_output_port = (gd_api . godot_method_bind_get_method) (class_name , "has_output_port\0" . as_ptr () as * const c_char) ; table . is_valid_port_name = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_port_name\0" . as_ptr () as * const c_char) ; table . remove_input_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_input_port\0" . as_ptr () as * const c_char) ; table . remove_output_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_output_port\0" . as_ptr () as * const c_char) ; table . set_input_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_name\0" . as_ptr () as * const c_char) ; table . set_input_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_type\0" . as_ptr () as * const c_char) ; table . set_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_inputs\0" . as_ptr () as * const c_char) ; table . set_output_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_name\0" . as_ptr () as * const c_char) ; table . set_output_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_type\0" . as_ptr () as * const c_char) ; table . set_outputs = (gd_api . godot_method_bind_get_method) (class_name , "set_outputs\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:820:7307 [INFO] [stdout] | [INFO] [stdout] 820 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 820 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "get_default_input_values\0" . as_ptr () as * const c_char) ; table . get_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_input_port_default_value\0" . as_ptr () as * const c_char) ; table . get_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_output_port_for_preview\0" . as_ptr () as * const c_char) ; table . set_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "set_default_input_values\0" . as_ptr () as * const c_char) ; table . set_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_default_value\0" . as_ptr () as * const c_char) ; table . set_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_for_preview\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:826:5046 [INFO] [stdout] | [INFO] [stdout] 826 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 826 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:832:10796 [INFO] [stdout] | [INFO] [stdout] 832 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 832 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:838:4512 [INFO] [stdout] | [INFO] [stdout] 838 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 838 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:844:12479 [INFO] [stdout] | [INFO] [stdout] 844 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 844 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_value_label = (gd_api . godot_method_bind_get_method) (class_name , "get_value_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_value_label = (gd_api . godot_method_bind_get_method) (class_name , "set_value_label\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:850:96841 [INFO] [stdout] | [INFO] [stdout] 850 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_adjustment_brightness = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_brightness\0" . as_ptr () as * const c_char) ; table . get_adjustment_color_correction = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_color_correction\0" . as_ptr () as * const c_char) ; table . get_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_contrast\0" . as_ptr () as * const c_char) ; table . get_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_saturation\0" . as_ptr () as * const c_char) ; table . get_ambient_light_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_color\0" . as_ptr () as * const c_char) ; table . get_ambient_light_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_energy\0" . as_ptr () as * const c_char) ; table . get_ambient_light_sky_contribution = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_sky_contribution\0" . as_ptr () as * const c_char) ; table . get_background = (gd_api . godot_method_bind_get_method) (class_name , "get_background\0" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\0" . as_ptr () as * const c_char) ; table . get_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_energy\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_amount\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_distance\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_quality\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_transition\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_amount\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_distance\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_quality\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_transition\0" . as_ptr () as * const c_char) ; table . get_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_color\0" . as_ptr () as * const c_char) ; table . get_fog_depth_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_begin\0" . as_ptr () as * const c_char) ; table . get_fog_depth_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_curve\0" . as_ptr () as * const c_char) ; table . get_fog_depth_end = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_end\0" . as_ptr () as * const c_char) ; table . get_fog_height_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_curve\0" . as_ptr () as * const c_char) ; table . get_fog_height_max = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_max\0" . as_ptr () as * const c_char) ; table . get_fog_height_min = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_min\0" . as_ptr () as * const c_char) ; table . get_fog_sun_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_sun_amount\0" . as_ptr () as * const c_char) ; table . get_fog_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_sun_color\0" . as_ptr () as * const c_char) ; table . get_fog_transmit_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_transmit_curve\0" . as_ptr () as * const c_char) ; table . get_glow_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_blend_mode\0" . as_ptr () as * const c_char) ; table . get_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_bloom\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_bleed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_bleed_scale\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_bleed_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_bleed_threshold\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_luminance_cap = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_luminance_cap\0" . as_ptr () as * const c_char) ; table . get_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_intensity\0" . as_ptr () as * const c_char) ; table . get_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_strength\0" . as_ptr () as * const c_char) ; table . get_sky = (gd_api . godot_method_bind_get_method) (class_name , "get_sky\0" . as_ptr () as * const c_char) ; table . get_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . get_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_orientation\0" . as_ptr () as * const c_char) ; table . get_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_rotation\0" . as_ptr () as * const c_char) ; table . get_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_ssao_ao_channel_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_ao_channel_affect\0" . as_ptr () as * const c_char) ; table . get_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_bias\0" . as_ptr () as * const c_char) ; table . get_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_blur\0" . as_ptr () as * const c_char) ; table . get_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_color\0" . as_ptr () as * const c_char) ; table . get_ssao_direct_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_direct_light_affect\0" . as_ptr () as * const c_char) ; table . get_ssao_edge_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_edge_sharpness\0" . as_ptr () as * const c_char) ; table . get_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity\0" . as_ptr () as * const c_char) ; table . get_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity2\0" . as_ptr () as * const c_char) ; table . get_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_quality\0" . as_ptr () as * const c_char) ; table . get_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius\0" . as_ptr () as * const c_char) ; table . get_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius2\0" . as_ptr () as * const c_char) ; table . get_ssr_depth_tolerance = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_depth_tolerance\0" . as_ptr () as * const c_char) ; table . get_ssr_fade_in = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_fade_in\0" . as_ptr () as * const c_char) ; table . get_ssr_fade_out = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_fade_out\0" . as_ptr () as * const c_char) ; table . get_ssr_max_steps = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_max_steps\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_grey = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_grey\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_max = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_max\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_min = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_min\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_speed\0" . as_ptr () as * const c_char) ; table . get_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_exposure\0" . as_ptr () as * const c_char) ; table . get_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_white\0" . as_ptr () as * const c_char) ; table . get_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemapper\0" . as_ptr () as * const c_char) ; table . is_adjustment_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_adjustment_enabled\0" . as_ptr () as * const c_char) ; table . is_dof_blur_far_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dof_blur_far_enabled\0" . as_ptr () as * const c_char) ; table . is_dof_blur_near_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dof_blur_near_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_depth_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_depth_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_height_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_transmit_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_transmit_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_bicubic_upscale_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_bicubic_upscale_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_level_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_level_enabled\0" . as_ptr () as * const c_char) ; table . is_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssao_enabled\0" . as_ptr () as * const c_char) ; table . is_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_enabled\0" . as_ptr () as * const c_char) ; table . is_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_rough\0" . as_ptr () as * const c_char) ; table . set_adjustment_brightness = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_brightness\0" . as_ptr () as * const c_char) ; table . set_adjustment_color_correction = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_color_correction\0" . as_ptr () as * const c_char) ; table . set_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_contrast\0" . as_ptr () as * const c_char) ; table . set_adjustment_enable = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_enable\0" . as_ptr () as * const c_char) ; table . set_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_saturation\0" . as_ptr () as * const c_char) ; table . set_ambient_light_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_color\0" . as_ptr () as * const c_char) ; table . set_ambient_light_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_energy\0" . as_ptr () as * const c_char) ; table . set_ambient_light_sky_contribution = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_sky_contribution\0" . as_ptr () as * const c_char) ; table . set_background = (gd_api . godot_method_bind_get_method) (class_name , "set_background\0" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\0" . as_ptr () as * const c_char) ; table . set_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_energy\0" . as_ptr () as * const c_char) ; table . set_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_feed_id\0" . as_ptr () as * const c_char) ; table . set_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_amount\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_distance\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_enabled\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_quality\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_transition = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_transition\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_amount\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_distance\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_enabled\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_quality\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_transition = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_transition\0" . as_ptr () as * const c_char) ; table . set_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_color\0" . as_ptr () as * const c_char) ; table . set_fog_depth_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_begin\0" . as_ptr () as * const c_char) ; table . set_fog_depth_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_curve\0" . as_ptr () as * const c_char) ; table . set_fog_depth_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_depth_end = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_end\0" . as_ptr () as * const c_char) ; table . set_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_height_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_curve\0" . as_ptr () as * const c_char) ; table . set_fog_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_height_max = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_max\0" . as_ptr () as * const c_char) ; table . set_fog_height_min = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_min\0" . as_ptr () as * const c_char) ; table . set_fog_sun_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_sun_amount\0" . as_ptr () as * const c_char) ; table . set_fog_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_sun_color\0" . as_ptr () as * const c_char) ; table . set_fog_transmit_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_transmit_curve\0" . as_ptr () as * const c_char) ; table . set_fog_transmit_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_transmit_enabled\0" . as_ptr () as * const c_char) ; table . set_glow_bicubic_upscale = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_bicubic_upscale\0" . as_ptr () as * const c_char) ; table . set_glow_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_blend_mode\0" . as_ptr () as * const c_char) ; table . set_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_bloom\0" . as_ptr () as * const c_char) ; table . set_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_enabled\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_bleed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_bleed_scale\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_bleed_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_bleed_threshold\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_luminance_cap = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_luminance_cap\0" . as_ptr () as * const c_char) ; table . set_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_intensity\0" . as_ptr () as * const c_char) ; table . set_glow_level = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_level\0" . as_ptr () as * const c_char) ; table . set_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_strength\0" . as_ptr () as * const c_char) ; table . set_sky = (gd_api . godot_method_bind_get_method) (class_name , "set_sky\0" . as_ptr () as * const c_char) ; table . set_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . set_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_orientation\0" . as_ptr () as * const c_char) ; table . set_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_rotation\0" . as_ptr () as * const c_char) ; table . set_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_ssao_ao_channel_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_ao_channel_affect\0" . as_ptr () as * const c_char) ; table . set_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_bias\0" . as_ptr () as * const c_char) ; table . set_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_blur\0" . as_ptr () as * const c_char) ; table . set_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_color\0" . as_ptr () as * const c_char) ; table . set_ssao_direct_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_direct_light_affect\0" . as_ptr () as * const c_char) ; table . set_ssao_edge_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_edge_sharpness\0" . as_ptr () as * const c_char) ; table . set_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_enabled\0" . as_ptr () as * const c_char) ; table . set_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity\0" . as_ptr () as * const c_char) ; table . set_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity2\0" . as_ptr () as * const c_char) ; table . set_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_quality\0" . as_ptr () as * const c_char) ; table . set_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius\0" . as_ptr () as * const c_char) ; table . set_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius2\0" . as_ptr () as * const c_char) ; table . set_ssr_depth_tolerance = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_depth_tolerance\0" . as_ptr () as * const c_char) ; table . set_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_enabled\0" . as_ptr () as * const c_char) ; table . set_ssr_fade_in = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_fade_in\0" . as_ptr () as * const c_char) ; table . set_ssr_fade_out = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_fade_out\0" . as_ptr () as * const c_char) ; table . set_ssr_max_steps = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_max_steps\0" . as_ptr () as * const c_char) ; table . set_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_rough\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_grey = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_grey\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_max = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_max\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_min = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_min\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_speed\0" . as_ptr () as * const c_char) ; table . set_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_exposure\0" . as_ptr () as * const c_char) ; table . set_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_white\0" . as_ptr () as * const c_char) ; table . set_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemapper\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:856:15877 [INFO] [stdout] | [INFO] [stdout] 856 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 856 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_instance = (gd_api . godot_method_bind_get_method) (class_name , "can_instance\0" . as_ptr () as * const c_char) ; table . class_exists = (gd_api . godot_method_bind_get_method) (class_name , "class_exists\0" . as_ptr () as * const c_char) ; table . class_get_category = (gd_api . godot_method_bind_get_method) (class_name , "class_get_category\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant_list\0" . as_ptr () as * const c_char) ; table . class_get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_method_list\0" . as_ptr () as * const c_char) ; table . class_get_property = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property\0" . as_ptr () as * const c_char) ; table . class_get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property_list\0" . as_ptr () as * const c_char) ; table . class_get_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal\0" . as_ptr () as * const c_char) ; table . class_get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal_list\0" . as_ptr () as * const c_char) ; table . class_has_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_has_integer_constant\0" . as_ptr () as * const c_char) ; table . class_has_method = (gd_api . godot_method_bind_get_method) (class_name , "class_has_method\0" . as_ptr () as * const c_char) ; table . class_has_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_has_signal\0" . as_ptr () as * const c_char) ; table . class_set_property = (gd_api . godot_method_bind_get_method) (class_name , "class_set_property\0" . as_ptr () as * const c_char) ; table . get_class_list = (gd_api . godot_method_bind_get_method) (class_name , "get_class_list\0" . as_ptr () as * const c_char) ; table . get_inheriters_from_class = (gd_api . godot_method_bind_get_method) (class_name , "get_inheriters_from_class\0" . as_ptr () as * const c_char) ; table . get_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_class\0" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\0" . as_ptr () as * const c_char) ; table . is_class_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_enabled\0" . as_ptr () as * const c_char) ; table . is_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "is_parent_class\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:862:7382 [INFO] [stdout] | [INFO] [stdout] 862 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 862 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_monitor = (gd_api . godot_method_bind_get_method) (class_name , "get_monitor\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:868:17232 [INFO] [stdout] | [INFO] [stdout] 868 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 868 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_transition = (gd_api . godot_method_bind_get_method) (class_name , "add_transition\0" . as_ptr () as * const c_char) ; table . get_end_node = (gd_api . godot_method_bind_get_method) (class_name , "get_end_node\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_start_node = (gd_api . godot_method_bind_get_method) (class_name , "get_start_node\0" . as_ptr () as * const c_char) ; table . get_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_transition\0" . as_ptr () as * const c_char) ; table . get_transition_count = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_count\0" . as_ptr () as * const c_char) ; table . get_transition_from = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_from\0" . as_ptr () as * const c_char) ; table . get_transition_to = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_to\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_transition = (gd_api . godot_method_bind_get_method) (class_name , "has_transition\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_transition = (gd_api . godot_method_bind_get_method) (class_name , "remove_transition\0" . as_ptr () as * const c_char) ; table . remove_transition_by_index = (gd_api . godot_method_bind_get_method) (class_name , "remove_transition_by_index\0" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\0" . as_ptr () as * const c_char) ; table . replace_node = (gd_api . godot_method_bind_get_method) (class_name , "replace_node\0" . as_ptr () as * const c_char) ; table . set_end_node = (gd_api . godot_method_bind_get_method) (class_name , "set_end_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_start_node = (gd_api . godot_method_bind_get_method) (class_name , "set_start_node\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:874:13732 [INFO] [stdout] | [INFO] [stdout] 874 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 874 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_preset = (gd_api . godot_method_bind_get_method) (class_name , "add_preset\0" . as_ptr () as * const c_char) ; table . are_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_enabled\0" . as_ptr () as * const c_char) ; table . are_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_visible\0" . as_ptr () as * const c_char) ; table . erase_preset = (gd_api . godot_method_bind_get_method) (class_name , "erase_preset\0" . as_ptr () as * const c_char) ; table . get_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "get_pick_color\0" . as_ptr () as * const c_char) ; table . get_presets = (gd_api . godot_method_bind_get_method) (class_name , "get_presets\0" . as_ptr () as * const c_char) ; table . is_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_deferred_mode\0" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\0" . as_ptr () as * const c_char) ; table . is_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_hsv_mode\0" . as_ptr () as * const c_char) ; table . is_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_raw_mode\0" . as_ptr () as * const c_char) ; table . set_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred_mode\0" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\0" . as_ptr () as * const c_char) ; table . set_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_hsv_mode\0" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\0" . as_ptr () as * const c_char) ; table . set_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_enabled\0" . as_ptr () as * const c_char) ; table . set_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_visible\0" . as_ptr () as * const c_char) ; table . set_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_raw_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:880:83248 [INFO] [stdout] | [INFO] [stdout] 880 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 880 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . accept_event = (gd_api . godot_method_bind_get_method) (class_name , "accept_event\0" . as_ptr () as * const c_char) ; table . add_color_override = (gd_api . godot_method_bind_get_method) (class_name , "add_color_override\0" . as_ptr () as * const c_char) ; table . add_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "add_constant_override\0" . as_ptr () as * const c_char) ; table . add_font_override = (gd_api . godot_method_bind_get_method) (class_name , "add_font_override\0" . as_ptr () as * const c_char) ; table . add_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_override\0" . as_ptr () as * const c_char) ; table . add_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "add_shader_override\0" . as_ptr () as * const c_char) ; table . add_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "add_stylebox_override\0" . as_ptr () as * const c_char) ; table . find_next_valid_focus = (gd_api . godot_method_bind_get_method) (class_name , "find_next_valid_focus\0" . as_ptr () as * const c_char) ; table . find_prev_valid_focus = (gd_api . godot_method_bind_get_method) (class_name , "find_prev_valid_focus\0" . as_ptr () as * const c_char) ; table . force_drag = (gd_api . godot_method_bind_get_method) (class_name , "force_drag\0" . as_ptr () as * const c_char) ; table . get_anchor = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor\0" . as_ptr () as * const c_char) ; table . get_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_begin\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_combined_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_combined_minimum_size\0" . as_ptr () as * const c_char) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . get_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_custom_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_minimum_size\0" . as_ptr () as * const c_char) ; table . get_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\0" . as_ptr () as * const c_char) ; table . get_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_mode\0" . as_ptr () as * const c_char) ; table . get_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_neighbour\0" . as_ptr () as * const c_char) ; table . get_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_next\0" . as_ptr () as * const c_char) ; table . get_focus_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_owner\0" . as_ptr () as * const c_char) ; table . get_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_previous\0" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_global_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rect\0" . as_ptr () as * const c_char) ; table . get_h_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_h_grow_direction\0" . as_ptr () as * const c_char) ; table . get_h_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_h_size_flags\0" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\0" . as_ptr () as * const c_char) ; table . get_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_filter\0" . as_ptr () as * const c_char) ; table . get_parent_area_size = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_area_size\0" . as_ptr () as * const c_char) ; table . get_parent_control = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_control\0" . as_ptr () as * const c_char) ; table . get_pass_on_modal_close_click = (gd_api . godot_method_bind_get_method) (class_name , "get_pass_on_modal_close_click\0" . as_ptr () as * const c_char) ; table . get_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_pivot_offset\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_ratio\0" . as_ptr () as * const c_char) ; table . get_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox\0" . as_ptr () as * const c_char) ; table . get_theme = (gd_api . godot_method_bind_get_method) (class_name , "get_theme\0" . as_ptr () as * const c_char) ; table . get_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip\0" . as_ptr () as * const c_char) ; table . get_v_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_v_grow_direction\0" . as_ptr () as * const c_char) ; table . get_v_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_v_size_flags\0" . as_ptr () as * const c_char) ; table . grab_click_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_click_focus\0" . as_ptr () as * const c_char) ; table . grab_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_focus\0" . as_ptr () as * const c_char) ; table . has_color = (gd_api . godot_method_bind_get_method) (class_name , "has_color\0" . as_ptr () as * const c_char) ; table . has_color_override = (gd_api . godot_method_bind_get_method) (class_name , "has_color_override\0" . as_ptr () as * const c_char) ; table . has_constant = (gd_api . godot_method_bind_get_method) (class_name , "has_constant\0" . as_ptr () as * const c_char) ; table . has_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "has_constant_override\0" . as_ptr () as * const c_char) ; table . has_focus = (gd_api . godot_method_bind_get_method) (class_name , "has_focus\0" . as_ptr () as * const c_char) ; table . has_font = (gd_api . godot_method_bind_get_method) (class_name , "has_font\0" . as_ptr () as * const c_char) ; table . has_font_override = (gd_api . godot_method_bind_get_method) (class_name , "has_font_override\0" . as_ptr () as * const c_char) ; table . has_icon = (gd_api . godot_method_bind_get_method) (class_name , "has_icon\0" . as_ptr () as * const c_char) ; table . has_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "has_icon_override\0" . as_ptr () as * const c_char) ; table . has_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "has_shader_override\0" . as_ptr () as * const c_char) ; table . has_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox\0" . as_ptr () as * const c_char) ; table . has_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox_override\0" . as_ptr () as * const c_char) ; table . is_clipping_contents = (gd_api . godot_method_bind_get_method) (class_name , "is_clipping_contents\0" . as_ptr () as * const c_char) ; table . minimum_size_changed = (gd_api . godot_method_bind_get_method) (class_name , "minimum_size_changed\0" . as_ptr () as * const c_char) ; table . release_focus = (gd_api . godot_method_bind_get_method) (class_name , "release_focus\0" . as_ptr () as * const c_char) ; table . set_anchor = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor\0" . as_ptr () as * const c_char) ; table . set_anchor_and_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_and_margin\0" . as_ptr () as * const c_char) ; table . set_anchors_and_margins_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_anchors_and_margins_preset\0" . as_ptr () as * const c_char) ; table . set_anchors_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_anchors_preset\0" . as_ptr () as * const c_char) ; table . set_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_begin\0" . as_ptr () as * const c_char) ; table . set_clip_contents = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_contents\0" . as_ptr () as * const c_char) ; table . set_custom_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_minimum_size\0" . as_ptr () as * const c_char) ; table . set_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . set_drag_forwarding = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_forwarding\0" . as_ptr () as * const c_char) ; table . set_drag_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_preview\0" . as_ptr () as * const c_char) ; table . set_end = (gd_api . godot_method_bind_get_method) (class_name , "set_end\0" . as_ptr () as * const c_char) ; table . set_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_mode\0" . as_ptr () as * const c_char) ; table . set_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_neighbour\0" . as_ptr () as * const c_char) ; table . set_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_next\0" . as_ptr () as * const c_char) ; table . set_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_previous\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_h_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_h_grow_direction\0" . as_ptr () as * const c_char) ; table . set_h_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_h_size_flags\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_margins_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_margins_preset\0" . as_ptr () as * const c_char) ; table . set_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_filter\0" . as_ptr () as * const c_char) ; table . set_pass_on_modal_close_click = (gd_api . godot_method_bind_get_method) (class_name , "set_pass_on_modal_close_click\0" . as_ptr () as * const c_char) ; table . set_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_pivot_offset\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_ratio\0" . as_ptr () as * const c_char) ; table . set_theme = (gd_api . godot_method_bind_get_method) (class_name , "set_theme\0" . as_ptr () as * const c_char) ; table . set_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_tooltip\0" . as_ptr () as * const c_char) ; table . set_v_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_v_grow_direction\0" . as_ptr () as * const c_char) ; table . set_v_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_v_size_flags\0" . as_ptr () as * const c_char) ; table . show_modal = (gd_api . godot_method_bind_get_method) (class_name , "show_modal\0" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:886:5981 [INFO] [stdout] | [INFO] [stdout] 886 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 886 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "get_next_pass\0" . as_ptr () as * const c_char) ; table . get_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_render_priority\0" . as_ptr () as * const c_char) ; table . set_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "set_next_pass\0" . as_ptr () as * const c_char) ; table . set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_render_priority\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:892:16831 [INFO] [stdout] | [INFO] [stdout] 892 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 892 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 `\"\"` 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_audio_track = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_track\0" . as_ptr () as * const c_char) ; table . get_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_buffering_msec\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_name = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_name\0" . as_ptr () as * const c_char) ; table . get_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_position\0" . as_ptr () as * const c_char) ; table . get_video_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_video_texture\0" . as_ptr () as * const c_char) ; table . get_volume = (gd_api . godot_method_bind_get_method) (class_name , "get_volume\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . has_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "has_autoplay\0" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\0" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_audio_track = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_track\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "set_buffering_msec\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_paused\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_position\0" . as_ptr () as * const c_char) ; table . set_volume = (gd_api . godot_method_bind_get_method) (class_name , "set_volume\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:898:4372 [INFO] [stdout] | [INFO] [stdout] 898 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 898 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . try_lock = (gd_api . godot_method_bind_get_method) (class_name , "try_lock\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:904:3931 [INFO] [stdout] | [INFO] [stdout] 904 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 904 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:910:4437 [INFO] [stdout] | [INFO] [stdout] 910 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 910 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\0" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:916:12183 [INFO] [stdout] | [INFO] [stdout] 916 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 916 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\0" . as_ptr () as * const c_char) ; table . get_packet_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_ip\0" . as_ptr () as * const c_char) ; table . get_packet_port = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_port\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . join_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "join_multicast_group\0" . as_ptr () as * const c_char) ; table . leave_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "leave_multicast_group\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . set_broadcast_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_broadcast_enabled\0" . as_ptr () as * const c_char) ; table . set_dest_address = (gd_api . godot_method_bind_get_method) (class_name , "set_dest_address\0" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:922:8440 [INFO] [stdout] | [INFO] [stdout] 922 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 922 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_begin\0" . as_ptr () as * const c_char) ; table . get_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_end\0" . as_ptr () as * const c_char) ; table . get_thickness = (gd_api . godot_method_bind_get_method) (class_name , "get_thickness\0" . as_ptr () as * const c_char) ; table . is_vertical = (gd_api . godot_method_bind_get_method) (class_name , "is_vertical\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_begin\0" . as_ptr () as * const c_char) ; table . set_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_end\0" . as_ptr () as * const c_char) ; table . set_thickness = (gd_api . godot_method_bind_get_method) (class_name , "set_thickness\0" . as_ptr () as * const c_char) ; table . set_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_vertical\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:928:4643 [INFO] [stdout] | [INFO] [stdout] 928 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 928 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "get_deconstruct_type\0" . as_ptr () as * const c_char) ; table . set_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "set_deconstruct_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:934:6726 [INFO] [stdout] | [INFO] [stdout] 934 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 934 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_message = (gd_api . godot_method_bind_get_method) (class_name , "add_message\0" . as_ptr () as * const c_char) ; table . erase_message = (gd_api . godot_method_bind_get_method) (class_name , "erase_message\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_message = (gd_api . godot_method_bind_get_method) (class_name , "get_message\0" . as_ptr () as * const c_char) ; table . get_message_count = (gd_api . godot_method_bind_get_method) (class_name , "get_message_count\0" . as_ptr () as * const c_char) ; table . get_message_list = (gd_api . godot_method_bind_get_method) (class_name , "get_message_list\0" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:940:3889 [INFO] [stdout] | [INFO] [stdout] 940 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 940 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:946:7886 [INFO] [stdout] | [INFO] [stdout] 946 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 946 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_resource = (gd_api . godot_method_bind_get_method) (class_name , "add_resource\0" . as_ptr () as * const c_char) ; table . get_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_resource\0" . as_ptr () as * const c_char) ; table . get_resource_list = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_list\0" . as_ptr () as * const c_char) ; table . has_resource = (gd_api . godot_method_bind_get_method) (class_name , "has_resource\0" . as_ptr () as * const c_char) ; table . remove_resource = (gd_api . godot_method_bind_get_method) (class_name , "remove_resource\0" . as_ptr () as * const c_char) ; table . rename_resource = (gd_api . godot_method_bind_get_method) (class_name , "rename_resource\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:952:6957 [INFO] [stdout] | [INFO] [stdout] 952 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 952 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . get_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_polygon\0" . as_ptr () as * const c_char) ; table . set_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . set_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:958:9260 [INFO] [stdout] | [INFO] [stdout] 958 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 958 | # [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 FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_data\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . set_data_partial = (gd_api . godot_method_bind_get_method) (class_name , "set_data_partial\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; table . set_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_data\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:964:7780 [INFO] [stdout] | [INFO] [stdout] 964 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 964 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color_default = (gd_api . godot_method_bind_get_method) (class_name , "get_color_default\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_color_default = (gd_api . godot_method_bind_get_method) (class_name , "set_color_default\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:970:8153 [INFO] [stdout] | [INFO] [stdout] 970 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 970 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\0" . as_ptr () as * const c_char) ; table . get_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_instance\0" . as_ptr () as * const c_char) ; table . get_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_mask\0" . as_ptr () as * const c_char) ; table . get_layer_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_mask_bit\0" . as_ptr () as * const c_char) ; table . get_transformed_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_transformed_aabb\0" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\0" . as_ptr () as * const c_char) ; table . set_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_mask\0" . as_ptr () as * const c_char) ; table . set_layer_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_mask_bit\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:976:4705 [INFO] [stdout] | [INFO] [stdout] 976 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 976 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "get_uniform_name\0" . as_ptr () as * const c_char) ; table . set_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "set_uniform_name\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:982:5753 [INFO] [stdout] | [INFO] [stdout] 982 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 982 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:988:5973 [INFO] [stdout] | [INFO] [stdout] 988 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 988 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_text = (gd_api . godot_method_bind_get_method) (class_name , "get_as_text\0" . as_ptr () as * const c_char) ; table . get_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_shortcut\0" . as_ptr () as * const c_char) ; table . is_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . set_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:994:20087 [INFO] [stdout] | [INFO] [stdout] 994 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 994 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ground_bottom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_bottom_color\0" . as_ptr () as * const c_char) ; table . get_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_curve\0" . as_ptr () as * const c_char) ; table . get_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_energy\0" . as_ptr () as * const c_char) ; table . get_ground_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_horizon_color\0" . as_ptr () as * const c_char) ; table . get_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_curve\0" . as_ptr () as * const c_char) ; table . get_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_energy\0" . as_ptr () as * const c_char) ; table . get_sky_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_horizon_color\0" . as_ptr () as * const c_char) ; table . get_sky_top_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_top_color\0" . as_ptr () as * const c_char) ; table . get_sun_angle_max = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_angle_max\0" . as_ptr () as * const c_char) ; table . get_sun_angle_min = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_angle_min\0" . as_ptr () as * const c_char) ; table . get_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_color\0" . as_ptr () as * const c_char) ; table . get_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_curve\0" . as_ptr () as * const c_char) ; table . get_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_energy\0" . as_ptr () as * const c_char) ; table . get_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_latitude\0" . as_ptr () as * const c_char) ; table . get_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_longitude\0" . as_ptr () as * const c_char) ; table . get_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_size\0" . as_ptr () as * const c_char) ; table . set_ground_bottom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_bottom_color\0" . as_ptr () as * const c_char) ; table . set_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_curve\0" . as_ptr () as * const c_char) ; table . set_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_energy\0" . as_ptr () as * const c_char) ; table . set_ground_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_horizon_color\0" . as_ptr () as * const c_char) ; table . set_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_curve\0" . as_ptr () as * const c_char) ; table . set_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_energy\0" . as_ptr () as * const c_char) ; table . set_sky_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_horizon_color\0" . as_ptr () as * const c_char) ; table . set_sky_top_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_top_color\0" . as_ptr () as * const c_char) ; table . set_sun_angle_max = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_angle_max\0" . as_ptr () as * const c_char) ; table . set_sun_angle_min = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_angle_min\0" . as_ptr () as * const c_char) ; table . set_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_color\0" . as_ptr () as * const c_char) ; table . set_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_curve\0" . as_ptr () as * const c_char) ; table . set_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_energy\0" . as_ptr () as * const c_char) ; table . set_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_latitude\0" . as_ptr () as * const c_char) ; table . set_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_longitude\0" . as_ptr () as * const c_char) ; table . set_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1000:4707 [INFO] [stdout] | [INFO] [stdout] 1000 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1000 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1006:4465 [INFO] [stdout] | [INFO] [stdout] 1006 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1006 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1012:30309 [INFO] [stdout] | [INFO] [stdout] 1012 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1012 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . get_camera_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_rid\0" . as_ptr () as * const c_char) ; table . get_camera_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_transform\0" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\0" . as_ptr () as * const c_char) ; table . get_cull_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask_bit\0" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_fov = (gd_api . godot_method_bind_get_method) (class_name , "get_fov\0" . as_ptr () as * const c_char) ; table . get_frustum = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum\0" . as_ptr () as * const c_char) ; table . get_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum_offset\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_keep_aspect_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_keep_aspect_mode\0" . as_ptr () as * const c_char) ; table . get_projection = (gd_api . godot_method_bind_get_method) (class_name , "get_projection\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . get_zfar = (gd_api . godot_method_bind_get_method) (class_name , "get_zfar\0" . as_ptr () as * const c_char) ; table . get_znear = (gd_api . godot_method_bind_get_method) (class_name , "get_znear\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . is_position_behind = (gd_api . godot_method_bind_get_method) (class_name , "is_position_behind\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; table . project_local_ray_normal = (gd_api . godot_method_bind_get_method) (class_name , "project_local_ray_normal\0" . as_ptr () as * const c_char) ; table . project_position = (gd_api . godot_method_bind_get_method) (class_name , "project_position\0" . as_ptr () as * const c_char) ; table . project_ray_normal = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_normal\0" . as_ptr () as * const c_char) ; table . project_ray_origin = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_origin\0" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\0" . as_ptr () as * const c_char) ; table . set_cull_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask_bit\0" . as_ptr () as * const c_char) ; table . set_current = (gd_api . godot_method_bind_get_method) (class_name , "set_current\0" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_fov = (gd_api . godot_method_bind_get_method) (class_name , "set_fov\0" . as_ptr () as * const c_char) ; table . set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum\0" . as_ptr () as * const c_char) ; table . set_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum_offset\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_keep_aspect_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_aspect_mode\0" . as_ptr () as * const c_char) ; table . set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "set_orthogonal\0" . as_ptr () as * const c_char) ; table . set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "set_perspective\0" . as_ptr () as * const c_char) ; table . set_projection = (gd_api . godot_method_bind_get_method) (class_name , "set_projection\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; table . set_zfar = (gd_api . godot_method_bind_get_method) (class_name , "set_zfar\0" . as_ptr () as * const c_char) ; table . set_znear = (gd_api . godot_method_bind_get_method) (class_name , "set_znear\0" . as_ptr () as * const c_char) ; table . unproject_position = (gd_api . godot_method_bind_get_method) (class_name , "unproject_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1018:5195 [INFO] [stdout] | [INFO] [stdout] 1018 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1018 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1024:3868 [INFO] [stdout] | [INFO] [stdout] 1024 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1024 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1030:21646 [INFO] [stdout] | [INFO] [stdout] 1030 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1030 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_connection_type\0" . as_ptr () as * const c_char) ; table . add_valid_left_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_left_disconnect_type\0" . as_ptr () as * const c_char) ; table . add_valid_right_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_right_disconnect_type\0" . as_ptr () as * const c_char) ; table . clear_connections = (gd_api . godot_method_bind_get_method) (class_name , "clear_connections\0" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\0" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\0" . as_ptr () as * const c_char) ; table . get_connection_list = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_list\0" . as_ptr () as * const c_char) ; table . get_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_opacity\0" . as_ptr () as * const c_char) ; table . get_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_size\0" . as_ptr () as * const c_char) ; table . get_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_ofs\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\0" . as_ptr () as * const c_char) ; table . get_zoom_hbox = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_hbox\0" . as_ptr () as * const c_char) ; table . is_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_minimap_enabled\0" . as_ptr () as * const c_char) ; table . is_node_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_node_connected\0" . as_ptr () as * const c_char) ; table . is_right_disconnects_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_right_disconnects_enabled\0" . as_ptr () as * const c_char) ; table . is_using_snap = (gd_api . godot_method_bind_get_method) (class_name , "is_using_snap\0" . as_ptr () as * const c_char) ; table . is_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_connection_type\0" . as_ptr () as * const c_char) ; table . remove_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_connection_type\0" . as_ptr () as * const c_char) ; table . remove_valid_left_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_left_disconnect_type\0" . as_ptr () as * const c_char) ; table . remove_valid_right_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_right_disconnect_type\0" . as_ptr () as * const c_char) ; table . set_connection_activity = (gd_api . godot_method_bind_get_method) (class_name , "set_connection_activity\0" . as_ptr () as * const c_char) ; table . set_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_enabled\0" . as_ptr () as * const c_char) ; table . set_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_opacity\0" . as_ptr () as * const c_char) ; table . set_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_size\0" . as_ptr () as * const c_char) ; table . set_right_disconnects = (gd_api . godot_method_bind_get_method) (class_name , "set_right_disconnects\0" . as_ptr () as * const c_char) ; table . set_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_ofs\0" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_use_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_use_snap\0" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1036:7494 [INFO] [stdout] | [INFO] [stdout] 1036 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1036 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_material = (gd_api . godot_method_bind_get_method) (class_name , "add_material\0" . as_ptr () as * const c_char) ; table . create_handle_material = (gd_api . godot_method_bind_get_method) (class_name , "create_handle_material\0" . as_ptr () as * const c_char) ; table . create_icon_material = (gd_api . godot_method_bind_get_method) (class_name , "create_icon_material\0" . as_ptr () as * const c_char) ; table . create_material = (gd_api . godot_method_bind_get_method) (class_name , "create_material\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1042:4494 [INFO] [stdout] | [INFO] [stdout] 1042 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1042 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_panorama = (gd_api . godot_method_bind_get_method) (class_name , "get_panorama\0" . as_ptr () as * const c_char) ; table . set_panorama = (gd_api . godot_method_bind_get_method) (class_name , "set_panorama\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1048:15421 [INFO] [stdout] | [INFO] [stdout] 1048 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1048 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_fallback = (gd_api . godot_method_bind_get_method) (class_name , "add_fallback\0" . as_ptr () as * const c_char) ; table . get_available_chars = (gd_api . godot_method_bind_get_method) (class_name , "get_available_chars\0" . as_ptr () as * const c_char) ; table . get_fallback = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback\0" . as_ptr () as * const c_char) ; table . get_fallback_count = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_count\0" . as_ptr () as * const c_char) ; table . get_font_data = (gd_api . godot_method_bind_get_method) (class_name , "get_font_data\0" . as_ptr () as * const c_char) ; table . get_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_color\0" . as_ptr () as * const c_char) ; table . get_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_size\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_spacing = (gd_api . godot_method_bind_get_method) (class_name , "get_spacing\0" . as_ptr () as * const c_char) ; table . get_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_use_filter\0" . as_ptr () as * const c_char) ; table . get_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "get_use_mipmaps\0" . as_ptr () as * const c_char) ; table . remove_fallback = (gd_api . godot_method_bind_get_method) (class_name , "remove_fallback\0" . as_ptr () as * const c_char) ; table . set_fallback = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback\0" . as_ptr () as * const c_char) ; table . set_font_data = (gd_api . godot_method_bind_get_method) (class_name , "set_font_data\0" . as_ptr () as * const c_char) ; table . set_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_color\0" . as_ptr () as * const c_char) ; table . set_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_size\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_spacing = (gd_api . godot_method_bind_get_method) (class_name , "set_spacing\0" . as_ptr () as * const c_char) ; table . set_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_use_filter\0" . as_ptr () as * const c_char) ; table . set_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "set_use_mipmaps\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1054:3616 [INFO] [stdout] | [INFO] [stdout] 1054 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1054 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1066:9433 [INFO] [stdout] | [INFO] [stdout] 1066 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1066 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . exists = (gd_api . godot_method_bind_get_method) (class_name , "exists\0" . as_ptr () as * const c_char) ; table . get_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_dependencies\0" . as_ptr () as * const c_char) ; table . get_recognized_extensions_for_type = (gd_api . godot_method_bind_get_method) (class_name , "get_recognized_extensions_for_type\0" . as_ptr () as * const c_char) ; table . has = (gd_api . godot_method_bind_get_method) (class_name , "has\0" . as_ptr () as * const c_char) ; table . has_cached = (gd_api . godot_method_bind_get_method) (class_name , "has_cached\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_interactive = (gd_api . godot_method_bind_get_method) (class_name , "load_interactive\0" . as_ptr () as * const c_char) ; table . set_abort_on_missing_resources = (gd_api . godot_method_bind_get_method) (class_name , "set_abort_on_missing_resources\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1072:6362 [INFO] [stdout] | [INFO] [stdout] 1072 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1072 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_func = (gd_api . godot_method_bind_get_method) (class_name , "call_func\0" . as_ptr () as * const c_char) ; table . call_funcv = (gd_api . godot_method_bind_get_method) (class_name , "call_funcv\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; table . set_instance = (gd_api . godot_method_bind_get_method) (class_name , "set_instance\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1078:3763 [INFO] [stdout] | [INFO] [stdout] 1078 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1078 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1084:11410 [INFO] [stdout] | [INFO] [stdout] 1084 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1084 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\0" . as_ptr () as * const c_char) ; table . get_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_ip\0" . as_ptr () as * const c_char) ; table . get_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "get_ca_chain\0" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\0" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\0" . as_ptr () as * const c_char) ; table . get_private_key = (gd_api . godot_method_bind_get_method) (class_name , "get_private_key\0" . as_ptr () as * const c_char) ; table . get_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_ssl_certificate\0" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\0" . as_ptr () as * const c_char) ; table . set_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "set_ca_chain\0" . as_ptr () as * const c_char) ; table . set_private_key = (gd_api . godot_method_bind_get_method) (class_name , "set_private_key\0" . as_ptr () as * const c_char) ; table . set_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_ssl_certificate\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1090:6738 [INFO] [stdout] | [INFO] [stdout] 1090 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1090 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_base_texture\0" . as_ptr () as * const c_char) ; table . get_image_size = (gd_api . godot_method_bind_get_method) (class_name , "get_image_size\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_base_texture\0" . as_ptr () as * const c_char) ; table . set_image_size = (gd_api . godot_method_bind_get_method) (class_name , "set_image_size\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1096:6025 [INFO] [stdout] | [INFO] [stdout] 1096 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1096 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "get_wait_time\0" . as_ptr () as * const c_char) ; table . get_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_yield_mode\0" . as_ptr () as * const c_char) ; table . set_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "set_wait_time\0" . as_ptr () as * const c_char) ; table . set_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_yield_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1102:7068 [INFO] [stdout] | [INFO] [stdout] 1102 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1102 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input_data_port = (gd_api . godot_method_bind_get_method) (class_name , "add_input_data_port\0" . as_ptr () as * const c_char) ; table . add_output_data_port = (gd_api . godot_method_bind_get_method) (class_name , "add_output_data_port\0" . as_ptr () as * const c_char) ; table . remove_input_data_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_input_data_port\0" . as_ptr () as * const c_char) ; table . remove_output_data_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_output_data_port\0" . as_ptr () as * const c_char) ; table . set_input_data_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_data_port_name\0" . as_ptr () as * const c_char) ; table . set_input_data_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_input_data_port_type\0" . as_ptr () as * const c_char) ; table . set_output_data_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_output_data_port_name\0" . as_ptr () as * const c_char) ; table . set_output_data_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_output_data_port_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1108:20850 [INFO] [stdout] | [INFO] [stdout] 1108 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1108 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\0" . as_ptr () as * const c_char) ; table . get_contact_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_id\0" . as_ptr () as * const c_char) ; table . get_contact_collider_object = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_object\0" . as_ptr () as * const c_char) ; table . get_contact_collider_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_position\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape_metadata\0" . as_ptr () as * const c_char) ; table . get_contact_collider_velocity_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_velocity_at_position\0" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\0" . as_ptr () as * const c_char) ; table . get_contact_local_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_normal\0" . as_ptr () as * const c_char) ; table . get_contact_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_position\0" . as_ptr () as * const c_char) ; table . get_contact_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_shape\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\0" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_total_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_angular_damp\0" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\0" . as_ptr () as * const c_char) ; table . get_total_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_linear_damp\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1114:4051 [INFO] [stdout] | [INFO] [stdout] 1114 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1114 | # [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 , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1120:8647 [INFO] [stdout] | [INFO] [stdout] 1120 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1120 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_max_pending_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_max_pending_connections\0" . as_ptr () as * const c_char) ; table . is_connection_available = (gd_api . godot_method_bind_get_method) (class_name , "is_connection_available\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_max_pending_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_max_pending_connections\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1126:21076 [INFO] [stdout] | [INFO] [stdout] 1126 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1126 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_tab = (gd_api . godot_method_bind_get_method) (class_name , "add_tab\0" . as_ptr () as * const c_char) ; table . ensure_tab_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_tab_visible\0" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\0" . as_ptr () as * const c_char) ; table . get_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . get_offset_buttons_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_offset_buttons_visible\0" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\0" . as_ptr () as * const c_char) ; table . get_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . get_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "get_select_with_rmb\0" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\0" . as_ptr () as * const c_char) ; table . get_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\0" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\0" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\0" . as_ptr () as * const c_char) ; table . get_tab_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_offset\0" . as_ptr () as * const c_char) ; table . get_tab_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_rect\0" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\0" . as_ptr () as * const c_char) ; table . get_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "get_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; table . move_tab = (gd_api . godot_method_bind_get_method) (class_name , "move_tab\0" . as_ptr () as * const c_char) ; table . remove_tab = (gd_api . godot_method_bind_get_method) (class_name , "remove_tab\0" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\0" . as_ptr () as * const c_char) ; table . set_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . set_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . set_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "set_select_with_rmb\0" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\0" . as_ptr () as * const c_char) ; table . set_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\0" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\0" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\0" . as_ptr () as * const c_char) ; table . set_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:10:1439 [INFO] [stdout] | [INFO] [stdout] 10 | ...el_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { this : RawObject < Self > , } impl AudioStreamMicrophone { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamMicrophone` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:34:1512 [INFO] [stdout] | [INFO] [stdout] 34 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectLowPassFilter { this : RawObject < Self > , } impl AudioEffectLowPassFilter { #... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectLowPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:52:1365 [INFO] [stdout] | [INFO] [stdout] 52 | ...camel_case_types)] # [derive (Debug)] pub struct AudioBusLayout { this : RawObject < Self > , } impl AudioBusLayout { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioBusLayout` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:94:1194 [INFO] [stdout] | [INFO] [stdout] 94 | ..._camel_case_types)] # [derive (Debug)] pub struct InputDefault { this : RawObject < Self > , } impl InputDefault { } impl gdnative_cor... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `InputDefault` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:112:1478 [INFO] [stdout] | [INFO] [stdout] 112 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { this : RawObject < Self > , } impl VisualShaderNodeVectorClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:148:1872 [INFO] [stdout] | [INFO] [stdout] 148 | ...camel_case_types)] # [derive (Debug)] pub struct MarginContainer { this : RawObject < Self > , } impl MarginContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `MarginContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:220:1293 [INFO] [stdout] | [INFO] [stdout] 220 | ...camel_case_types)] # [derive (Debug)] pub struct RootMotionView { this : RawObject < Self > , } impl RootMotionView { } impl gdnative_... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `RootMotionView` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:346:1349 [INFO] [stdout] | [INFO] [stdout] 346 | ...mel_case_types)] # [derive (Debug)] pub struct AudioEffectInstance { this : RawObject < Self > , } impl AudioEffectInstance { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectInstance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:352:1437 [INFO] [stdout] | [INFO] [stdout] 352 | ...mel_case_types)] # [derive (Debug)] pub struct AnimationNodeOutput { this : RawObject < Self > , } impl AnimationNodeOutput { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeOutput` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1132:16976 [INFO] [stdout] | [INFO] [stdout] 1132 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1132 | # [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` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine 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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_lock\0" . as_ptr () as * const c_char) ; table . get_floor_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_normal\0" . as_ptr () as * const c_char) ; table . get_floor_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_velocity\0" . as_ptr () as * const c_char) ; table . get_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_safe_margin\0" . as_ptr () as * const c_char) ; table . get_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_collision\0" . as_ptr () as * const c_char) ; table . get_slide_count = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_count\0" . as_ptr () as * const c_char) ; table . is_on_ceiling = (gd_api . godot_method_bind_get_method) (class_name , "is_on_ceiling\0" . as_ptr () as * const c_char) ; table . is_on_floor = (gd_api . godot_method_bind_get_method) (class_name , "is_on_floor\0" . as_ptr () as * const c_char) ; table . is_on_wall = (gd_api . godot_method_bind_get_method) (class_name , "is_on_wall\0" . as_ptr () as * const c_char) ; table . move_and_collide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_collide\0" . as_ptr () as * const c_char) ; table . move_and_slide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide\0" . as_ptr () as * const c_char) ; table . move_and_slide_with_snap = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide_with_snap\0" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\0" . as_ptr () as * const c_char) ; table . set_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_safe_margin\0" . as_ptr () as * const c_char) ; table . test_move = (gd_api . godot_method_bind_get_method) (class_name , "test_move\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:394:1398 [INFO] [stdout] | [INFO] [stdout] 394 | ..._camel_case_types)] # [derive (Debug)] pub struct StyleBoxEmpty { this : RawObject < Self > , } impl StyleBoxEmpty { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `StyleBoxEmpty` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:400:1760 [INFO] [stdout] | [INFO] [stdout] 400 | ...n_camel_case_types)] # [derive (Debug)] pub struct Position3D { this : RawObject < Self > , } impl Position3D { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Position3D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1138:4440 [INFO] [stdout] | [INFO] [stdout] 1138 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1138 | # [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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_typed = (gd_api . godot_method_bind_get_method) (class_name , "get_typed\0" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:412:1478 [INFO] [stdout] | [INFO] [stdout] 412 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarClamp { this : RawObject < Self > , } impl VisualShaderNodeScalarClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:418:1458 [INFO] [stdout] | [INFO] [stdout] 418 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeSwitch { this : RawObject < Self > , } impl VisualShaderNodeSwitch { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:502:1258 [INFO] [stdout] | [INFO] [stdout] 502 | ...on_camel_case_types)] # [derive (Debug)] pub struct Separator { this : RawObject < Self > , } impl Separator { } impl gdnative_core ::... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Separator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:514:1462 [INFO] [stdout] | [INFO] [stdout] 514 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFresnel { this : RawObject < Self > , } impl VisualShaderNodeFresnel { # ... [INFO] [stdout] | ----------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeFresnel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:520:1434 [INFO] [stdout] | [INFO] [stdout] 520 | ...amel_case_types)] # [derive (Debug)] pub struct VisualScriptSelf { this : RawObject < Self > , } impl VisualScriptSelf { # [doc = "Cre... [INFO] [stdout] | ---------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSelf` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:526:1846 [INFO] [stdout] | [INFO] [stdout] 526 | ...non_camel_case_types)] # [derive (Debug)] pub struct HSlider { this : RawObject < Self > , } impl HSlider { # [doc = "Creates a new in... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSlider` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:556:1498 [INFO] [stdout] | [INFO] [stdout] 556 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSc... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:568:1842 [INFO] [stdout] | [INFO] [stdout] 568 | ...n_camel_case_types)] # [derive (Debug)] pub struct HSeparator { this : RawObject < Self > , } impl HSeparator { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSeparator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1144:6725 [INFO] [stdout] | [INFO] [stdout] 1144 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1144 | # [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\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 } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . base64_to_raw = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_raw\0" . as_ptr () as * const c_char) ; table . base64_to_utf8 = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_utf8\0" . as_ptr () as * const c_char) ; table . base64_to_variant = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_variant\0" . as_ptr () as * const c_char) ; table . raw_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "raw_to_base64\0" . as_ptr () as * const c_char) ; table . utf8_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "utf8_to_base64\0" . as_ptr () as * const c_char) ; table . variant_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "variant_to_base64\0" . as_ptr () as * const c_char) ; } } } [WARN] too much data in the log, truncating it