[INFO] fetching crate gdnative-bindings-lily 0.9.3... [INFO] checking gdnative-bindings-lily-0.9.3 against try#5de9e0e6cf775e94e0de2003f35e183f3f77bfe8 for pr-143808 [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 5de9e0e6cf775e94e0de2003f35e183f3f77bfe8 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+5de9e0e6cf775e94e0de2003f35e183f3f77bfe8" "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" "+5de9e0e6cf775e94e0de2003f35e183f3f77bfe8" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 66 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.9.1) [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" "+5de9e0e6cf775e94e0de2003f35e183f3f77bfe8" "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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+5de9e0e6cf775e94e0de2003f35e183f3f77bfe8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c5a4a7f007f81a70ccd89642cb0a95f7e5d4ac68f29f64cc976fccd70cebc0ec [INFO] running `Command { std: "docker" "start" "-a" "c5a4a7f007f81a70ccd89642cb0a95f7e5d4ac68f29f64cc976fccd70cebc0ec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c5a4a7f007f81a70ccd89642cb0a95f7e5d4ac68f29f64cc976fccd70cebc0ec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c5a4a7f007f81a70ccd89642cb0a95f7e5d4ac68f29f64cc976fccd70cebc0ec", kill_on_drop: false }` [INFO] [stdout] c5a4a7f007f81a70ccd89642cb0a95f7e5d4ac68f29f64cc976fccd70cebc0ec [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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+5de9e0e6cf775e94e0de2003f35e183f3f77bfe8" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c324f8797632ad1266e2496c3a588fba76a6f523438257c4c6a5de1a65bcc136 [INFO] running `Command { std: "docker" "start" "-a" "c324f8797632ad1266e2496c3a588fba76a6f523438257c4c6a5de1a65bcc136", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling glob v0.3.2 [INFO] [stderr] Compiling nom v5.1.3 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling bindgen v0.56.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling lazycell v1.3.0 [INFO] [stderr] Compiling peeking_take_while v0.1.2 [INFO] [stderr] Compiling libloading v0.8.8 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling bitflags v1.3.2 [INFO] [stderr] Compiling xmlparser v0.13.6 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling unindent v0.1.11 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling roxmltree v0.14.1 [INFO] [stderr] Checking ahash v0.7.8 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking approx v0.4.0 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Compiling regex v1.11.1 [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-9b9d3e6ddcc0e9b9/out/generated.rs:4:1652 [INFO] [stdout] | [INFO] [stdout] 4 | ...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] = 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-9b9d3e6ddcc0e9b9/out/generated.rs:34:1450 [INFO] [stdout] | [INFO] [stdout] 34 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:52:1408 [INFO] [stdout] | [INFO] [stdout] 52 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:76:1450 [INFO] [stdout] | [INFO] [stdout] 76 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:88:1908 [INFO] [stdout] | [INFO] [stdout] 88 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:100:1522 [INFO] [stdout] | [INFO] [stdout] 100 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:160:1760 [INFO] [stdout] | [INFO] [stdout] 160 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:172:1873 [INFO] [stdout] | [INFO] [stdout] 172 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:190:1321 [INFO] [stdout] | [INFO] [stdout] 190 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:208:1244 [INFO] [stdout] | [INFO] [stdout] 208 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:214:1398 [INFO] [stdout] | [INFO] [stdout] 214 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:226:1872 [INFO] [stdout] | [INFO] [stdout] 226 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:262:1462 [INFO] [stdout] | [INFO] [stdout] 262 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:274:1486 [INFO] [stdout] | [INFO] [stdout] 274 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:298:1442 [INFO] [stdout] | [INFO] [stdout] 298 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:304:1560 [INFO] [stdout] | [INFO] [stdout] 304 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:328:1186 [INFO] [stdout] | [INFO] [stdout] 328 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:382:1486 [INFO] [stdout] | [INFO] [stdout] 382 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:388:1194 [INFO] [stdout] | [INFO] [stdout] 388 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:472:1771 [INFO] [stdout] | [INFO] [stdout] 472 | ...(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-9b9d3e6ddcc0e9b9/out/generated.rs:520:1458 [INFO] [stdout] | [INFO] [stdout] 520 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:544:1520 [INFO] [stdout] | [INFO] [stdout] 544 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:550:1478 [INFO] [stdout] | [INFO] [stdout] 550 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:592:1926 [INFO] [stdout] | [INFO] [stdout] 592 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:622:1478 [INFO] [stdout] | [INFO] [stdout] 622 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:634:1458 [INFO] [stdout] | [INFO] [stdout] 634 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:688:1846 [INFO] [stdout] | [INFO] [stdout] 688 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:730:1349 [INFO] [stdout] | [INFO] [stdout] 730 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:742:1688 [INFO] [stdout] | [INFO] [stdout] 742 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:754:1450 [INFO] [stdout] | [INFO] [stdout] 754 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:772:1926 [INFO] [stdout] | [INFO] [stdout] 772 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:784:1520 [INFO] [stdout] | [INFO] [stdout] 784 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:796:1464 [INFO] [stdout] | [INFO] [stdout] 796 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:826:1446 [INFO] [stdout] | [INFO] [stdout] 826 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:850:1516 [INFO] [stdout] | [INFO] [stdout] 850 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:892:1477 [INFO] [stdout] | [INFO] [stdout] 892 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:898:1309 [INFO] [stdout] | [INFO] [stdout] 898 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:904:1458 [INFO] [stdout] | [INFO] [stdout] 904 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:910:1470 [INFO] [stdout] | [INFO] [stdout] 910 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:916:1494 [INFO] [stdout] | [INFO] [stdout] 916 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:922:1908 [INFO] [stdout] | [INFO] [stdout] 922 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:964:1553 [INFO] [stdout] | [INFO] [stdout] 964 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:976:1906 [INFO] [stdout] | [INFO] [stdout] 976 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:988:1798 [INFO] [stdout] | [INFO] [stdout] 988 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1066:1564 [INFO] [stdout] | [INFO] [stdout] 1066 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1108:1482 [INFO] [stdout] | [INFO] [stdout] 1108 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1198:1337 [INFO] [stdout] | [INFO] [stdout] 1198 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1228:1449 [INFO] [stdout] | [INFO] [stdout] 1228 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1240:1498 [INFO] [stdout] | [INFO] [stdout] 1240 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1258:1880 [INFO] [stdout] | [INFO] [stdout] 1258 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1264:1478 [INFO] [stdout] | [INFO] [stdout] 1264 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1306:1400 [INFO] [stdout] | [INFO] [stdout] 1306 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1348:1490 [INFO] [stdout] | [INFO] [stdout] 1348 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1378:1498 [INFO] [stdout] | [INFO] [stdout] 1378 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1402:1429 [INFO] [stdout] | [INFO] [stdout] 1402 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1408:1437 [INFO] [stdout] | [INFO] [stdout] 1408 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1444:1445 [INFO] [stdout] | [INFO] [stdout] 1444 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1474:1498 [INFO] [stdout] | [INFO] [stdout] 1474 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1492:1349 [INFO] [stdout] | [INFO] [stdout] 1492 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1582:1454 [INFO] [stdout] | [INFO] [stdout] 1582 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1636:1572 [INFO] [stdout] | [INFO] [stdout] 1636 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1648:1341 [INFO] [stdout] | [INFO] [stdout] 1648 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1654:1482 [INFO] [stdout] | [INFO] [stdout] 1654 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1684:1792 [INFO] [stdout] | [INFO] [stdout] 1684 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1696:1365 [INFO] [stdout] | [INFO] [stdout] 1696 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1726:1458 [INFO] [stdout] | [INFO] [stdout] 1726 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1732:1498 [INFO] [stdout] | [INFO] [stdout] 1732 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1744:1460 [INFO] [stdout] | [INFO] [stdout] 1744 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1780:1442 [INFO] [stdout] | [INFO] [stdout] 1780 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1786:1874 [INFO] [stdout] | [INFO] [stdout] 1786 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1816:1365 [INFO] [stdout] | [INFO] [stdout] 1816 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1924:1464 [INFO] [stdout] | [INFO] [stdout] 1924 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1942:1516 [INFO] [stdout] | [INFO] [stdout] 1942 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:1984:1506 [INFO] [stdout] | [INFO] [stdout] 1984 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:1990:1439 [INFO] [stdout] | [INFO] [stdout] 1990 | ...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] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:2086:1434 [INFO] [stdout] | [INFO] [stdout] 2086 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2092:1426 [INFO] [stdout] | [INFO] [stdout] 2092 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2110:1412 [INFO] [stdout] | [INFO] [stdout] 2110 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2122:1504 [INFO] [stdout] | [INFO] [stdout] 2122 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2134:1387 [INFO] [stdout] | [INFO] [stdout] 2134 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2152:1321 [INFO] [stdout] | [INFO] [stdout] 2152 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2176:1438 [INFO] [stdout] | [INFO] [stdout] 2176 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2242:1842 [INFO] [stdout] | [INFO] [stdout] 2242 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2248:1165 [INFO] [stdout] | [INFO] [stdout] 2248 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2278:1842 [INFO] [stdout] | [INFO] [stdout] 2278 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2296:1836 [INFO] [stdout] | [INFO] [stdout] 2296 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2350:1866 [INFO] [stdout] | [INFO] [stdout] 2350 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2368:1458 [INFO] [stdout] | [INFO] [stdout] 2368 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2386:1512 [INFO] [stdout] | [INFO] [stdout] 2386 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2458:1307 [INFO] [stdout] | [INFO] [stdout] 2458 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2464:1293 [INFO] [stdout] | [INFO] [stdout] 2464 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2500:1309 [INFO] [stdout] | [INFO] [stdout] 2500 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2560:1454 [INFO] [stdout] | [INFO] [stdout] 2560 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2578:1450 [INFO] [stdout] | [INFO] [stdout] 2578 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2602:1246 [INFO] [stdout] | [INFO] [stdout] 2602 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2608:1494 [INFO] [stdout] | [INFO] [stdout] 2608 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2614:1522 [INFO] [stdout] | [INFO] [stdout] 2614 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2722:1478 [INFO] [stdout] | [INFO] [stdout] 2722 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2734:1454 [INFO] [stdout] | [INFO] [stdout] 2734 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2746:1490 [INFO] [stdout] | [INFO] [stdout] 2746 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2758:1353 [INFO] [stdout] | [INFO] [stdout] 2758 | ...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-9b9d3e6ddcc0e9b9/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-9b9d3e6ddcc0e9b9/out/generated.rs:2872:1830 [INFO] [stdout] | [INFO] [stdout] 2872 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2902:1470 [INFO] [stdout] | [INFO] [stdout] 2902 | ...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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:2938:1353 [INFO] [stdout] | [INFO] [stdout] 2938 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2992:1482 [INFO] [stdout] | [INFO] [stdout] 2992 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2998:1556 [INFO] [stdout] | [INFO] [stdout] 2998 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3022:1458 [INFO] [stdout] | [INFO] [stdout] 3022 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3082:1516 [INFO] [stdout] | [INFO] [stdout] 3082 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:3088:1349 [INFO] [stdout] | [INFO] [stdout] 3088 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3202:1434 [INFO] [stdout] | [INFO] [stdout] 3202 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:3256:1832 [INFO] [stdout] | [INFO] [stdout] 3256 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3274:1707 [INFO] [stdout] | [INFO] [stdout] 3274 | ..._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-9b9d3e6ddcc0e9b9/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-9b9d3e6ddcc0e9b9/out/generated.rs:3292:1353 [INFO] [stdout] | [INFO] [stdout] 3292 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3334:1474 [INFO] [stdout] | [INFO] [stdout] 3334 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3340:1458 [INFO] [stdout] | [INFO] [stdout] 3340 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3346:1652 [INFO] [stdout] | [INFO] [stdout] 3346 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3448:1862 [INFO] [stdout] | [INFO] [stdout] 3448 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3496:1846 [INFO] [stdout] | [INFO] [stdout] 3496 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3538:1552 [INFO] [stdout] | [INFO] [stdout] 3538 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3544:1873 [INFO] [stdout] | [INFO] [stdout] 3544 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3580:1457 [INFO] [stdout] | [INFO] [stdout] 3580 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3670:1258 [INFO] [stdout] | [INFO] [stdout] 3670 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:4:4401 [INFO] [stdout] | [INFO] [stdout] 4 | ...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] = 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 VisualShaderNodeGlobalExpression` inherits `VisualShaderNodeExpression` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeglobalexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeGlobalExpression inherits methods from:\n - [VisualShaderNodeExpression](struct.VisualShaderNodeExpression.html)\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeGlobalExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGlobalExpression { } unsafe impl GodotObject for VisualShaderNodeGlobalExpression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGlobalExpression" } } impl std :: ops :: Deref for VisualShaderNodeGlobalExpression { type Target = crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGlobalExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeGlobalExpression { } impl Instanciable for VisualShaderNodeGlobalExpression { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeGlobalExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeGlobalExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeGlobalExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeGlobalExpressionMethodTable = VisualShaderNodeGlobalExpressionMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeGlobalExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeGlobalExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:10:5425 [INFO] [stdout] | [INFO] [stdout] 10 | ... : 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] 10 | # [doc = "`core class VisualScriptReturn` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptreturn.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptReturn inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptReturn { this : RawObject < Self > , } impl VisualScriptReturn { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptReturnMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn return_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . get_return_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_return_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . is_return_value_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_enable_return_value (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_enable_return_value ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_return_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_return_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptReturn { } unsafe impl GodotObject for VisualScriptReturn { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptReturn" } } impl std :: ops :: Deref for VisualScriptReturn { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptReturn { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptReturn { } impl Instanciable for VisualScriptReturn { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptReturn :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptReturnMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_return_type : * mut sys :: godot_method_bind , pub is_return_value_enabled : * mut sys :: godot_method_bind , pub set_enable_return_value : * mut sys :: godot_method_bind , pub set_return_type : * mut sys :: godot_method_bind } impl VisualScriptReturnMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptReturnMethodTable = VisualScriptReturnMethodTable { class_constructor : None , get_return_type : 0 as * mut sys :: godot_method_bind , is_return_value_enabled : 0 as * mut sys :: godot_method_bind , set_enable_return_value : 0 as * mut sys :: godot_method_bind , set_return_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptReturnMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptReturn\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_return_type = (gd_api . godot_method_bind_get_method) (class_name , "get_return_type\0" . as_ptr () as * const c_char) ; table . is_return_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_return_value_enabled\0" . as_ptr () as * const c_char) ; table . set_enable_return_value = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_return_value\0" . as_ptr () as * const c_char) ; table . set_return_type = (gd_api . godot_method_bind_get_method) (class_name , "set_return_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:16:14333 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:22:15877 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:28:41714 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:34:3637 [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 VisualScriptFunction` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptfunction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunction inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunction { this : RawObject < Self > , } impl VisualScriptFunction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunction { } unsafe impl GodotObject for VisualScriptFunction { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunction" } } impl std :: ops :: Deref for VisualScriptFunction { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunction { } impl Instanciable for VisualScriptFunction { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptFunction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptFunctionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionMethodTable = VisualScriptFunctionMethodTable { class_constructor : None , } ; &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 (|| { VisualScriptFunctionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:40:4375 [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 class VideoStreamTheora` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_videostreamtheora.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamTheora inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamTheora { this : RawObject < Self > , } impl VideoStreamTheora { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamTheoraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamTheora { } unsafe impl GodotObject for VideoStreamTheora { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamTheora" } } impl std :: ops :: Deref for VideoStreamTheora { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamTheora { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamTheora { } impl Instanciable for VideoStreamTheora { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VideoStreamTheora :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamTheoraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamTheoraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamTheoraMethodTable = VideoStreamTheoraMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VideoStreamTheoraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamTheora\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:46:5646 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:52:3486 [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 ARVRInterfaceGDNative` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrinterfacegdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterfaceGDNative inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { this : RawObject < Self > , } impl ARVRInterfaceGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRInterfaceGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterfaceGDNative { } unsafe impl GodotObject for ARVRInterfaceGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterfaceGDNative" } } impl std :: ops :: Deref for ARVRInterfaceGDNative { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterfaceGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRInterfaceGDNative { } impl Instanciable for ARVRInterfaceGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ARVRInterfaceGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRInterfaceGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceGDNativeMethodTable = ARVRInterfaceGDNativeMethodTable { class_constructor : None , } ; &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 (|| { ARVRInterfaceGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterfaceGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:58:16904 [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 Curve` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_curve.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurve inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Curve { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TangentMode (pub i64) ; impl TangentMode { pub const FREE : TangentMode = TangentMode (0i64) ; pub const LINEAR : TangentMode = TangentMode (1i64) ; pub const MODE_COUNT : TangentMode = TangentMode (2i64) ; } impl From < i64 > for TangentMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TangentMode > for i64 { # [inline] fn from (v : TangentMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Curve { pub const TANGENT_FREE : i64 = 0i64 ; pub const TANGENT_LINEAR : i64 = 1i64 ; pub const TANGENT_MODE_COUNT : i64 = 2i64 ; } impl Curve { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CurveMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point to the curve. For each side, if the `*_mode` is [constant TANGENT_LINEAR], the `*_tangent` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the `*_tangent` angle if `*_mode` is set to [constant TANGENT_FREE].\n# Default Arguments\n* `left_tangent` - `0`\n* `right_tangent` - `0`\n* `left_mode` - `0`\n* `right_mode` - `0`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , left_tangent : f64 , right_tangent : f64 , left_mode : i64 , right_mode : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_i64_vec2_f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , position , left_tangent , right_tangent , left_mode , right_mode) ; ret as _ } } # [doc = "Recomputes the baked cache of points for the curve."] # [doc = ""] # [inline] pub fn bake (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes points that are closer than `CMP_EPSILON` (0.00001) units to their neighbor on the curve."] # [doc = ""] # [inline] pub fn clean_dupes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clean_dupes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all points from the curve."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn bake_resolution (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_bake_resolution ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn max_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_max_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn min_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_min_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of points describing the curve."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the left [enum TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_mode ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [doc = "Returns the left tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_tangent ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [doc = "Returns the curve coordinates for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_position (& self , index : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , index) ; mem :: transmute (ret) } } # [doc = "Returns the right [enum TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_mode ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [doc = "Returns the right tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_tangent ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve."] # [doc = ""] # [inline] pub fn interpolate (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve using the baked cache. Bakes the curve's points if not already baked."] # [doc = ""] # [inline] pub fn interpolate_baked (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [doc = "Removes the point at `index` from the curve."] # [doc = ""] # [inline] pub fn remove_point (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn set_bake_resolution (& self , resolution : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_bake_resolution ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , resolution) ; } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn set_max_value (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_max_value ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn set_min_value (& self , min : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_min_value ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min) ; } } # [doc = "Sets the left [enum TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_left_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_mode ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [doc = "Sets the left tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_left_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_tangent ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [doc = "Sets the offset from `0.5`."] # [doc = ""] # [inline] pub fn set_point_offset (& self , index : i64 , offset : f64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_offset ; let ret = crate :: icalls :: icallptr_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , offset) ; ret as _ } } # [doc = "Sets the right [enum TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_right_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_mode ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [doc = "Sets the right tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_right_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_tangent ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [doc = "Assigns the vertical position `y` to the point at `index`."] # [doc = ""] # [inline] pub fn set_point_value (& self , index : i64 , y : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_value ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , y) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve { } unsafe impl GodotObject for Curve { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve" } } impl std :: ops :: Deref for Curve { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Curve { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Curve { } unsafe impl SubClass < crate :: generated :: object :: Object > for Curve { } impl Instanciable for Curve { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Curve :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CurveMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub bake : * mut sys :: godot_method_bind , pub clean_dupes : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_bake_resolution : * mut sys :: godot_method_bind , pub get_max_value : * mut sys :: godot_method_bind , pub get_min_value : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_left_mode : * mut sys :: godot_method_bind , pub get_point_left_tangent : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_right_mode : * mut sys :: godot_method_bind , pub get_point_right_tangent : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub interpolate_baked : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_bake_resolution : * mut sys :: godot_method_bind , pub set_max_value : * mut sys :: godot_method_bind , pub set_min_value : * mut sys :: godot_method_bind , pub set_point_left_mode : * mut sys :: godot_method_bind , pub set_point_left_tangent : * mut sys :: godot_method_bind , pub set_point_offset : * mut sys :: godot_method_bind , pub set_point_right_mode : * mut sys :: godot_method_bind , pub set_point_right_tangent : * mut sys :: godot_method_bind , pub set_point_value : * mut sys :: godot_method_bind } impl CurveMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CurveMethodTable = CurveMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , bake : 0 as * mut sys :: godot_method_bind , clean_dupes : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_bake_resolution : 0 as * mut sys :: godot_method_bind , get_max_value : 0 as * mut sys :: godot_method_bind , get_min_value : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_left_mode : 0 as * mut sys :: godot_method_bind , get_point_left_tangent : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_right_mode : 0 as * mut sys :: godot_method_bind , get_point_right_tangent : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , interpolate_baked : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_bake_resolution : 0 as * mut sys :: godot_method_bind , set_max_value : 0 as * mut sys :: godot_method_bind , set_min_value : 0 as * mut sys :: godot_method_bind , set_point_left_mode : 0 as * mut sys :: godot_method_bind , set_point_left_tangent : 0 as * mut sys :: godot_method_bind , set_point_offset : 0 as * mut sys :: godot_method_bind , set_point_right_mode : 0 as * mut sys :: godot_method_bind , set_point_right_tangent : 0 as * mut sys :: godot_method_bind , set_point_value : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CurveMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Curve\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . clean_dupes = (gd_api . godot_method_bind_get_method) (class_name , "clean_dupes\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_resolution\0" . as_ptr () as * const c_char) ; table . get_max_value = (gd_api . godot_method_bind_get_method) (class_name , "get_max_value\0" . as_ptr () as * const c_char) ; table . get_min_value = (gd_api . godot_method_bind_get_method) (class_name , "get_min_value\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_mode\0" . as_ptr () as * const c_char) ; table . get_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_tangent\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_mode\0" . as_ptr () as * const c_char) ; table . get_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_tangent\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_resolution\0" . as_ptr () as * const c_char) ; table . set_max_value = (gd_api . godot_method_bind_get_method) (class_name , "set_max_value\0" . as_ptr () as * const c_char) ; table . set_min_value = (gd_api . godot_method_bind_get_method) (class_name , "set_min_value\0" . as_ptr () as * const c_char) ; table . set_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_mode\0" . as_ptr () as * const c_char) ; table . set_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_tangent\0" . as_ptr () as * const c_char) ; table . set_point_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_point_offset\0" . as_ptr () as * const c_char) ; table . set_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_mode\0" . as_ptr () as * const c_char) ; table . set_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_tangent\0" . as_ptr () as * const c_char) ; table . set_point_value = (gd_api . godot_method_bind_get_method) (class_name , "set_point_value\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:64:25426 [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 Polygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_polygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Polygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Polygon2D { this : RawObject < Self > , } impl Polygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Polygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone with the specified `path` and `weights`."] # [doc = ""] # [inline] pub fn add_bone (& self , path : impl Into < NodePath > , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallptr_void_nodepath_f32arr (method_bind , self . this . sys () . as_ptr () , path . into () , weights) ; } } # [doc = "Removes all bones from this [Polygon2D]."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the specified bone from this [Polygon2D]."] # [doc = ""] # [inline] pub fn erase_bone (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . erase_bone ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of bones in this [Polygon2D]."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn get_bone_path (& self , index : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , index) ; NodePath :: from_sys (ret) } } # [doc = "Returns the height values of the specified bone."] # [doc = ""] # [inline] pub fn get_bone_weights (& self , index : i64) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_weights ; let ret = crate :: icalls :: icallptr_f32arr_i64 (method_bind , self . this . sys () . as_ptr () , index) ; Float32Array :: from_sys (ret) } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn internal_vertex_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_internal_vertex_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn invert (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn invert_border (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert_border ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn texture_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn texture_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn uv (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_uv ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn vertex_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_vertex_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "Sets the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn set_bone_path (& self , index : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_path ; let ret = crate :: icalls :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , index , path . into ()) ; } } # [doc = "Sets the weight values for the specified bone."] # [doc = ""] # [inline] pub fn set_bone_weights (& self , index : i64 , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_weights ; let ret = crate :: icalls :: icallptr_void_i64_f32arr (method_bind , self . this . sys () . as_ptr () , index , weights) ; } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_internal_vertex_count (& self , internal_vertex_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_internal_vertex_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , internal_vertex_count) ; } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn set_invert (& self , invert : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert) ; } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn set_invert_border (& self , invert_border : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert_border ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , invert_border) ; } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygons (& self , polygons : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygons ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , polygons) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , skeleton . into ()) ; } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn set_texture_rotation (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn set_texture_rotation_degrees (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn set_uv (& self , uv : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn set_vertex_colors (& self , vertex_colors : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_vertex_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , vertex_colors) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Polygon2D { } unsafe impl GodotObject for Polygon2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Polygon2D" } } impl QueueFree for Polygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Polygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Polygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Polygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Polygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Polygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Polygon2D { } impl Instanciable for Polygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Polygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Polygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub erase_bone : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_path : * mut sys :: godot_method_bind , pub get_bone_weights : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_internal_vertex_count : * mut sys :: godot_method_bind , pub get_invert : * mut sys :: godot_method_bind , pub get_invert_border : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygons : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_rotation : * mut sys :: godot_method_bind , pub get_texture_rotation_degrees : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_uv : * mut sys :: godot_method_bind , pub get_vertex_colors : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_bone_path : * mut sys :: godot_method_bind , pub set_bone_weights : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_internal_vertex_count : * mut sys :: godot_method_bind , pub set_invert : * mut sys :: godot_method_bind , pub set_invert_border : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_polygons : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_rotation : * mut sys :: godot_method_bind , pub set_texture_rotation_degrees : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_uv : * mut sys :: godot_method_bind , pub set_vertex_colors : * mut sys :: godot_method_bind } impl Polygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Polygon2DMethodTable = Polygon2DMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , erase_bone : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_path : 0 as * mut sys :: godot_method_bind , get_bone_weights : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_internal_vertex_count : 0 as * mut sys :: godot_method_bind , get_invert : 0 as * mut sys :: godot_method_bind , get_invert_border : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygons : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_rotation : 0 as * mut sys :: godot_method_bind , get_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_uv : 0 as * mut sys :: godot_method_bind , get_vertex_colors : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_bone_path : 0 as * mut sys :: godot_method_bind , set_bone_weights : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_internal_vertex_count : 0 as * mut sys :: godot_method_bind , set_invert : 0 as * mut sys :: godot_method_bind , set_invert_border : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_polygons : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_rotation : 0 as * mut sys :: godot_method_bind , set_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_uv : 0 as * mut sys :: godot_method_bind , set_vertex_colors : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Polygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Polygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . erase_bone = (gd_api . godot_method_bind_get_method) (class_name , "erase_bone\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_path\0" . as_ptr () as * const c_char) ; table . get_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_weights\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . get_invert = (gd_api . godot_method_bind_get_method) (class_name , "get_invert\0" . as_ptr () as * const c_char) ; table . get_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "get_invert_border\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygons = (gd_api . godot_method_bind_get_method) (class_name , "get_polygons\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation\0" . as_ptr () as * const c_char) ; table . get_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_uv\0" . as_ptr () as * const c_char) ; table . get_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_colors\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_path\0" . as_ptr () as * const c_char) ; table . set_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_weights\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "set_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . set_invert = (gd_api . godot_method_bind_get_method) (class_name , "set_invert\0" . as_ptr () as * const c_char) ; table . set_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_border\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_polygons = (gd_api . godot_method_bind_get_method) (class_name , "set_polygons\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation\0" . as_ptr () as * const c_char) ; table . set_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\0" . as_ptr () as * const c_char) ; table . set_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_colors\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:70:15251 [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 SceneState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_scenestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneState { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GenEditState (pub i64) ; impl GenEditState { pub const DISABLED : GenEditState = GenEditState (0i64) ; pub const INSTANCE : GenEditState = GenEditState (1i64) ; pub const MAIN : GenEditState = GenEditState (2i64) ; } impl From < i64 > for GenEditState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GenEditState > for i64 { # [inline] fn from (v : GenEditState) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneState { pub const GEN_EDIT_STATE_DISABLED : i64 = 0i64 ; pub const GEN_EDIT_STATE_INSTANCE : i64 = 1i64 ; pub const GEN_EDIT_STATE_MAIN : i64 = 2i64 ; } impl SceneState { # [doc = "Returns the list of bound parameters for the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_binds (& self , idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_binds ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of signal connections in the scene.\nThe `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`."] # [doc = ""] # [inline] pub fn get_connection_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the connection flags for the signal at `idx`. See [enum Object.ConnectFlags] constants."] # [doc = ""] # [inline] pub fn get_connection_flags (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_flags ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the method connected to the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_method (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_method ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_signal (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_signal ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path to the node that owns the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_source (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_source ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the path to the node that owns the method connected to the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_target (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_target ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the number of nodes in the scene.\nThe `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the list of group names associated with the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_groups (& self , idx : i64) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_groups ; let ret = crate :: icalls :: icallptr_strarr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; StringArray :: from_sys (ret) } } # [doc = "Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the `idx` argument used here and in other methods."] # [doc = ""] # [inline] pub fn get_node_index (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_index ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns a [PackedScene] for the node at `idx` (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance."] # [doc = ""] # [inline] pub fn get_node_instance (& self , idx : i64) -> Option < Ref < crate :: generated :: packed_scene :: PackedScene , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packed_scene :: PackedScene , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path to the represented scene file if the node at `idx` is an [InstancePlaceholder]."] # [doc = ""] # [inline] pub fn get_node_instance_placeholder (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance_placeholder ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path to the owner of the node at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_node_owner_path (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_owner_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the path to the node at `idx`.\nIf `for_parent` is `true`, returns the path of the `idx` node's parent instead.\n# Default Arguments\n* `for_parent` - `false`"] # [doc = ""] # [inline] pub fn get_node_path (& self , idx : i64 , for_parent : bool) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallptr_nodepath_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , for_parent) ; NodePath :: from_sys (ret) } } # [doc = "Returns the number of exported or overridden properties for the node at `idx`.\nThe `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_property_count (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_count ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the name of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_name (& self , idx : i64 , prop_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_name ; let ret = crate :: icalls :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the value of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_value (& self , idx : i64 , prop_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_value ; let ret = crate :: icalls :: icallptr_var_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the type of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_type (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_type ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the node at `idx` is an [InstancePlaceholder]."] # [doc = ""] # [inline] pub fn is_node_instance_placeholder (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . is_node_instance_placeholder ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneState { } unsafe impl GodotObject for SceneState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneState" } } impl std :: ops :: Deref for SceneState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SceneState { } unsafe impl SubClass < crate :: generated :: object :: Object > for SceneState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_connection_binds : * mut sys :: godot_method_bind , pub get_connection_count : * mut sys :: godot_method_bind , pub get_connection_flags : * mut sys :: godot_method_bind , pub get_connection_method : * mut sys :: godot_method_bind , pub get_connection_signal : * mut sys :: godot_method_bind , pub get_connection_source : * mut sys :: godot_method_bind , pub get_connection_target : * mut sys :: godot_method_bind , pub get_node_count : * mut sys :: godot_method_bind , pub get_node_groups : * mut sys :: godot_method_bind , pub get_node_index : * mut sys :: godot_method_bind , pub get_node_instance : * mut sys :: godot_method_bind , pub get_node_instance_placeholder : * mut sys :: godot_method_bind , pub get_node_name : * mut sys :: godot_method_bind , pub get_node_owner_path : * mut sys :: godot_method_bind , pub get_node_path : * mut sys :: godot_method_bind , pub get_node_property_count : * mut sys :: godot_method_bind , pub get_node_property_name : * mut sys :: godot_method_bind , pub get_node_property_value : * mut sys :: godot_method_bind , pub get_node_type : * mut sys :: godot_method_bind , pub is_node_instance_placeholder : * mut sys :: godot_method_bind } impl SceneStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneStateMethodTable = SceneStateMethodTable { class_constructor : None , get_connection_binds : 0 as * mut sys :: godot_method_bind , get_connection_count : 0 as * mut sys :: godot_method_bind , get_connection_flags : 0 as * mut sys :: godot_method_bind , get_connection_method : 0 as * mut sys :: godot_method_bind , get_connection_signal : 0 as * mut sys :: godot_method_bind , get_connection_source : 0 as * mut sys :: godot_method_bind , get_connection_target : 0 as * mut sys :: godot_method_bind , get_node_count : 0 as * mut sys :: godot_method_bind , get_node_groups : 0 as * mut sys :: godot_method_bind , get_node_index : 0 as * mut sys :: godot_method_bind , get_node_instance : 0 as * mut sys :: godot_method_bind , get_node_instance_placeholder : 0 as * mut sys :: godot_method_bind , get_node_name : 0 as * mut sys :: godot_method_bind , get_node_owner_path : 0 as * mut sys :: godot_method_bind , get_node_path : 0 as * mut sys :: godot_method_bind , get_node_property_count : 0 as * mut sys :: godot_method_bind , get_node_property_name : 0 as * mut sys :: godot_method_bind , get_node_property_value : 0 as * mut sys :: godot_method_bind , get_node_type : 0 as * mut sys :: godot_method_bind , is_node_instance_placeholder : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SceneStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_connection_binds = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_binds\0" . as_ptr () as * const c_char) ; table . get_connection_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_count\0" . as_ptr () as * const c_char) ; table . get_connection_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_flags\0" . as_ptr () as * const c_char) ; table . get_connection_method = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_method\0" . as_ptr () as * const c_char) ; table . get_connection_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_signal\0" . as_ptr () as * const c_char) ; table . get_connection_source = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_source\0" . as_ptr () as * const c_char) ; table . get_connection_target = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_target\0" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\0" . as_ptr () as * const c_char) ; table . get_node_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_node_groups\0" . as_ptr () as * const c_char) ; table . get_node_index = (gd_api . godot_method_bind_get_method) (class_name , "get_node_index\0" . as_ptr () as * const c_char) ; table . get_node_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance\0" . as_ptr () as * const c_char) ; table . get_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance_placeholder\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_owner_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_owner_path\0" . as_ptr () as * const c_char) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . get_node_property_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_count\0" . as_ptr () as * const c_char) ; table . get_node_property_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_name\0" . as_ptr () as * const c_char) ; table . get_node_property_value = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_value\0" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\0" . as_ptr () as * const c_char) ; table . is_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "is_node_instance_placeholder\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:76:3637 [INFO] [stdout] | [INFO] [stdout] 76 | ...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] 76 | # [doc = "`core class VisualScriptIndexGet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptindexget.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIndexGet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIndexGet { this : RawObject < Self > , } impl VisualScriptIndexGet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIndexGetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIndexGet { } unsafe impl GodotObject for VisualScriptIndexGet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexGet" } } impl std :: ops :: Deref for VisualScriptIndexGet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIndexGet { } impl Instanciable for VisualScriptIndexGet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptIndexGet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIndexGetMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIndexGetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIndexGetMethodTable = VisualScriptIndexGetMethodTable { class_constructor : None , } ; &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 (|| { VisualScriptIndexGetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIndexGet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:82:5412 [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 VisualScriptLocalVar` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptlocalvar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVar inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVar { this : RawObject < Self > , } impl VisualScriptLocalVar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVar { } unsafe impl GodotObject for VisualScriptLocalVar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVar" } } impl std :: ops :: Deref for VisualScriptLocalVar { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVar { } impl Instanciable for VisualScriptLocalVar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptLocalVar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarMethodTable = VisualScriptLocalVarMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptLocalVarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:88:4707 [INFO] [stdout] | [INFO] [stdout] 88 | ...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] 88 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:94:5952 [INFO] [stdout] | [INFO] [stdout] 94 | ... : 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] 94 | # [doc = "`core class AudioStreamMP3` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreammp3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMP3 inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMP3 { this : RawObject < Self > , } impl AudioStreamMP3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMP3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_loop_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop_offset (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop_offset ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMP3 { } unsafe impl GodotObject for AudioStreamMP3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMP3" } } impl std :: ops :: Deref for AudioStreamMP3 { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMP3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMP3 { } impl Instanciable for AudioStreamMP3 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamMP3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMP3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_loop_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_loop_offset : * mut sys :: godot_method_bind } impl AudioStreamMP3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMP3MethodTable = AudioStreamMP3MethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_loop_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_loop_offset : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AudioStreamMP3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMP3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:100:4015 [INFO] [stdout] | [INFO] [stdout] 100 | ...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] 100 | # [doc = "`core class VisualShaderNodeVectorScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorscalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorScalarSmoothStep { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarSmoothStep { } impl Instanciable for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarSmoothStepMethodTable = VisualShaderNodeVectorScalarSmoothStepMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeVectorScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:106:9748 [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 WebRTCDataChannel` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webrtcdatachannel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCDataChannel inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCDataChannel { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ChannelState (pub i64) ; impl ChannelState { pub const CONNECTING : ChannelState = ChannelState (0i64) ; pub const OPEN : ChannelState = ChannelState (1i64) ; pub const CLOSING : ChannelState = ChannelState (2i64) ; pub const CLOSED : ChannelState = ChannelState (3i64) ; } impl From < i64 > for ChannelState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ChannelState > for i64 { # [inline] fn from (v : ChannelState) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct WriteMode (pub i64) ; impl WriteMode { pub const TEXT : WriteMode = WriteMode (0i64) ; pub const BINARY : WriteMode = WriteMode (1i64) ; } impl From < i64 > for WriteMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < WriteMode > for i64 { # [inline] fn from (v : WriteMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCDataChannel { pub const STATE_CLOSED : i64 = 3i64 ; pub const STATE_CLOSING : i64 = 2i64 ; pub const STATE_CONNECTING : i64 = 0i64 ; pub const STATE_OPEN : i64 = 1i64 ; pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; } impl WebRTCDataChannel { # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_packet_life_time (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_packet_life_time ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_retransmits (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_retransmits ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_protocol (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_protocol ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_ready_state (& self) -> crate :: generated :: web_rtc_data_channel :: ChannelState { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_ready_state ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: ChannelState (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn write_mode (& self) -> crate :: generated :: web_rtc_data_channel :: WriteMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_write_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: WriteMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_negotiated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_negotiated ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_ordered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_ordered ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_write_mode (& self , write_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . set_write_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , write_mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn was_string_packet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . was_string_packet ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannel { } unsafe impl GodotObject for WebRTCDataChannel { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannel" } } impl std :: ops :: Deref for WebRTCDataChannel { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCDataChannel { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCDataChannelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub get_id : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_max_packet_life_time : * mut sys :: godot_method_bind , pub get_max_retransmits : * mut sys :: godot_method_bind , pub get_protocol : * mut sys :: godot_method_bind , pub get_ready_state : * mut sys :: godot_method_bind , pub get_write_mode : * mut sys :: godot_method_bind , pub is_negotiated : * mut sys :: godot_method_bind , pub is_ordered : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_write_mode : * mut sys :: godot_method_bind , pub was_string_packet : * mut sys :: godot_method_bind } impl WebRTCDataChannelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCDataChannelMethodTable = WebRTCDataChannelMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , get_id : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_max_packet_life_time : 0 as * mut sys :: godot_method_bind , get_max_retransmits : 0 as * mut sys :: godot_method_bind , get_protocol : 0 as * mut sys :: godot_method_bind , get_ready_state : 0 as * mut sys :: godot_method_bind , get_write_mode : 0 as * mut sys :: godot_method_bind , is_negotiated : 0 as * mut sys :: godot_method_bind , is_ordered : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_write_mode : 0 as * mut sys :: godot_method_bind , was_string_packet : 0 as * mut sys :: godot_method_bind } ; &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 (|| { WebRTCDataChannelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCDataChannel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_max_packet_life_time = (gd_api . godot_method_bind_get_method) (class_name , "get_max_packet_life_time\0" . as_ptr () as * const c_char) ; table . get_max_retransmits = (gd_api . godot_method_bind_get_method) (class_name , "get_max_retransmits\0" . as_ptr () as * const c_char) ; table . get_protocol = (gd_api . godot_method_bind_get_method) (class_name , "get_protocol\0" . as_ptr () as * const c_char) ; table . get_ready_state = (gd_api . godot_method_bind_get_method) (class_name , "get_ready_state\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_negotiated = (gd_api . godot_method_bind_get_method) (class_name , "is_negotiated\0" . as_ptr () as * const c_char) ; table . is_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_ordered\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:112:7780 [INFO] [stdout] | [INFO] [stdout] 112 | ... : 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] 112 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:118:7922 [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 NoiseTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_noisetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNoiseTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NoiseTexture { this : RawObject < Self > , } impl NoiseTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NoiseTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn bump_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_bump_strength ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn noise (& self) -> Option < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_noise ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn seamless (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_seamless ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_normalmap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . is_normalmap ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_as_normalmap (& self , as_normalmap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_as_normalmap ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , as_normalmap) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bump_strength (& self , bump_strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_bump_strength ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bump_strength) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_noise (& self , noise : impl AsArg < crate :: generated :: open_simplex_noise :: OpenSimplexNoise >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_noise ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , noise . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_seamless (& self , seamless : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_seamless ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , seamless) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NoiseTexture { } unsafe impl GodotObject for NoiseTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NoiseTexture" } } impl std :: ops :: Deref for NoiseTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NoiseTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for NoiseTexture { } impl Instanciable for NoiseTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NoiseTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NoiseTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bump_strength : * mut sys :: godot_method_bind , pub get_noise : * mut sys :: godot_method_bind , pub get_seamless : * mut sys :: godot_method_bind , pub is_normalmap : * mut sys :: godot_method_bind , pub set_as_normalmap : * mut sys :: godot_method_bind , pub set_bump_strength : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_noise : * mut sys :: godot_method_bind , pub set_seamless : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl NoiseTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NoiseTextureMethodTable = NoiseTextureMethodTable { class_constructor : None , get_bump_strength : 0 as * mut sys :: godot_method_bind , get_noise : 0 as * mut sys :: godot_method_bind , get_seamless : 0 as * mut sys :: godot_method_bind , is_normalmap : 0 as * mut sys :: godot_method_bind , set_as_normalmap : 0 as * mut sys :: godot_method_bind , set_bump_strength : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_noise : 0 as * mut sys :: godot_method_bind , set_seamless : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; &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 (|| { NoiseTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NoiseTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_bump_strength\0" . as_ptr () as * const c_char) ; table . get_noise = (gd_api . godot_method_bind_get_method) (class_name , "get_noise\0" . as_ptr () as * const c_char) ; table . get_seamless = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless\0" . as_ptr () as * const c_char) ; table . is_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "is_normalmap\0" . as_ptr () as * const c_char) ; table . set_as_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_as_normalmap\0" . as_ptr () as * const c_char) ; table . set_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_bump_strength\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_noise = (gd_api . godot_method_bind_get_method) (class_name , "set_noise\0" . as_ptr () as * const c_char) ; table . set_seamless = (gd_api . godot_method_bind_get_method) (class_name , "set_seamless\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:124:13732 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:130:5633 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:136:13645 [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 = "`core class UndoRedo` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_undoredo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`UndoRedo` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nUndoRedo inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UndoRedo { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MergeMode (pub i64) ; impl MergeMode { pub const DISABLE : MergeMode = MergeMode (0i64) ; pub const ENDS : MergeMode = MergeMode (1i64) ; pub const ALL : MergeMode = MergeMode (2i64) ; } impl From < i64 > for MergeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MergeMode > for i64 { # [inline] fn from (v : MergeMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UndoRedo { pub const MERGE_ALL : i64 = 2i64 ; pub const MERGE_DISABLE : i64 = 0i64 ; pub const MERGE_ENDS : i64 = 1i64 ; } impl UndoRedo { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UndoRedoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Register a method that will be called when the action is committed."] # [doc = ""] # [inline] pub fn add_do_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"do\"."] # [doc = ""] # [inline] pub fn add_do_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"do\" that will be erased if the \"do\" history is lost. This is useful mostly for new nodes created for the \"do\" call. Do not use for resources."] # [doc = ""] # [inline] pub fn add_do_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Register a method that will be called when the action is undone."] # [doc = ""] # [inline] pub fn add_undo_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"undo\"."] # [doc = ""] # [inline] pub fn add_undo_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"undo\" that will be erased if the \"undo\" history is lost. This is useful mostly for nodes removed with the \"do\" call (not the \"undo\" call!)."] # [doc = ""] # [inline] pub fn add_undo_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Clear the undo/redo history and associated references.\nPassing `false` to `increase_version` will prevent the version number to be increased from this.\n# Default Arguments\n* `increase_version` - `true`"] # [doc = ""] # [inline] pub fn clear_history (& self , increase_version : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . clear_history ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , increase_version) ; } } # [doc = "Commit the action. All \"do\" methods/properties are called/set when this function is called."] # [doc = ""] # [inline] pub fn commit_action (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . commit_action ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].\nThe way actions are merged is dictated by the `merge_mode` argument. See [enum MergeMode] for details.\n# Default Arguments\n* `merge_mode` - `0`"] # [doc = ""] # [inline] pub fn create_action (& self , name : impl Into < GodotString > , merge_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . create_action ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , merge_mode) ; } } # [doc = "Gets the name of the current action."] # [doc = ""] # [inline] pub fn get_current_action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_current_action_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically.\nThis is useful mostly to check if something changed from a saved version."] # [doc = ""] # [inline] pub fn get_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_version ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if a \"redo\" action is available."] # [doc = ""] # [inline] pub fn has_redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if an \"undo\" action is available."] # [doc = ""] # [inline] pub fn has_undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [UndoRedo] is currently committing the action, i.e. running its \"do\" method or property change (see [method commit_action])."] # [doc = ""] # [inline] pub fn is_commiting_action (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . is_commiting_action ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Redo the last action."] # [doc = ""] # [inline] pub fn redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Undo the last action."] # [doc = ""] # [inline] pub fn undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for UndoRedo { } unsafe impl GodotObject for UndoRedo { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "UndoRedo" } } impl std :: ops :: Deref for UndoRedo { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UndoRedo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for UndoRedo { } impl Instanciable for UndoRedo { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UndoRedo :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UndoRedoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_do_method : * mut sys :: godot_method_bind , pub add_do_property : * mut sys :: godot_method_bind , pub add_do_reference : * mut sys :: godot_method_bind , pub add_undo_method : * mut sys :: godot_method_bind , pub add_undo_property : * mut sys :: godot_method_bind , pub add_undo_reference : * mut sys :: godot_method_bind , pub clear_history : * mut sys :: godot_method_bind , pub commit_action : * mut sys :: godot_method_bind , pub create_action : * mut sys :: godot_method_bind , pub get_current_action_name : * mut sys :: godot_method_bind , pub get_version : * mut sys :: godot_method_bind , pub has_redo : * mut sys :: godot_method_bind , pub has_undo : * mut sys :: godot_method_bind , pub is_commiting_action : * mut sys :: godot_method_bind , pub redo : * mut sys :: godot_method_bind , pub undo : * mut sys :: godot_method_bind } impl UndoRedoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UndoRedoMethodTable = UndoRedoMethodTable { class_constructor : None , add_do_method : 0 as * mut sys :: godot_method_bind , add_do_property : 0 as * mut sys :: godot_method_bind , add_do_reference : 0 as * mut sys :: godot_method_bind , add_undo_method : 0 as * mut sys :: godot_method_bind , add_undo_property : 0 as * mut sys :: godot_method_bind , add_undo_reference : 0 as * mut sys :: godot_method_bind , clear_history : 0 as * mut sys :: godot_method_bind , commit_action : 0 as * mut sys :: godot_method_bind , create_action : 0 as * mut sys :: godot_method_bind , get_current_action_name : 0 as * mut sys :: godot_method_bind , get_version : 0 as * mut sys :: godot_method_bind , has_redo : 0 as * mut sys :: godot_method_bind , has_undo : 0 as * mut sys :: godot_method_bind , is_commiting_action : 0 as * mut sys :: godot_method_bind , redo : 0 as * mut sys :: godot_method_bind , undo : 0 as * mut sys :: godot_method_bind } ; &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 (|| { UndoRedoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UndoRedo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_do_method = (gd_api . godot_method_bind_get_method) (class_name , "add_do_method\0" . as_ptr () as * const c_char) ; table . add_do_property = (gd_api . godot_method_bind_get_method) (class_name , "add_do_property\0" . as_ptr () as * const c_char) ; table . add_do_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_do_reference\0" . as_ptr () as * const c_char) ; table . add_undo_method = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_method\0" . as_ptr () as * const c_char) ; table . add_undo_property = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_property\0" . as_ptr () as * const c_char) ; table . add_undo_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_reference\0" . as_ptr () as * const c_char) ; table . clear_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_history\0" . as_ptr () as * const c_char) ; table . commit_action = (gd_api . godot_method_bind_get_method) (class_name , "commit_action\0" . as_ptr () as * const c_char) ; table . create_action = (gd_api . godot_method_bind_get_method) (class_name , "create_action\0" . as_ptr () as * const c_char) ; table . get_current_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_current_action_name\0" . as_ptr () as * const c_char) ; table . get_version = (gd_api . godot_method_bind_get_method) (class_name , "get_version\0" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\0" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\0" . as_ptr () as * const c_char) ; table . is_commiting_action = (gd_api . godot_method_bind_get_method) (class_name , "is_commiting_action\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:142:4670 [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 VisualScriptGlobalConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptglobalconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptGlobalConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptGlobalConstant { this : RawObject < Self > , } impl VisualScriptGlobalConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptGlobalConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn global_constant (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . get_global_constant ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_global_constant (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . set_global_constant ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptGlobalConstant { } unsafe impl GodotObject for VisualScriptGlobalConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptGlobalConstant" } } impl std :: ops :: Deref for VisualScriptGlobalConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptGlobalConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptGlobalConstant { } impl Instanciable for VisualScriptGlobalConstant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptGlobalConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptGlobalConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_global_constant : * mut sys :: godot_method_bind , pub set_global_constant : * mut sys :: godot_method_bind } impl VisualScriptGlobalConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptGlobalConstantMethodTable = VisualScriptGlobalConstantMethodTable { class_constructor : None , get_global_constant : 0 as * mut sys :: godot_method_bind , set_global_constant : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptGlobalConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptGlobalConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_global_constant\0" . as_ptr () as * const c_char) ; table . set_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_global_constant\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:148:9259 [INFO] [stdout] | [INFO] [stdout] 148 | ... : 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] 148 | # [doc = "`core class CSGSphere` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgsphere.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGSphere` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGSphere inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGSphere { this : RawObject < Self > , } impl CSGSphere { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGSphereMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radial_segments (& self , radial_segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radial_segments) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGSphere { } unsafe impl GodotObject for CSGSphere { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGSphere" } } impl QueueFree for CSGSphere { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGSphere { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGSphere { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGSphere { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGSphere { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGSphere { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGSphere { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGSphere { } impl Instanciable for CSGSphere { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGSphere :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGSphereMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_material : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGSphereMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGSphereMethodTable = CSGSphereMethodTable { class_constructor : None , get_material : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CSGSphereMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGSphere\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:154:4705 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:160:4189 [INFO] [stdout] | [INFO] [stdout] 160 | ...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] 160 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:166:6546 [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 NavigationMeshInstance` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_navigationmeshinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`NavigationMeshInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationMeshInstance inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMeshInstance { this : RawObject < Self > , } impl NavigationMeshInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMeshInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn navigation_mesh (& self) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_navigation_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_navigation_mesh (& self , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_navigation_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , navmesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMeshInstance { } unsafe impl GodotObject for NavigationMeshInstance { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationMeshInstance" } } impl QueueFree for NavigationMeshInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NavigationMeshInstance { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationMeshInstance { } impl Instanciable for NavigationMeshInstance { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NavigationMeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_navigation_mesh : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_navigation_mesh : * mut sys :: godot_method_bind } impl NavigationMeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshInstanceMethodTable = NavigationMeshInstanceMethodTable { class_constructor : None , get_navigation_mesh : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_navigation_mesh : 0 as * mut sys :: godot_method_bind } ; &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 (|| { NavigationMeshInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMeshInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_mesh\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_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_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-9b9d3e6ddcc0e9b9/out/generated.rs:172:4580 [INFO] [stdout] | [INFO] [stdout] 172 | ...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] 172 | # [doc = "`core class VScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { this : RawObject < Self > , } impl VScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VScrollBar { } unsafe impl GodotObject for VScrollBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VScrollBar" } } impl QueueFree for VScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for VScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for VScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for VScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for VScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VScrollBar { } impl Instanciable for VScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VScrollBarMethodTable = VScrollBarMethodTable { class_constructor : None , } ; &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 (|| { VScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:178:5999 [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 AudioStreamGeneratorPlayback` inherits `AudioStreamPlaybackResampled` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamgeneratorplayback.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamGeneratorPlayback inherits methods from:\n - [AudioStreamPlaybackResampled](struct.AudioStreamPlaybackResampled.html)\n - [AudioStreamPlayback](struct.AudioStreamPlayback.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamGeneratorPlayback { this : RawObject < Self > , } impl AudioStreamGeneratorPlayback { # [doc = ""] # [doc = ""] # [inline] pub fn can_push_buffer (& self , amount : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . can_push_buffer ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_buffer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . clear_buffer ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_frames_available (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_frames_available ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skips (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_skips ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn push_buffer (& self , frames : Vector2Array) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_buffer ; let ret = crate :: icalls :: icallptr_bool_vec2arr (method_bind , self . this . sys () . as_ptr () , frames) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn push_frame (& self , frame : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_frame ; let ret = crate :: icalls :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , frame) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGeneratorPlayback { } unsafe impl GodotObject for AudioStreamGeneratorPlayback { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGeneratorPlayback" } } impl std :: ops :: Deref for AudioStreamGeneratorPlayback { type Target = crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGeneratorPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: audio_stream_playback :: AudioStreamPlayback > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamGeneratorPlayback { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamGeneratorPlaybackMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_push_buffer : * mut sys :: godot_method_bind , pub clear_buffer : * mut sys :: godot_method_bind , pub get_frames_available : * mut sys :: godot_method_bind , pub get_skips : * mut sys :: godot_method_bind , pub push_buffer : * mut sys :: godot_method_bind , pub push_frame : * mut sys :: godot_method_bind } impl AudioStreamGeneratorPlaybackMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamGeneratorPlaybackMethodTable = AudioStreamGeneratorPlaybackMethodTable { class_constructor : None , can_push_buffer : 0 as * mut sys :: godot_method_bind , clear_buffer : 0 as * mut sys :: godot_method_bind , get_frames_available : 0 as * mut sys :: godot_method_bind , get_skips : 0 as * mut sys :: godot_method_bind , push_buffer : 0 as * mut sys :: godot_method_bind , push_frame : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AudioStreamGeneratorPlaybackMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamGeneratorPlayback\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "can_push_buffer\0" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\0" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\0" . as_ptr () as * const c_char) ; table . get_skips = (gd_api . godot_method_bind_get_method) (class_name , "get_skips\0" . as_ptr () as * const c_char) ; table . push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "push_buffer\0" . as_ptr () as * const c_char) ; table . push_frame = (gd_api . godot_method_bind_get_method) (class_name , "push_frame\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:184:9260 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:196:7950 [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 InputEventMouseButton` inherits `InputEventMouse` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventmousebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouseButton inherits methods from:\n - [InputEventMouse](struct.InputEventMouse.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouseButton { this : RawObject < Self > , } impl InputEventMouseButton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMouseButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn button_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_button_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn is_doubleclick (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . is_doubleclick ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn set_button_index (& self , button_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_button_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn set_doubleclick (& self , doubleclick : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_doubleclick ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , doubleclick) ; } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn set_factor (& self , factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_factor ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , factor) ; } } # [doc = "If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseButton { } unsafe impl GodotObject for InputEventMouseButton { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseButton" } } impl std :: ops :: Deref for InputEventMouseButton { type Target = crate :: generated :: input_event_mouse :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_mouse :: InputEventMouse > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouseButton { } impl Instanciable for InputEventMouseButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventMouseButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_index : * mut sys :: godot_method_bind , pub get_factor : * mut sys :: godot_method_bind , pub is_doubleclick : * mut sys :: godot_method_bind , pub set_button_index : * mut sys :: godot_method_bind , pub set_doubleclick : * mut sys :: godot_method_bind , pub set_factor : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventMouseButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseButtonMethodTable = InputEventMouseButtonMethodTable { class_constructor : None , get_button_index : 0 as * mut sys :: godot_method_bind , get_factor : 0 as * mut sys :: godot_method_bind , is_doubleclick : 0 as * mut sys :: godot_method_bind , set_button_index : 0 as * mut sys :: godot_method_bind , set_doubleclick : 0 as * mut sys :: godot_method_bind , set_factor : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputEventMouseButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouseButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\0" . as_ptr () as * const c_char) ; table . is_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "is_doubleclick\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "set_doubleclick\0" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:202:8021 [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 InputEventKey` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventkey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventKey inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventKey { this : RawObject < Self > , } impl InputEventKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn scancode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the scancode combined with modifier keys such as `Shift` or `Alt`. See also [InputEventWithModifiers].\nTo get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_scancode_with_modifiers())` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn get_scancode_with_modifiers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode_with_modifiers ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn unicode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_unicode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the key was already pressed before this event. It means the user is holding the key down."] # [doc = ""] # [inline] pub fn set_echo (& self , echo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_echo ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , echo) ; } } # [doc = "If `true`, the key's state is pressed. If `false`, the key's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn set_scancode (& self , scancode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_scancode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn set_unicode (& self , unicode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_unicode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , unicode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventKey { } unsafe impl GodotObject for InputEventKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventKey" } } impl std :: ops :: Deref for InputEventKey { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventKey { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventKey { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventKey { } impl Instanciable for InputEventKey { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_scancode : * mut sys :: godot_method_bind , pub get_scancode_with_modifiers : * mut sys :: godot_method_bind , pub get_unicode : * mut sys :: godot_method_bind , pub set_echo : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_scancode : * mut sys :: godot_method_bind , pub set_unicode : * mut sys :: godot_method_bind } impl InputEventKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventKeyMethodTable = InputEventKeyMethodTable { class_constructor : None , get_scancode : 0 as * mut sys :: godot_method_bind , get_scancode_with_modifiers : 0 as * mut sys :: godot_method_bind , get_unicode : 0 as * mut sys :: godot_method_bind , set_echo : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_scancode : 0 as * mut sys :: godot_method_bind , set_unicode : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputEventKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode\0" . as_ptr () as * const c_char) ; table . get_scancode_with_modifiers = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_with_modifiers\0" . as_ptr () as * const c_char) ; table . get_unicode = (gd_api . godot_method_bind_get_method) (class_name , "get_unicode\0" . as_ptr () as * const c_char) ; table . set_echo = (gd_api . godot_method_bind_get_method) (class_name , "set_echo\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_scancode\0" . as_ptr () as * const c_char) ; table . set_unicode = (gd_api . godot_method_bind_get_method) (class_name , "set_unicode\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:214:3398 [INFO] [stdout] | [INFO] [stdout] 214 | ...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] 214 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:220:12102 [INFO] [stdout] | [INFO] [stdout] 220 | ... : 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] 220 | # [doc = "`core class UPNPDevice` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_upnpdevice.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNPDevice inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNPDevice { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IgdStatus (pub i64) ; impl IgdStatus { pub const OK : IgdStatus = IgdStatus (0i64) ; pub const HTTP_ERROR : IgdStatus = IgdStatus (1i64) ; pub const HTTP_EMPTY : IgdStatus = IgdStatus (2i64) ; pub const NO_URLS : IgdStatus = IgdStatus (3i64) ; pub const NO_IGD : IgdStatus = IgdStatus (4i64) ; pub const DISCONNECTED : IgdStatus = IgdStatus (5i64) ; pub const UNKNOWN_DEVICE : IgdStatus = IgdStatus (6i64) ; pub const INVALID_CONTROL : IgdStatus = IgdStatus (7i64) ; pub const MALLOC_ERROR : IgdStatus = IgdStatus (8i64) ; pub const UNKNOWN_ERROR : IgdStatus = IgdStatus (9i64) ; } impl From < i64 > for IgdStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IgdStatus > for i64 { # [inline] fn from (v : IgdStatus) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNPDevice { pub const IGD_STATUS_DISCONNECTED : i64 = 5i64 ; pub const IGD_STATUS_HTTP_EMPTY : i64 = 2i64 ; pub const IGD_STATUS_HTTP_ERROR : i64 = 1i64 ; pub const IGD_STATUS_INVALID_CONTROL : i64 = 7i64 ; pub const IGD_STATUS_MALLOC_ERROR : i64 = 8i64 ; pub const IGD_STATUS_NO_IGD : i64 = 4i64 ; pub const IGD_STATUS_NO_URLS : i64 = 3i64 ; pub const IGD_STATUS_OK : i64 = 0i64 ; pub const IGD_STATUS_UNKNOWN_DEVICE : i64 = 6i64 ; pub const IGD_STATUS_UNKNOWN_ERROR : i64 = 9i64 ; } impl UPNPDevice { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPDeviceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn description_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_description_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_control_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_control_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_our_addr (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_our_addr ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_status (& self) -> crate :: generated :: upnp_device :: IgdStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: upnp_device :: IgdStatus (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid_gateway (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . is_valid_gateway ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_description_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_control_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_control_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_our_addr (& self , addr : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_our_addr ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , addr . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_status (& self , status : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_status ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , status) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNPDevice { } unsafe impl GodotObject for UPNPDevice { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNPDevice" } } impl std :: ops :: Deref for UPNPDevice { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNPDevice { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNPDevice { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNPDevice { } impl Instanciable for UPNPDevice { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UPNPDevice :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPDeviceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_port_mapping : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub get_description_url : * mut sys :: godot_method_bind , pub get_igd_control_url : * mut sys :: godot_method_bind , pub get_igd_our_addr : * mut sys :: godot_method_bind , pub get_igd_service_type : * mut sys :: godot_method_bind , pub get_igd_status : * mut sys :: godot_method_bind , pub get_service_type : * mut sys :: godot_method_bind , pub is_valid_gateway : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub set_description_url : * mut sys :: godot_method_bind , pub set_igd_control_url : * mut sys :: godot_method_bind , pub set_igd_our_addr : * mut sys :: godot_method_bind , pub set_igd_service_type : * mut sys :: godot_method_bind , pub set_igd_status : * mut sys :: godot_method_bind , pub set_service_type : * mut sys :: godot_method_bind } impl UPNPDeviceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPDeviceMethodTable = UPNPDeviceMethodTable { class_constructor : None , add_port_mapping : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , get_description_url : 0 as * mut sys :: godot_method_bind , get_igd_control_url : 0 as * mut sys :: godot_method_bind , get_igd_our_addr : 0 as * mut sys :: godot_method_bind , get_igd_service_type : 0 as * mut sys :: godot_method_bind , get_igd_status : 0 as * mut sys :: godot_method_bind , get_service_type : 0 as * mut sys :: godot_method_bind , is_valid_gateway : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , set_description_url : 0 as * mut sys :: godot_method_bind , set_igd_control_url : 0 as * mut sys :: godot_method_bind , set_igd_our_addr : 0 as * mut sys :: godot_method_bind , set_igd_service_type : 0 as * mut sys :: godot_method_bind , set_igd_status : 0 as * mut sys :: godot_method_bind , set_service_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { UPNPDeviceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNPDevice\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . get_description_url = (gd_api . godot_method_bind_get_method) (class_name , "get_description_url\0" . as_ptr () as * const c_char) ; table . get_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_control_url\0" . as_ptr () as * const c_char) ; table . get_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_our_addr\0" . as_ptr () as * const c_char) ; table . get_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_service_type\0" . as_ptr () as * const c_char) ; table . get_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_status\0" . as_ptr () as * const c_char) ; table . get_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_service_type\0" . as_ptr () as * const c_char) ; table . is_valid_gateway = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_gateway\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . set_description_url = (gd_api . godot_method_bind_get_method) (class_name , "set_description_url\0" . as_ptr () as * const c_char) ; table . set_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_control_url\0" . as_ptr () as * const c_char) ; table . set_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_our_addr\0" . as_ptr () as * const c_char) ; table . set_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_service_type\0" . as_ptr () as * const c_char) ; table . set_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_status\0" . as_ptr () as * const c_char) ; table . set_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_service_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:226:4589 [INFO] [stdout] | [INFO] [stdout] 226 | ...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] 226 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:232:11175 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:238:9433 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:244:4114 [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 = "`tools singleton class VisualScriptEditor` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualScriptEditor inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEditor { this : RawObject < Self > , } impl VisualScriptEditor { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualScriptEditor\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString > , script : impl AsArg < crate :: generated :: script :: Script >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . add_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , category . into () , script . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . remove_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , category . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEditor { } unsafe impl GodotObject for VisualScriptEditor { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualScriptEditor" } } impl std :: ops :: Deref for VisualScriptEditor { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEditor { } unsafe impl Send for VisualScriptEditor { } unsafe impl Sync for VisualScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_node : * mut sys :: godot_method_bind , pub remove_custom_node : * mut sys :: godot_method_bind } impl VisualScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEditorMethodTable = VisualScriptEditorMethodTable { class_constructor : None , add_custom_node : 0 as * mut sys :: godot_method_bind , remove_custom_node : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_VisualScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_node\0" . as_ptr () as * const c_char) ; table . remove_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_node\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:250:21646 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:256:5442 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:262:3700 [INFO] [stdout] | [INFO] [stdout] 262 | ...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] 262 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:268:6291 [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 VisibilityEnabler` inherits `VisibilityNotifier` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visibilityenabler.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VisibilityEnabler` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityEnabler inherits methods from:\n - [VisibilityNotifier](struct.VisibilityNotifier.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityEnabler { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Enabler (pub i64) ; impl Enabler { pub const PAUSE_ANIMATIONS : Enabler = Enabler (0i64) ; pub const FREEZE_BODIES : Enabler = Enabler (1i64) ; pub const MAX : Enabler = Enabler (2i64) ; } impl From < i64 > for Enabler { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Enabler > for i64 { # [inline] fn from (v : Enabler) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler { pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_MAX : i64 = 2i64 ; pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; } impl VisibilityEnabler { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityEnablerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, [AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn is_enabler_enabled (& self , enabler : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , enabler) ; ret as _ } } # [doc = "If `true`, [AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn set_enabler (& self , enabler : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , enabler , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler { } unsafe impl GodotObject for VisibilityEnabler { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityEnabler" } } impl QueueFree for VisibilityEnabler { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityEnabler { type Target = crate :: generated :: visibility_notifier :: VisibilityNotifier ; # [inline] fn deref (& self) -> & crate :: generated :: visibility_notifier :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visibility_notifier :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visibility_notifier :: VisibilityNotifier > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityEnabler { } impl Instanciable for VisibilityEnabler { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisibilityEnabler :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityEnablerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_enabler_enabled : * mut sys :: godot_method_bind , pub set_enabler : * mut sys :: godot_method_bind } impl VisibilityEnablerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityEnablerMethodTable = VisibilityEnablerMethodTable { class_constructor : None , is_enabler_enabled : 0 as * mut sys :: godot_method_bind , set_enabler : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisibilityEnablerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityEnabler\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_enabler_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabler_enabled\0" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:274:3826 [INFO] [stdout] | [INFO] [stdout] 274 | ...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] 274 | # [doc = "`core class VisualShaderNodeVectorCompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorcompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorCompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorCompose { this : RawObject < Self > , } impl VisualShaderNodeVectorCompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorComposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorCompose { } unsafe impl GodotObject for VisualShaderNodeVectorCompose { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorCompose" } } impl std :: ops :: Deref for VisualShaderNodeVectorCompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorCompose { } impl Instanciable for VisualShaderNodeVectorCompose { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorCompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorComposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorComposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorComposeMethodTable = VisualShaderNodeVectorComposeMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeVectorComposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorCompose\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:280:29548 [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 BakedLightmap` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_bakedlightmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`BakedLightmap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBakedLightmap inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BakedLightmap { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeError (pub i64) ; impl BakeError { pub const OK : BakeError = BakeError (0i64) ; pub const NO_SAVE_PATH : BakeError = BakeError (1i64) ; pub const NO_MESHES : BakeError = BakeError (2i64) ; pub const CANT_CREATE_IMAGE : BakeError = BakeError (3i64) ; pub const LIGHTMAP_SIZE : BakeError = BakeError (4i64) ; pub const INVALID_MESH : BakeError = BakeError (5i64) ; pub const USER_ABORTED : BakeError = BakeError (6i64) ; pub const NO_LIGHTMAPPER : BakeError = BakeError (7i64) ; } impl From < i64 > for BakeError { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeError > for i64 { # [inline] fn from (v : BakeError) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeQuality (pub i64) ; impl BakeQuality { pub const LOW : BakeQuality = BakeQuality (0i64) ; pub const MEDIUM : BakeQuality = BakeQuality (1i64) ; pub const HIGH : BakeQuality = BakeQuality (2i64) ; pub const ULTRA : BakeQuality = BakeQuality (3i64) ; } impl From < i64 > for BakeQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeQuality > for i64 { # [inline] fn from (v : BakeQuality) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentMode (pub i64) ; impl EnvironmentMode { pub const DISABLED : EnvironmentMode = EnvironmentMode (0i64) ; pub const SCENE : EnvironmentMode = EnvironmentMode (1i64) ; pub const CUSTOM_SKY : EnvironmentMode = EnvironmentMode (2i64) ; pub const CUSTOM_COLOR : EnvironmentMode = EnvironmentMode (3i64) ; } impl From < i64 > for EnvironmentMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentMode > for i64 { # [inline] fn from (v : EnvironmentMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BakedLightmap { pub const BAKE_ERROR_CANT_CREATE_IMAGE : i64 = 3i64 ; pub const BAKE_ERROR_INVALID_MESH : i64 = 5i64 ; pub const BAKE_ERROR_LIGHTMAP_SIZE : i64 = 4i64 ; pub const BAKE_ERROR_NO_LIGHTMAPPER : i64 = 7i64 ; pub const BAKE_ERROR_NO_MESHES : i64 = 2i64 ; pub const BAKE_ERROR_NO_SAVE_PATH : i64 = 1i64 ; pub const BAKE_ERROR_OK : i64 = 0i64 ; pub const BAKE_ERROR_USER_ABORTED : i64 = 6i64 ; pub const BAKE_QUALITY_HIGH : i64 = 2i64 ; pub const BAKE_QUALITY_LOW : i64 = 0i64 ; pub const BAKE_QUALITY_MEDIUM : i64 = 1i64 ; pub const BAKE_QUALITY_ULTRA : i64 = 3i64 ; pub const ENVIRONMENT_MODE_CUSTOM_COLOR : i64 = 3i64 ; pub const ENVIRONMENT_MODE_CUSTOM_SKY : i64 = 2i64 ; pub const ENVIRONMENT_MODE_DISABLED : i64 = 0i64 ; pub const ENVIRONMENT_MODE_SCENE : i64 = 1i64 ; } impl BakedLightmap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BakedLightmapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed.\n# Default Arguments\n* `from_node` - `null`\n* `create_visual_debug` - `false`"] # [doc = ""] # [inline] pub fn bake (& self , from_node : impl AsArg < crate :: generated :: node :: Node > , data_save_path : impl Into < GodotString >) -> crate :: generated :: baked_lightmap :: BakeError { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallptr_i64_obj_str (method_bind , self . this . sys () . as_ptr () , from_node . as_arg_ptr () , data_save_path . into ()) ; crate :: generated :: baked_lightmap :: BakeError (ret) } } # [doc = "Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]."] # [doc = ""] # [inline] pub fn bake_quality (& self) -> crate :: generated :: baked_lightmap :: BakeQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bake_quality ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: BakeQuality (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn bounces (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bounces ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]."] # [doc = ""] # [inline] pub fn capture_cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_cell_size ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn capture_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn capture_propagation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_propagation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn capture_quality (& self) -> crate :: generated :: baked_lightmap :: BakeQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_quality ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: BakeQuality (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn default_texels_per_unit (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_default_texels_per_unit ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_custom_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_custom_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_energy ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_custom_sky (& self) -> Option < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_sky ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sky :: Sky , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_custom_sky_rotation_degrees (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_sky_rotation_degrees ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_min_light (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_min_light ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn environment_mode (& self) -> crate :: generated :: baked_lightmap :: EnvironmentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: baked_lightmap :: EnvironmentMode (ret) } } # [doc = "The size of the affected area."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The location where lightmaps will be saved."] # [doc = ""] # [inline] pub fn image_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_image_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The calculated light data."] # [doc = ""] # [inline] pub fn light_data (& self) -> Option < Ref < crate :: generated :: baked_lightmap_data :: BakedLightmapData , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_light_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: baked_lightmap_data :: BakedLightmapData , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn max_atlas_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_max_atlas_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_generate_atlas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_generate_atlas_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_color ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_denoiser (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_denoiser ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_hdr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_hdr ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]."] # [doc = ""] # [inline] pub fn set_bake_quality (& self , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bake_quality ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounces (& self , bounces : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bounces ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bounces) ; } } # [doc = "Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]."] # [doc = ""] # [inline] pub fn set_capture_cell_size (& self , capture_cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_cell_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , capture_cell_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_capture_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_capture_propagation (& self , propagation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_propagation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , propagation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_capture_quality (& self , capture_quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_quality ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , capture_quality) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_default_texels_per_unit (& self , texels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_default_texels_per_unit ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texels) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_custom_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_custom_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_energy ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_custom_sky (& self , sky : impl AsArg < crate :: generated :: sky :: Sky >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_sky ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , sky . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_custom_sky_rotation_degrees (& self , rotation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_sky_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , rotation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_min_light (& self , min_light : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_min_light ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , min_light) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The size of the affected area."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_generate_atlas (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_generate_atlas ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The location where lightmaps will be saved."] # [doc = ""] # [inline] pub fn set_image_path (& self , image_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_image_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , image_path . into ()) ; } } # [doc = "The calculated light data."] # [doc = ""] # [inline] pub fn set_light_data (& self , data : impl AsArg < crate :: generated :: baked_lightmap_data :: BakedLightmapData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_light_data ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_max_atlas_size (& self , max_atlas_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_max_atlas_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_atlas_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_color (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_color ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_denoiser (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_denoiser ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_hdr (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_hdr ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_denoiser) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmap { } unsafe impl GodotObject for BakedLightmap { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BakedLightmap" } } impl QueueFree for BakedLightmap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BakedLightmap { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: node :: Node > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: object :: Object > for BakedLightmap { } impl Instanciable for BakedLightmap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BakedLightmap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BakedLightmapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake : * mut sys :: godot_method_bind , pub get_bake_quality : * mut sys :: godot_method_bind , pub get_bias : * mut sys :: godot_method_bind , pub get_bounces : * mut sys :: godot_method_bind , pub get_capture_cell_size : * mut sys :: godot_method_bind , pub get_capture_enabled : * mut sys :: godot_method_bind , pub get_capture_propagation : * mut sys :: godot_method_bind , pub get_capture_quality : * mut sys :: godot_method_bind , pub get_default_texels_per_unit : * mut sys :: godot_method_bind , pub get_environment_custom_color : * mut sys :: godot_method_bind , pub get_environment_custom_energy : * mut sys :: godot_method_bind , pub get_environment_custom_sky : * mut sys :: godot_method_bind , pub get_environment_custom_sky_rotation_degrees : * mut sys :: godot_method_bind , pub get_environment_min_light : * mut sys :: godot_method_bind , pub get_environment_mode : * mut sys :: godot_method_bind , pub get_extents : * mut sys :: godot_method_bind , pub get_image_path : * mut sys :: godot_method_bind , pub get_light_data : * mut sys :: godot_method_bind , pub get_max_atlas_size : * mut sys :: godot_method_bind , pub is_generate_atlas_enabled : * mut sys :: godot_method_bind , pub is_using_color : * mut sys :: godot_method_bind , pub is_using_denoiser : * mut sys :: godot_method_bind , pub is_using_hdr : * mut sys :: godot_method_bind , pub set_bake_quality : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_bounces : * mut sys :: godot_method_bind , pub set_capture_cell_size : * mut sys :: godot_method_bind , pub set_capture_enabled : * mut sys :: godot_method_bind , pub set_capture_propagation : * mut sys :: godot_method_bind , pub set_capture_quality : * mut sys :: godot_method_bind , pub set_default_texels_per_unit : * mut sys :: godot_method_bind , pub set_environment_custom_color : * mut sys :: godot_method_bind , pub set_environment_custom_energy : * mut sys :: godot_method_bind , pub set_environment_custom_sky : * mut sys :: godot_method_bind , pub set_environment_custom_sky_rotation_degrees : * mut sys :: godot_method_bind , pub set_environment_min_light : * mut sys :: godot_method_bind , pub set_environment_mode : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind , pub set_generate_atlas : * mut sys :: godot_method_bind , pub set_image_path : * mut sys :: godot_method_bind , pub set_light_data : * mut sys :: godot_method_bind , pub set_max_atlas_size : * mut sys :: godot_method_bind , pub set_use_color : * mut sys :: godot_method_bind , pub set_use_denoiser : * mut sys :: godot_method_bind , pub set_use_hdr : * mut sys :: godot_method_bind } impl BakedLightmapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BakedLightmapMethodTable = BakedLightmapMethodTable { class_constructor : None , bake : 0 as * mut sys :: godot_method_bind , get_bake_quality : 0 as * mut sys :: godot_method_bind , get_bias : 0 as * mut sys :: godot_method_bind , get_bounces : 0 as * mut sys :: godot_method_bind , get_capture_cell_size : 0 as * mut sys :: godot_method_bind , get_capture_enabled : 0 as * mut sys :: godot_method_bind , get_capture_propagation : 0 as * mut sys :: godot_method_bind , get_capture_quality : 0 as * mut sys :: godot_method_bind , get_default_texels_per_unit : 0 as * mut sys :: godot_method_bind , get_environment_custom_color : 0 as * mut sys :: godot_method_bind , get_environment_custom_energy : 0 as * mut sys :: godot_method_bind , get_environment_custom_sky : 0 as * mut sys :: godot_method_bind , get_environment_custom_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_environment_min_light : 0 as * mut sys :: godot_method_bind , get_environment_mode : 0 as * mut sys :: godot_method_bind , get_extents : 0 as * mut sys :: godot_method_bind , get_image_path : 0 as * mut sys :: godot_method_bind , get_light_data : 0 as * mut sys :: godot_method_bind , get_max_atlas_size : 0 as * mut sys :: godot_method_bind , is_generate_atlas_enabled : 0 as * mut sys :: godot_method_bind , is_using_color : 0 as * mut sys :: godot_method_bind , is_using_denoiser : 0 as * mut sys :: godot_method_bind , is_using_hdr : 0 as * mut sys :: godot_method_bind , set_bake_quality : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_bounces : 0 as * mut sys :: godot_method_bind , set_capture_cell_size : 0 as * mut sys :: godot_method_bind , set_capture_enabled : 0 as * mut sys :: godot_method_bind , set_capture_propagation : 0 as * mut sys :: godot_method_bind , set_capture_quality : 0 as * mut sys :: godot_method_bind , set_default_texels_per_unit : 0 as * mut sys :: godot_method_bind , set_environment_custom_color : 0 as * mut sys :: godot_method_bind , set_environment_custom_energy : 0 as * mut sys :: godot_method_bind , set_environment_custom_sky : 0 as * mut sys :: godot_method_bind , set_environment_custom_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_environment_min_light : 0 as * mut sys :: godot_method_bind , set_environment_mode : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind , set_generate_atlas : 0 as * mut sys :: godot_method_bind , set_image_path : 0 as * mut sys :: godot_method_bind , set_light_data : 0 as * mut sys :: godot_method_bind , set_max_atlas_size : 0 as * mut sys :: godot_method_bind , set_use_color : 0 as * mut sys :: godot_method_bind , set_use_denoiser : 0 as * mut sys :: godot_method_bind , set_use_hdr : 0 as * mut sys :: godot_method_bind } ; &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 (|| { BakedLightmapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BakedLightmap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . get_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_quality\0" . as_ptr () as * const c_char) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_bounces = (gd_api . godot_method_bind_get_method) (class_name , "get_bounces\0" . as_ptr () as * const c_char) ; table . get_capture_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_cell_size\0" . as_ptr () as * const c_char) ; table . get_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_enabled\0" . as_ptr () as * const c_char) ; table . get_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_propagation\0" . as_ptr () as * const c_char) ; table . get_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_quality\0" . as_ptr () as * const c_char) ; table . get_default_texels_per_unit = (gd_api . godot_method_bind_get_method) (class_name , "get_default_texels_per_unit\0" . as_ptr () as * const c_char) ; table . get_environment_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_color\0" . as_ptr () as * const c_char) ; table . get_environment_custom_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_energy\0" . as_ptr () as * const c_char) ; table . get_environment_custom_sky = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_sky\0" . as_ptr () as * const c_char) ; table . get_environment_custom_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_environment_min_light = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_min_light\0" . as_ptr () as * const c_char) ; table . get_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_mode\0" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . get_image_path = (gd_api . godot_method_bind_get_method) (class_name , "get_image_path\0" . as_ptr () as * const c_char) ; table . get_light_data = (gd_api . godot_method_bind_get_method) (class_name , "get_light_data\0" . as_ptr () as * const c_char) ; table . get_max_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "get_max_atlas_size\0" . as_ptr () as * const c_char) ; table . is_generate_atlas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_generate_atlas_enabled\0" . as_ptr () as * const c_char) ; table . is_using_color = (gd_api . godot_method_bind_get_method) (class_name , "is_using_color\0" . as_ptr () as * const c_char) ; table . is_using_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "is_using_denoiser\0" . as_ptr () as * const c_char) ; table . is_using_hdr = (gd_api . godot_method_bind_get_method) (class_name , "is_using_hdr\0" . as_ptr () as * const c_char) ; table . set_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_quality\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_bounces = (gd_api . godot_method_bind_get_method) (class_name , "set_bounces\0" . as_ptr () as * const c_char) ; table . set_capture_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_cell_size\0" . as_ptr () as * const c_char) ; table . set_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_enabled\0" . as_ptr () as * const c_char) ; table . set_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_propagation\0" . as_ptr () as * const c_char) ; table . set_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_quality\0" . as_ptr () as * const c_char) ; table . set_default_texels_per_unit = (gd_api . godot_method_bind_get_method) (class_name , "set_default_texels_per_unit\0" . as_ptr () as * const c_char) ; table . set_environment_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_color\0" . as_ptr () as * const c_char) ; table . set_environment_custom_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_energy\0" . as_ptr () as * const c_char) ; table . set_environment_custom_sky = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_sky\0" . as_ptr () as * const c_char) ; table . set_environment_custom_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_environment_min_light = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_min_light\0" . as_ptr () as * const c_char) ; table . set_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_mode\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; table . set_generate_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_atlas\0" . as_ptr () as * const c_char) ; table . set_image_path = (gd_api . godot_method_bind_get_method) (class_name , "set_image_path\0" . as_ptr () as * const c_char) ; table . set_light_data = (gd_api . godot_method_bind_get_method) (class_name , "set_light_data\0" . as_ptr () as * const c_char) ; table . set_max_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "set_max_atlas_size\0" . as_ptr () as * const c_char) ; table . set_use_color = (gd_api . godot_method_bind_get_method) (class_name , "set_use_color\0" . as_ptr () as * const c_char) ; table . set_use_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "set_use_denoiser\0" . as_ptr () as * const c_char) ; table . set_use_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_hdr\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:286:18656 [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 FileDialog` inherits `ConfirmationDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_filedialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`FileDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nFileDialog inherits methods from:\n - [ConfirmationDialog](struct.ConfirmationDialog.html)\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FileDialog { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Access (pub i64) ; impl Access { pub const RESOURCES : Access = Access (0i64) ; pub const USERDATA : Access = Access (1i64) ; pub const FILESYSTEM : Access = Access (2i64) ; } impl From < i64 > for Access { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Access > for i64 { # [inline] fn from (v : Access) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const OPEN_FILE : Mode = Mode (0i64) ; pub const OPEN_FILES : Mode = Mode (1i64) ; pub const OPEN_DIR : Mode = Mode (2i64) ; pub const OPEN_ANY : Mode = Mode (3i64) ; pub const SAVE_FILE : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl FileDialog { pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; pub const MODE_SAVE_FILE : i64 = 4i64 ; } impl FileDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = FileDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `filter` as a custom filter; `filter` should be of the form `\"filename.extension ; Description\"`. For example, `\"*.png ; PNG Images\"`."] # [doc = ""] # [inline] pub fn add_filter (& self , filter : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . add_filter ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , filter . into ()) ; } } # [doc = "Clear all the added filters in the dialog."] # [doc = ""] # [inline] pub fn clear_filters (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . clear_filters ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clear currently selected items in the dialog."] # [doc = ""] # [inline] pub fn deselect_items (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . deselect_items ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The file system access scope. See enum `Access` constants.\n**Warning:** Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]."] # [doc = ""] # [inline] pub fn access (& self) -> crate :: generated :: file_dialog :: Access { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_access ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: file_dialog :: Access (ret) } } # [doc = "The current working directory of the file dialog."] # [doc = ""] # [inline] pub fn current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The currently selected file of the file dialog."] # [doc = ""] # [inline] pub fn current_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The currently selected file path of the file dialog."] # [doc = ""] # [inline] pub fn current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PoolStringArray([\"*.png ; PNG Images\",\"*.gd ; GDScript Files\"]))`."] # [doc = ""] # [inline] pub fn filters (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_filters ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the LineEdit for the selected file."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The dialog's open or save mode, which affects the selection behavior. See enum `Mode` constants."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: file_dialog :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: file_dialog :: Mode (ret) } } # [doc = "Returns the vertical box container of the dialog, custom controls can be added to it."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Invalidate and update the current dialog content list."] # [doc = ""] # [inline] pub fn invalidate (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . invalidate ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, changing the `Mode` property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to \"Open a File\")."] # [doc = ""] # [inline] pub fn is_mode_overriding_title (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . is_mode_overriding_title ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the dialog will show hidden files."] # [doc = ""] # [inline] pub fn is_showing_hidden_files (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . is_showing_hidden_files ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The file system access scope. See enum `Access` constants.\n**Warning:** Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]."] # [doc = ""] # [inline] pub fn set_access (& self , access : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_access ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , access) ; } } # [doc = "The current working directory of the file dialog."] # [doc = ""] # [inline] pub fn set_current_dir (& self , dir : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_dir ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , dir . into ()) ; } } # [doc = "The currently selected file of the file dialog."] # [doc = ""] # [inline] pub fn set_current_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "The currently selected file path of the file dialog."] # [doc = ""] # [inline] pub fn set_current_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PoolStringArray([\"*.png ; PNG Images\",\"*.gd ; GDScript Files\"]))`."] # [doc = ""] # [inline] pub fn set_filters (& self , filters : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_filters ; let ret = crate :: icalls :: icallptr_void_strarr (method_bind , self . this . sys () . as_ptr () , filters) ; } } # [doc = "The dialog's open or save mode, which affects the selection behavior. See enum `Mode` constants."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, changing the `Mode` property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to \"Open a File\")."] # [doc = ""] # [inline] pub fn set_mode_overrides_title (& self , _override : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_mode_overrides_title ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = "If `true`, the dialog will show hidden files."] # [doc = ""] # [inline] pub fn set_show_hidden_files (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_show_hidden_files ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FileDialog { } unsafe impl GodotObject for FileDialog { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "FileDialog" } } impl QueueFree for FileDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for FileDialog { type Target = crate :: generated :: confirmation_dialog :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: confirmation_dialog :: ConfirmationDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for FileDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for FileDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for FileDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for FileDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for FileDialog { } impl Instanciable for FileDialog { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { FileDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FileDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_filter : * mut sys :: godot_method_bind , pub clear_filters : * mut sys :: godot_method_bind , pub deselect_items : * mut sys :: godot_method_bind , pub get_access : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_file : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_filters : * mut sys :: godot_method_bind , pub get_line_edit : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_vbox : * mut sys :: godot_method_bind , pub invalidate : * mut sys :: godot_method_bind , pub is_mode_overriding_title : * mut sys :: godot_method_bind , pub is_showing_hidden_files : * mut sys :: godot_method_bind , pub set_access : * mut sys :: godot_method_bind , pub set_current_dir : * mut sys :: godot_method_bind , pub set_current_file : * mut sys :: godot_method_bind , pub set_current_path : * mut sys :: godot_method_bind , pub set_filters : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_mode_overrides_title : * mut sys :: godot_method_bind , pub set_show_hidden_files : * mut sys :: godot_method_bind } impl FileDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FileDialogMethodTable = FileDialogMethodTable { class_constructor : None , add_filter : 0 as * mut sys :: godot_method_bind , clear_filters : 0 as * mut sys :: godot_method_bind , deselect_items : 0 as * mut sys :: godot_method_bind , get_access : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_file : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_filters : 0 as * mut sys :: godot_method_bind , get_line_edit : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_vbox : 0 as * mut sys :: godot_method_bind , invalidate : 0 as * mut sys :: godot_method_bind , is_mode_overriding_title : 0 as * mut sys :: godot_method_bind , is_showing_hidden_files : 0 as * mut sys :: godot_method_bind , set_access : 0 as * mut sys :: godot_method_bind , set_current_dir : 0 as * mut sys :: godot_method_bind , set_current_file : 0 as * mut sys :: godot_method_bind , set_current_path : 0 as * mut sys :: godot_method_bind , set_filters : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_mode_overrides_title : 0 as * mut sys :: godot_method_bind , set_show_hidden_files : 0 as * mut sys :: godot_method_bind } ; &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 (|| { FileDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FileDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_filter = (gd_api . godot_method_bind_get_method) (class_name , "add_filter\0" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\0" . as_ptr () as * const c_char) ; table . deselect_items = (gd_api . godot_method_bind_get_method) (class_name , "deselect_items\0" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_filters = (gd_api . godot_method_bind_get_method) (class_name , "get_filters\0" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\0" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\0" . as_ptr () as * const c_char) ; table . is_mode_overriding_title = (gd_api . godot_method_bind_get_method) (class_name , "is_mode_overriding_title\0" . as_ptr () as * const c_char) ; table . is_showing_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "is_showing_hidden_files\0" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\0" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\0" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\0" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\0" . as_ptr () as * const c_char) ; table . set_filters = (gd_api . godot_method_bind_get_method) (class_name , "set_filters\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_mode_overrides_title = (gd_api . godot_method_bind_get_method) (class_name , "set_mode_overrides_title\0" . as_ptr () as * const c_char) ; table . set_show_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "set_show_hidden_files\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:292:5259 [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 Sky` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_sky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSky inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Sky { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RadianceSize (pub i64) ; impl RadianceSize { pub const _32 : RadianceSize = RadianceSize (0i64) ; pub const _64 : RadianceSize = RadianceSize (1i64) ; pub const _128 : RadianceSize = RadianceSize (2i64) ; pub const _256 : RadianceSize = RadianceSize (3i64) ; pub const _512 : RadianceSize = RadianceSize (4i64) ; pub const _1024 : RadianceSize = RadianceSize (5i64) ; pub const _2048 : RadianceSize = RadianceSize (6i64) ; pub const MAX : RadianceSize = RadianceSize (7i64) ; } impl From < i64 > for RadianceSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RadianceSize > for i64 { # [inline] fn from (v : RadianceSize) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Sky { pub const RADIANCE_SIZE_1024 : i64 = 5i64 ; pub const RADIANCE_SIZE_128 : i64 = 2i64 ; pub const RADIANCE_SIZE_2048 : i64 = 6i64 ; pub const RADIANCE_SIZE_256 : i64 = 3i64 ; pub const RADIANCE_SIZE_32 : i64 = 0i64 ; pub const RADIANCE_SIZE_512 : i64 = 4i64 ; pub const RADIANCE_SIZE_64 : i64 = 1i64 ; pub const RADIANCE_SIZE_MAX : i64 = 7i64 ; } impl Sky { # [doc = "The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.\nSee [enum RadianceSize] constants for values.\n**Note:** Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware."] # [doc = ""] # [inline] pub fn radiance_size (& self) -> crate :: generated :: sky :: RadianceSize { unsafe { let method_bind : * mut sys :: godot_method_bind = SkyMethodTable :: get (get_api ()) . get_radiance_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: sky :: RadianceSize (ret) } } # [doc = "The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.\nSee [enum RadianceSize] constants for values.\n**Note:** Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware."] # [doc = ""] # [inline] pub fn set_radiance_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkyMethodTable :: get (get_api ()) . set_radiance_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sky { } unsafe impl GodotObject for Sky { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Sky" } } impl std :: ops :: Deref for Sky { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Sky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Sky { } unsafe impl SubClass < crate :: generated :: object :: Object > for Sky { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_radiance_size : * mut sys :: godot_method_bind , pub set_radiance_size : * mut sys :: godot_method_bind } impl SkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkyMethodTable = SkyMethodTable { class_constructor : None , get_radiance_size : 0 as * mut sys :: godot_method_bind , set_radiance_size : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Sky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_radiance_size = (gd_api . godot_method_bind_get_method) (class_name , "get_radiance_size\0" . as_ptr () as * const c_char) ; table . set_radiance_size = (gd_api . godot_method_bind_get_method) (class_name , "set_radiance_size\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:298:3595 [INFO] [stdout] | [INFO] [stdout] 298 | ...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] 298 | # [doc = "`core class VisualShaderNodeIf` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeif.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeIf inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeIf { this : RawObject < Self > , } impl VisualShaderNodeIf { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeIfMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeIf { } unsafe impl GodotObject for VisualShaderNodeIf { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeIf" } } impl std :: ops :: Deref for VisualShaderNodeIf { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeIf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeIf { } impl Instanciable for VisualShaderNodeIf { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeIf :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeIfMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeIfMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeIfMethodTable = VisualShaderNodeIfMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeIfMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeIf\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:304:4084 [INFO] [stdout] | [INFO] [stdout] 304 | ...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] 304 | # [doc = "`core class VisualShaderNodeScalarUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalaruniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarUniform { this : RawObject < Self > , } impl VisualShaderNodeScalarUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarUniform { } unsafe impl GodotObject for VisualShaderNodeScalarUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarUniform" } } impl std :: ops :: Deref for VisualShaderNodeScalarUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarUniform { } impl Instanciable for VisualShaderNodeScalarUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarUniformMethodTable = VisualShaderNodeScalarUniformMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeScalarUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:310:15446 [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 Directory` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_directory.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDirectory inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Directory { this : RawObject < Self > , } impl Directory { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DirectoryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. `newdir` or `../newdir`), or an absolute path (e.g. `/tmp/newdir` or `res://somedir/newdir`).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn change_dir (& self , todir : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . change_dir ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , todir . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Copies the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn copy (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . copy ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns whether the current item processed with the last [method get_next] call is a directory (`.` and `..` are considered directories)."] # [doc = ""] # [inline] pub fn current_is_dir (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . current_is_dir ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn dir_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . dir_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn file_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . file_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Returns the absolute path to the currently opened directory (e.g. `res://folder` or `C:\\tmp\\folder`)."] # [doc = ""] # [inline] pub fn get_current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive."] # [doc = ""] # [inline] pub fn get_current_drive (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_drive ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`). On other platforms, or if the requested drive does not existed, the method returns an empty String."] # [doc = ""] # [inline] pub fn get_drive (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0."] # [doc = ""] # [inline] pub fn get_drive_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next element (file or directory) in the current directory (including `.` and `..`, unless `skip_navigational` was given to [method list_dir_begin]).\nThe name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case)."] # [doc = ""] # [inline] pub fn get_next (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_next ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1."] # [doc = ""] # [inline] pub fn get_space_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_space_left ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].\nIf `skip_navigational` is `true`, `.` and `..` are filtered out.\nIf `skip_hidden` is `true`, hidden files are filtered out.\n# Default Arguments\n* `skip_navigational` - `false`\n* `skip_hidden` - `false`"] # [doc = ""] # [inline] pub fn list_dir_begin (& self , skip_navigational : bool , skip_hidden : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_begin ; let ret = crate :: icalls :: icallptr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , skip_navigational , skip_hidden) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter)."] # [doc = ""] # [inline] pub fn list_dir_end (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_end ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir_recursive (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir_recursive ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Opens an existing directory of the filesystem. The `path` argument can be within the project tree (`res://folder`), the user directory (`user://folder`) or an absolute path of the user filesystem (e.g. `/tmp/folder` or `C:\\tmp\\folder`).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn open (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . open ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn remove (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . remove ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Renames (move) the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn rename (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . rename ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Directory { } unsafe impl GodotObject for Directory { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Directory" } } impl std :: ops :: Deref for Directory { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Directory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Directory { } unsafe impl SubClass < crate :: generated :: object :: Object > for Directory { } impl Instanciable for Directory { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Directory :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DirectoryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub change_dir : * mut sys :: godot_method_bind , pub copy : * mut sys :: godot_method_bind , pub current_is_dir : * mut sys :: godot_method_bind , pub dir_exists : * mut sys :: godot_method_bind , pub file_exists : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_drive : * mut sys :: godot_method_bind , pub get_drive : * mut sys :: godot_method_bind , pub get_drive_count : * mut sys :: godot_method_bind , pub get_next : * mut sys :: godot_method_bind , pub get_space_left : * mut sys :: godot_method_bind , pub list_dir_begin : * mut sys :: godot_method_bind , pub list_dir_end : * mut sys :: godot_method_bind , pub make_dir : * mut sys :: godot_method_bind , pub make_dir_recursive : * mut sys :: godot_method_bind , pub open : * mut sys :: godot_method_bind , pub remove : * mut sys :: godot_method_bind , pub rename : * mut sys :: godot_method_bind } impl DirectoryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DirectoryMethodTable = DirectoryMethodTable { class_constructor : None , change_dir : 0 as * mut sys :: godot_method_bind , copy : 0 as * mut sys :: godot_method_bind , current_is_dir : 0 as * mut sys :: godot_method_bind , dir_exists : 0 as * mut sys :: godot_method_bind , file_exists : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_drive : 0 as * mut sys :: godot_method_bind , get_drive : 0 as * mut sys :: godot_method_bind , get_drive_count : 0 as * mut sys :: godot_method_bind , get_next : 0 as * mut sys :: godot_method_bind , get_space_left : 0 as * mut sys :: godot_method_bind , list_dir_begin : 0 as * mut sys :: godot_method_bind , list_dir_end : 0 as * mut sys :: godot_method_bind , make_dir : 0 as * mut sys :: godot_method_bind , make_dir_recursive : 0 as * mut sys :: godot_method_bind , open : 0 as * mut sys :: godot_method_bind , remove : 0 as * mut sys :: godot_method_bind , rename : 0 as * mut sys :: godot_method_bind } ; &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 (|| { DirectoryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Directory\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . change_dir = (gd_api . godot_method_bind_get_method) (class_name , "change_dir\0" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\0" . as_ptr () as * const c_char) ; table . current_is_dir = (gd_api . godot_method_bind_get_method) (class_name , "current_is_dir\0" . as_ptr () as * const c_char) ; table . dir_exists = (gd_api . godot_method_bind_get_method) (class_name , "dir_exists\0" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_current_drive\0" . as_ptr () as * const c_char) ; table . get_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_drive\0" . as_ptr () as * const c_char) ; table . get_drive_count = (gd_api . godot_method_bind_get_method) (class_name , "get_drive_count\0" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\0" . as_ptr () as * const c_char) ; table . get_space_left = (gd_api . godot_method_bind_get_method) (class_name , "get_space_left\0" . as_ptr () as * const c_char) ; table . list_dir_begin = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_begin\0" . as_ptr () as * const c_char) ; table . list_dir_end = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_end\0" . as_ptr () as * const c_char) ; table . make_dir = (gd_api . godot_method_bind_get_method) (class_name , "make_dir\0" . as_ptr () as * const c_char) ; table . make_dir_recursive = (gd_api . godot_method_bind_get_method) (class_name , "make_dir_recursive\0" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\0" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\0" . as_ptr () as * const c_char) ; table . rename = (gd_api . godot_method_bind_get_method) (class_name , "rename\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:316:21662 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:322:6325 [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 ConeTwistJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_conetwistjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ConeTwistJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nConeTwistJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConeTwistJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const SWING_SPAN : Param = Param (0i64) ; pub const TWIST_SPAN : Param = Param (1i64) ; pub const BIAS : Param = Param (2i64) ; pub const SOFTNESS : Param = Param (3i64) ; pub const RELAXATION : Param = Param (4i64) ; pub const MAX : Param = Param (5i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ConeTwistJoint { pub const PARAM_BIAS : i64 = 2i64 ; pub const PARAM_MAX : i64 = 5i64 ; pub const PARAM_RELAXATION : i64 = 4i64 ; pub const PARAM_SOFTNESS : i64 = 3i64 ; pub const PARAM_SWING_SPAN : i64 = 0i64 ; pub const PARAM_TWIST_SPAN : i64 = 1i64 ; } impl ConeTwistJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConeTwistJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConeTwistJoint { } unsafe impl GodotObject for ConeTwistJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ConeTwistJoint" } } impl QueueFree for ConeTwistJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ConeTwistJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConeTwistJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConeTwistJoint { } impl Instanciable for ConeTwistJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConeTwistJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConeTwistJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl ConeTwistJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConeTwistJointMethodTable = ConeTwistJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ConeTwistJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConeTwistJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:334:8941 [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 Gradient` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gradient.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGradient inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Gradient { this : RawObject < Self > , } impl Gradient { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GradientMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the specified color to the end of the ramp, with the specified offset."] # [doc = ""] # [inline] pub fn add_point (& self , offset : f64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_f64_color (method_bind , self . this . sys () . as_ptr () , offset , color) ; } } # [doc = "Returns the color of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn get_color (& self , point : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = "Gradient's colors returned as a [PoolColorArray]."] # [doc = ""] # [inline] pub fn colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "Returns the offset of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn get_offset (& self , point : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = "Gradient's offsets returned as a [PoolRealArray]."] # [doc = ""] # [inline] pub fn offsets (& self) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_offsets ; let ret = crate :: icalls :: icallptr_f32arr (method_bind , self . this . sys () . as_ptr ()) ; Float32Array :: from_sys (ret) } } # [doc = "Returns the number of colors in the ramp."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the interpolated color specified by `offset`."] # [doc = ""] # [inline] pub fn interpolate (& self , offset : f64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallptr_color_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; mem :: transmute (ret) } } # [doc = "Removes the color at the index `offset`."] # [doc = ""] # [inline] pub fn remove_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Sets the color of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn set_color (& self , point : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , point , color) ; } } # [doc = "Gradient's colors returned as a [PoolColorArray]."] # [doc = ""] # [inline] pub fn set_colors (& self , colors : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , colors) ; } } # [doc = "Sets the offset for the ramp color at index `point`."] # [doc = ""] # [inline] pub fn set_offset (& self , point : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , point , offset) ; } } # [doc = "Gradient's offsets returned as a [PoolRealArray]."] # [doc = ""] # [inline] pub fn set_offsets (& self , offsets : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_offsets ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , offsets) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Gradient { } unsafe impl GodotObject for Gradient { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Gradient" } } impl std :: ops :: Deref for Gradient { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Gradient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Gradient { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Gradient { } unsafe impl SubClass < crate :: generated :: object :: Object > for Gradient { } impl Instanciable for Gradient { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Gradient :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GradientMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_colors : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_offsets : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_colors : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_offsets : * mut sys :: godot_method_bind } impl GradientMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GradientMethodTable = GradientMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_colors : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_offsets : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_colors : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_offsets : 0 as * mut sys :: godot_method_bind } ; &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 (|| { GradientMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Gradient\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_colors\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_offsets = (gd_api . godot_method_bind_get_method) (class_name , "get_offsets\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_colors\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_offsets = (gd_api . godot_method_bind_get_method) (class_name , "set_offsets\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:340:5275 [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 VisualShaderNodeInput` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeinput.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeInput inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeInput { this : RawObject < Self > , } impl VisualShaderNodeInput { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeInputMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "One of the several input constants in lower-case style like: \"vertex\"(`VERTEX`) or \"point_size\"(`POINT_SIZE`)."] # [doc = ""] # [inline] pub fn input_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . get_input_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_input_real_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . get_input_real_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "One of the several input constants in lower-case style like: \"vertex\"(`VERTEX`) or \"point_size\"(`POINT_SIZE`)."] # [doc = ""] # [inline] pub fn set_input_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . set_input_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeInput { } unsafe impl GodotObject for VisualShaderNodeInput { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeInput" } } impl std :: ops :: Deref for VisualShaderNodeInput { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeInput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeInput { } impl Instanciable for VisualShaderNodeInput { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeInput :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeInputMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_input_name : * mut sys :: godot_method_bind , pub get_input_real_name : * mut sys :: godot_method_bind , pub set_input_name : * mut sys :: godot_method_bind } impl VisualShaderNodeInputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeInputMethodTable = VisualShaderNodeInputMethodTable { class_constructor : None , get_input_name : 0 as * mut sys :: godot_method_bind , get_input_real_name : 0 as * mut sys :: godot_method_bind , set_input_name : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualShaderNodeInputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeInput\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_input_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_name\0" . as_ptr () as * const c_char) ; table . get_input_real_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_real_name\0" . as_ptr () as * const c_char) ; table . set_input_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_name\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:346:21076 [INFO] [stdout] | [INFO] [stdout] 346 | ... : 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] 346 | # [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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:352:30874 [INFO] [stdout] | [INFO] [stdout] 352 | ... : 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] 352 | # [doc = "`core class Area` inherits `CollisionObject` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_area.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Area` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nArea inherits methods from:\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Area { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceOverride (pub i64) ; impl SpaceOverride { pub const DISABLED : SpaceOverride = SpaceOverride (0i64) ; pub const COMBINE : SpaceOverride = SpaceOverride (1i64) ; pub const COMBINE_REPLACE : SpaceOverride = SpaceOverride (2i64) ; pub const REPLACE : SpaceOverride = SpaceOverride (3i64) ; pub const REPLACE_COMBINE : SpaceOverride = SpaceOverride (4i64) ; } impl From < i64 > for SpaceOverride { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceOverride > for i64 { # [inline] fn from (v : SpaceOverride) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area { pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; } impl Area { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AreaMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn audio_bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_audio_bus ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the layer mask."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn gravity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn gravity_distance_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity_distance_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn gravity_vector (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity_vector ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of intersecting [Area]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_areas (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_overlapping_areas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_overlapping_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn priority (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_priority ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn reverb_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_amount ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The reverb bus name to use for this area's associated audio."] # [doc = ""] # [inline] pub fn reverb_bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_bus ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn reverb_uniformity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_uniformity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn space_override_mode (& self) -> crate :: generated :: area :: SpaceOverride { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_space_override_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: area :: SpaceOverride (ret) } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]."] # [doc = ""] # [inline] pub fn is_gravity_a_point (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_gravity_a_point ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn is_monitorable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_monitorable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn is_monitoring (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_monitoring ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn is_overriding_audio_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_overriding_audio_bus ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area applies reverb to its associated audio."] # [doc = ""] # [inline] pub fn is_using_reverb_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_using_reverb_bus ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the given area overlaps the Area.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn overlaps_area (& self , area : impl AsArg < crate :: generated :: node :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; ret as _ } } # [doc = "If `true`, the given physics body overlaps the Area.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.\nThe `body` argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body)."] # [doc = ""] # [inline] pub fn overlaps_body (& self , body : impl AsArg < crate :: generated :: node :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; ret as _ } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_audio_bus ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_override (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_audio_bus_override ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , collision_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn set_gravity (& self , gravity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity) ; } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn set_gravity_distance_scale (& self , distance_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_distance_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance_scale) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]."] # [doc = ""] # [inline] pub fn set_gravity_is_point (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_is_point ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn set_gravity_vector (& self , vector : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_vector ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , vector) ; } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn set_monitorable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_monitorable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn set_monitoring (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_monitoring ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn set_priority (& self , priority : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_priority ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [doc = "The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn set_reverb_amount (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_amount ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The reverb bus name to use for this area's associated audio."] # [doc = ""] # [inline] pub fn set_reverb_bus (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_bus ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn set_reverb_uniformity (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_uniformity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn set_space_override_mode (& self , enable : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_space_override_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the area applies reverb to its associated audio."] # [doc = ""] # [inline] pub fn set_use_reverb_bus (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_use_reverb_bus ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area { } unsafe impl GodotObject for Area { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Area" } } impl QueueFree for Area { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Area { type Target = crate :: generated :: collision_object :: CollisionObject ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for Area { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Area { } unsafe impl SubClass < crate :: generated :: node :: Node > for Area { } unsafe impl SubClass < crate :: generated :: object :: Object > for Area { } impl Instanciable for Area { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Area :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AreaMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_audio_bus : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gravity_distance_scale : * mut sys :: godot_method_bind , pub get_gravity_vector : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_overlapping_areas : * mut sys :: godot_method_bind , pub get_overlapping_bodies : * mut sys :: godot_method_bind , pub get_priority : * mut sys :: godot_method_bind , pub get_reverb_amount : * mut sys :: godot_method_bind , pub get_reverb_bus : * mut sys :: godot_method_bind , pub get_reverb_uniformity : * mut sys :: godot_method_bind , pub get_space_override_mode : * mut sys :: godot_method_bind , pub is_gravity_a_point : * mut sys :: godot_method_bind , pub is_monitorable : * mut sys :: godot_method_bind , pub is_monitoring : * mut sys :: godot_method_bind , pub is_overriding_audio_bus : * mut sys :: godot_method_bind , pub is_using_reverb_bus : * mut sys :: godot_method_bind , pub overlaps_area : * mut sys :: godot_method_bind , pub overlaps_body : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_audio_bus : * mut sys :: godot_method_bind , pub set_audio_bus_override : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_gravity_distance_scale : * mut sys :: godot_method_bind , pub set_gravity_is_point : * mut sys :: godot_method_bind , pub set_gravity_vector : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_monitorable : * mut sys :: godot_method_bind , pub set_monitoring : * mut sys :: godot_method_bind , pub set_priority : * mut sys :: godot_method_bind , pub set_reverb_amount : * mut sys :: godot_method_bind , pub set_reverb_bus : * mut sys :: godot_method_bind , pub set_reverb_uniformity : * mut sys :: godot_method_bind , pub set_space_override_mode : * mut sys :: godot_method_bind , pub set_use_reverb_bus : * mut sys :: godot_method_bind } impl AreaMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AreaMethodTable = AreaMethodTable { class_constructor : None , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_audio_bus : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , get_gravity_vector : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_overlapping_areas : 0 as * mut sys :: godot_method_bind , get_overlapping_bodies : 0 as * mut sys :: godot_method_bind , get_priority : 0 as * mut sys :: godot_method_bind , get_reverb_amount : 0 as * mut sys :: godot_method_bind , get_reverb_bus : 0 as * mut sys :: godot_method_bind , get_reverb_uniformity : 0 as * mut sys :: godot_method_bind , get_space_override_mode : 0 as * mut sys :: godot_method_bind , is_gravity_a_point : 0 as * mut sys :: godot_method_bind , is_monitorable : 0 as * mut sys :: godot_method_bind , is_monitoring : 0 as * mut sys :: godot_method_bind , is_overriding_audio_bus : 0 as * mut sys :: godot_method_bind , is_using_reverb_bus : 0 as * mut sys :: godot_method_bind , overlaps_area : 0 as * mut sys :: godot_method_bind , overlaps_body : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_audio_bus : 0 as * mut sys :: godot_method_bind , set_audio_bus_override : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , set_gravity_is_point : 0 as * mut sys :: godot_method_bind , set_gravity_vector : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_monitorable : 0 as * mut sys :: godot_method_bind , set_monitoring : 0 as * mut sys :: godot_method_bind , set_priority : 0 as * mut sys :: godot_method_bind , set_reverb_amount : 0 as * mut sys :: godot_method_bind , set_reverb_bus : 0 as * mut sys :: godot_method_bind , set_reverb_uniformity : 0 as * mut sys :: godot_method_bind , set_space_override_mode : 0 as * mut sys :: godot_method_bind , set_use_reverb_bus : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AreaMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Area\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus\0" . as_ptr () as * const c_char) ; table . get_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_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_amount\0" . as_ptr () as * const c_char) ; table . get_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_bus\0" . as_ptr () as * const c_char) ; table . get_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_uniformity\0" . as_ptr () as * const c_char) ; table . get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_space_override_mode\0" . as_ptr () as * const c_char) ; table . is_gravity_a_point = (gd_api . godot_method_bind_get_method) (class_name , "is_gravity_a_point\0" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\0" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\0" . as_ptr () as * const c_char) ; table . is_overriding_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_audio_bus\0" . as_ptr () as * const c_char) ; table . is_using_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_using_reverb_bus\0" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\0" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus\0" . as_ptr () as * const c_char) ; table . set_audio_bus_override = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_override\0" . as_ptr () as * const c_char) ; table . set_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_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_amount\0" . as_ptr () as * const c_char) ; table . set_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_bus\0" . as_ptr () as * const c_char) ; table . set_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_uniformity\0" . as_ptr () as * const c_char) ; table . set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_space_override_mode\0" . as_ptr () as * const c_char) ; table . set_use_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_use_reverb_bus\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:358:12387 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:364:23674 [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 Line2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_line2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Line2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLine2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Line2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineCapMode (pub i64) ; impl LineCapMode { pub const NONE : LineCapMode = LineCapMode (0i64) ; pub const BOX : LineCapMode = LineCapMode (1i64) ; pub const ROUND : LineCapMode = LineCapMode (2i64) ; } impl From < i64 > for LineCapMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineCapMode > for i64 { # [inline] fn from (v : LineCapMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineJointMode (pub i64) ; impl LineJointMode { pub const SHARP : LineJointMode = LineJointMode (0i64) ; pub const BEVEL : LineJointMode = LineJointMode (1i64) ; pub const ROUND : LineJointMode = LineJointMode (2i64) ; } impl From < i64 > for LineJointMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineJointMode > for i64 { # [inline] fn from (v : LineJointMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineTextureMode (pub i64) ; impl LineTextureMode { pub const NONE : LineTextureMode = LineTextureMode (0i64) ; pub const TILE : LineTextureMode = LineTextureMode (1i64) ; pub const STRETCH : LineTextureMode = LineTextureMode (2i64) ; } impl From < i64 > for LineTextureMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineTextureMode > for i64 { # [inline] fn from (v : LineTextureMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Line2D { pub const LINE_CAP_BOX : i64 = 1i64 ; pub const LINE_CAP_NONE : i64 = 0i64 ; pub const LINE_CAP_ROUND : i64 = 2i64 ; pub const LINE_JOINT_BEVEL : i64 = 1i64 ; pub const LINE_JOINT_ROUND : i64 = 2i64 ; pub const LINE_JOINT_SHARP : i64 = 0i64 ; pub const LINE_TEXTURE_NONE : i64 = 0i64 ; pub const LINE_TEXTURE_STRETCH : i64 = 2i64 ; pub const LINE_TEXTURE_TILE : i64 = 1i64 ; } impl Line2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Line2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point at the `position`. Appends the point at the end of the line.\nIf `at_position` is given, the point is inserted before the point number `at_position`, moving that point (and every point after) after the inserted point. If `at_position` is not given, or is an illegal value (`at_position < 0` or `at_position >= [method get_point_count]`), the point will be appended at the end of the point list.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_vec2_i64 (method_bind , self . this . sys () . as_ptr () , position , at_position) ; } } # [doc = "Removes all points from the line."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the line's border will be anti-aliased."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the style of the line's first point. Use [enum LineCapMode] constants."] # [doc = ""] # [inline] pub fn begin_cap_mode (& self) -> crate :: generated :: line_2d :: LineCapMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_begin_cap_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineCapMode (ret) } } # [doc = "The line's width varies with the curve. The original width is simply multiply by the value of the Curve."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The line's color. Will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn default_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_default_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Controls the style of the line's last point. Use [enum LineCapMode] constants."] # [doc = ""] # [inline] pub fn end_cap_mode (& self) -> crate :: generated :: line_2d :: LineCapMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_end_cap_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineCapMode (ret) } } # [doc = "The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn gradient (& self) -> Option < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The style for the points between the start and the end."] # [doc = ""] # [inline] pub fn joint_mode (& self) -> crate :: generated :: line_2d :: LineJointMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_joint_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineJointMode (ret) } } # [doc = "Returns the Line2D's amount of points."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns point `i`'s position."] # [doc = ""] # [inline] pub fn get_point_position (& self , i : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , i) ; mem :: transmute (ret) } } # [doc = "The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors."] # [doc = ""] # [inline] pub fn points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round."] # [doc = ""] # [inline] pub fn round_precision (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_round_precision ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The direction difference in radians between vector points. This value is only used if `joint mode` is set to [constant LINE_JOINT_SHARP]."] # [doc = ""] # [inline] pub fn sharp_limit (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_sharp_limit ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture used for the line's texture. Uses `texture_mode` for drawing style."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The style to render the `texture` on the line. Use [enum LineTextureMode] constants."] # [doc = ""] # [inline] pub fn texture_mode (& self) -> crate :: generated :: line_2d :: LineTextureMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_texture_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_2d :: LineTextureMode (ret) } } # [doc = "The line's width."] # [doc = ""] # [inline] pub fn width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes the point at index `i` from the line."] # [doc = ""] # [inline] pub fn remove_point (& self , i : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , i) ; } } # [doc = "If `true`, the line's border will be anti-aliased."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "Controls the style of the line's first point. Use [enum LineCapMode] constants."] # [doc = ""] # [inline] pub fn set_begin_cap_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_begin_cap_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The line's width varies with the curve. The original width is simply multiply by the value of the Curve."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } # [doc = "The line's color. Will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn set_default_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_default_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Controls the style of the line's last point. Use [enum LineCapMode] constants."] # [doc = ""] # [inline] pub fn set_end_cap_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_end_cap_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn set_gradient (& self , color : impl AsArg < crate :: generated :: gradient :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , color . as_arg_ptr ()) ; } } # [doc = "The style for the points between the start and the end."] # [doc = ""] # [inline] pub fn set_joint_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_joint_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Overwrites the position in point `i` with the supplied `position`."] # [doc = ""] # [inline] pub fn set_point_position (& self , i : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , i , position) ; } } # [doc = "The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors."] # [doc = ""] # [inline] pub fn set_points (& self , points : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round."] # [doc = ""] # [inline] pub fn set_round_precision (& self , precision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_round_precision ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , precision) ; } } # [doc = "The direction difference in radians between vector points. This value is only used if `joint mode` is set to [constant LINE_JOINT_SHARP]."] # [doc = ""] # [inline] pub fn set_sharp_limit (& self , limit : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_sharp_limit ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , limit) ; } } # [doc = "The texture used for the line's texture. Uses `texture_mode` for drawing style."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The style to render the `texture` on the line. Use [enum LineTextureMode] constants."] # [doc = ""] # [inline] pub fn set_texture_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_texture_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The line's width."] # [doc = ""] # [inline] pub fn set_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Line2D { } unsafe impl GodotObject for Line2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Line2D" } } impl QueueFree for Line2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Line2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Line2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Line2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Line2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Line2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Line2D { } impl Instanciable for Line2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Line2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Line2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_begin_cap_mode : * mut sys :: godot_method_bind , pub get_curve : * mut sys :: godot_method_bind , pub get_default_color : * mut sys :: godot_method_bind , pub get_end_cap_mode : * mut sys :: godot_method_bind , pub get_gradient : * mut sys :: godot_method_bind , pub get_joint_mode : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub get_round_precision : * mut sys :: godot_method_bind , pub get_sharp_limit : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_mode : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_begin_cap_mode : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind , pub set_default_color : * mut sys :: godot_method_bind , pub set_end_cap_mode : * mut sys :: godot_method_bind , pub set_gradient : * mut sys :: godot_method_bind , pub set_joint_mode : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind , pub set_round_precision : * mut sys :: godot_method_bind , pub set_sharp_limit : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_mode : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl Line2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Line2DMethodTable = Line2DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_begin_cap_mode : 0 as * mut sys :: godot_method_bind , get_curve : 0 as * mut sys :: godot_method_bind , get_default_color : 0 as * mut sys :: godot_method_bind , get_end_cap_mode : 0 as * mut sys :: godot_method_bind , get_gradient : 0 as * mut sys :: godot_method_bind , get_joint_mode : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , get_round_precision : 0 as * mut sys :: godot_method_bind , get_sharp_limit : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_mode : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_begin_cap_mode : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind , set_default_color : 0 as * mut sys :: godot_method_bind , set_end_cap_mode : 0 as * mut sys :: godot_method_bind , set_gradient : 0 as * mut sys :: godot_method_bind , set_joint_mode : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind , set_round_precision : 0 as * mut sys :: godot_method_bind , set_sharp_limit : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_mode : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Line2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Line2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_begin_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_begin_cap_mode\0" . as_ptr () as * const c_char) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . get_default_color = (gd_api . godot_method_bind_get_method) (class_name , "get_default_color\0" . as_ptr () as * const c_char) ; table . get_end_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_end_cap_mode\0" . as_ptr () as * const c_char) ; table . get_gradient = (gd_api . godot_method_bind_get_method) (class_name , "get_gradient\0" . as_ptr () as * const c_char) ; table . get_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_mode\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . get_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_round_precision\0" . as_ptr () as * const c_char) ; table . get_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_sharp_limit\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_mode\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_begin_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_begin_cap_mode\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; table . set_default_color = (gd_api . godot_method_bind_get_method) (class_name , "set_default_color\0" . as_ptr () as * const c_char) ; table . set_end_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_end_cap_mode\0" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\0" . as_ptr () as * const c_char) ; table . set_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_mode\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; table . set_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_round_precision\0" . as_ptr () as * const c_char) ; table . set_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_sharp_limit\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_mode\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:370:12623 [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 Physics2DShapeQueryParameters` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dshapequeryparameters.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DShapeQueryParameters inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DShapeQueryParameters { this : RawObject < Self > , } impl Physics2DShapeQueryParameters { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Physics2DShapeQueryParametersMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The list of objects or object [RID]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn exclude (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_exclude ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The motion of the shape being queried for."] # [doc = ""] # [inline] pub fn motion (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_motion ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The queried shape's [RID]. See also [method set_shape]."] # [doc = ""] # [inline] pub fn shape_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_shape_rid ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the query will take [Area2D]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [PhysicsBody2D]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the query will take [Area2D]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the query will take [PhysicsBody2D]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "The list of objects or object [RID]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn set_exclude (& self , exclude : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_exclude ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , exclude) ; } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The motion of the shape being queried for."] # [doc = ""] # [inline] pub fn set_motion (& self , motion : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_motion ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , motion) ; } } # [doc = "Sets the [Shape2D] that will be used for collision/intersection queries."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "The queried shape's [RID]. See also [method set_shape]."] # [doc = ""] # [inline] pub fn set_shape_rid (& self , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_shape_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DShapeQueryParameters { } unsafe impl GodotObject for Physics2DShapeQueryParameters { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DShapeQueryParameters" } } impl std :: ops :: Deref for Physics2DShapeQueryParameters { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DShapeQueryParameters { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DShapeQueryParameters { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DShapeQueryParameters { } impl Instanciable for Physics2DShapeQueryParameters { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Physics2DShapeQueryParameters :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DShapeQueryParametersMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_exclude : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_motion : * mut sys :: godot_method_bind , pub get_shape_rid : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_exclude : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_motion : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind , pub set_shape_rid : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl Physics2DShapeQueryParametersMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DShapeQueryParametersMethodTable = Physics2DShapeQueryParametersMethodTable { class_constructor : None , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_exclude : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_motion : 0 as * mut sys :: godot_method_bind , get_shape_rid : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_exclude : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_motion : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind , set_shape_rid : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Physics2DShapeQueryParametersMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DShapeQueryParameters\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_exclude = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\0" . as_ptr () as * const c_char) ; table . get_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_rid\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_exclude = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_motion = (gd_api . godot_method_bind_get_method) (class_name , "set_motion\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; table . set_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_rid\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:376:8647 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:382:3826 [INFO] [stdout] | [INFO] [stdout] 382 | ...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] 382 | # [doc = "`core class VisualShaderNodeVectorRefract` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorrefract.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorRefract inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorRefract { this : RawObject < Self > , } impl VisualShaderNodeVectorRefract { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorRefractMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorRefract { } unsafe impl GodotObject for VisualShaderNodeVectorRefract { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorRefract" } } impl std :: ops :: Deref for VisualShaderNodeVectorRefract { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorRefract { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorRefract { } impl Instanciable for VisualShaderNodeVectorRefract { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorRefract :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorRefractMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorRefractMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorRefractMethodTable = VisualShaderNodeVectorRefractMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeVectorRefractMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorRefract\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:394:7031 [INFO] [stdout] | [INFO] [stdout] 394 | ... : 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] 394 | # [doc = "`core class ShaderMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_shadermaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShaderMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ShaderMaterial { this : RawObject < Self > , } impl ShaderMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ShaderMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [Shader] program used to render this material."] # [doc = ""] # [inline] pub fn shader (& self) -> Option < Ref < crate :: generated :: shader :: Shader , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . get_shader ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shader :: Shader , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the current value set for this material of a uniform in the shader."] # [doc = ""] # [inline] pub fn get_shader_param (& self , param : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . get_shader_param ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns `true` if the property identified by `name` can be reverted to a default value."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the default value of the material property with given `name`."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "The [Shader] program used to render this material."] # [doc = ""] # [inline] pub fn set_shader (& self , shader : impl AsArg < crate :: generated :: shader :: Shader >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . set_shader ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shader . as_arg_ptr ()) ; } } # [doc = "Changes the value set for this material of a uniform in the shader. **Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn set_shader_param (& self , param : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . set_shader_param ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , param . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ShaderMaterial { } unsafe impl GodotObject for ShaderMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ShaderMaterial" } } impl std :: ops :: Deref for ShaderMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ShaderMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for ShaderMaterial { } impl Instanciable for ShaderMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ShaderMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShaderMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shader : * mut sys :: godot_method_bind , pub get_shader_param : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub set_shader : * mut sys :: godot_method_bind , pub set_shader_param : * mut sys :: godot_method_bind } impl ShaderMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShaderMaterialMethodTable = ShaderMaterialMethodTable { class_constructor : None , get_shader : 0 as * mut sys :: godot_method_bind , get_shader_param : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , set_shader : 0 as * mut sys :: godot_method_bind , set_shader_param : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ShaderMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ShaderMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shader = (gd_api . godot_method_bind_get_method) (class_name , "get_shader\0" . as_ptr () as * const c_char) ; table . get_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "get_shader_param\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . set_shader = (gd_api . godot_method_bind_get_method) (class_name , "set_shader\0" . as_ptr () as * const c_char) ; table . set_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_param\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:400:4329 [INFO] [stdout] | [INFO] [stdout] 400 | ... : 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] 400 | # [doc = "`core class VideoStreamWebm` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_videostreamwebm.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamWebm inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamWebm { this : RawObject < Self > , } impl VideoStreamWebm { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamWebmMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamWebmMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamWebmMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamWebm { } unsafe impl GodotObject for VideoStreamWebm { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamWebm" } } impl std :: ops :: Deref for VideoStreamWebm { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamWebm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamWebm { } impl Instanciable for VideoStreamWebm { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VideoStreamWebm :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamWebmMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamWebmMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamWebmMethodTable = VideoStreamWebmMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VideoStreamWebmMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamWebm\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:406:7698 [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 CameraFeed` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_camerafeed.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCameraFeed inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraFeed { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedDataType (pub i64) ; impl FeedDataType { pub const NOIMAGE : FeedDataType = FeedDataType (0i64) ; pub const RGB : FeedDataType = FeedDataType (1i64) ; pub const YCBCR : FeedDataType = FeedDataType (2i64) ; pub const YCBCR_SEP : FeedDataType = FeedDataType (3i64) ; } impl From < i64 > for FeedDataType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedDataType > for i64 { # [inline] fn from (v : FeedDataType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedPosition (pub i64) ; impl FeedPosition { pub const UNSPECIFIED : FeedPosition = FeedPosition (0i64) ; pub const FRONT : FeedPosition = FeedPosition (1i64) ; pub const BACK : FeedPosition = FeedPosition (2i64) ; } impl From < i64 > for FeedPosition { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedPosition > for i64 { # [inline] fn from (v : FeedPosition) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraFeed { pub const FEED_BACK : i64 = 2i64 ; pub const FEED_FRONT : i64 = 1i64 ; pub const FEED_NOIMAGE : i64 = 0i64 ; pub const FEED_RGB : i64 = 1i64 ; pub const FEED_UNSPECIFIED : i64 = 0i64 ; pub const FEED_YCBCR : i64 = 2i64 ; pub const FEED_YCBCR_SEP : i64 = 3i64 ; } impl CameraFeed { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CameraFeedMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the unique ID for this feed."] # [doc = ""] # [inline] pub fn get_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the camera's name."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the position of camera on the device."] # [doc = ""] # [inline] pub fn get_position (& self) -> crate :: generated :: camera_feed :: FeedPosition { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_feed :: FeedPosition (ret) } } # [doc = "The transform applied to the camera's image."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the feed is active."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the feed is active."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "The transform applied to the camera's image."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraFeed { } unsafe impl GodotObject for CameraFeed { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraFeed" } } impl std :: ops :: Deref for CameraFeed { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraFeed { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CameraFeed { } unsafe impl SubClass < crate :: generated :: object :: Object > for CameraFeed { } impl Instanciable for CameraFeed { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CameraFeed :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraFeedMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_id : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl CameraFeedMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraFeedMethodTable = CameraFeedMethodTable { class_constructor : None , get_id : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CameraFeedMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraFeed\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:412:8276 [INFO] [stdout] | [INFO] [stdout] 412 | ... : 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] 412 | # [doc = "`core class SliderJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_sliderjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SliderJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSliderJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SliderJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const LINEAR_LIMIT_UPPER : Param = Param (0i64) ; pub const LINEAR_LIMIT_LOWER : Param = Param (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : Param = Param (2i64) ; pub const LINEAR_LIMIT_RESTITUTION : Param = Param (3i64) ; pub const LINEAR_LIMIT_DAMPING : Param = Param (4i64) ; pub const LINEAR_MOTION_SOFTNESS : Param = Param (5i64) ; pub const LINEAR_MOTION_RESTITUTION : Param = Param (6i64) ; pub const LINEAR_MOTION_DAMPING : Param = Param (7i64) ; pub const LINEAR_ORTHOGONAL_SOFTNESS : Param = Param (8i64) ; pub const LINEAR_ORTHOGONAL_RESTITUTION : Param = Param (9i64) ; pub const LINEAR_ORTHOGONAL_DAMPING : Param = Param (10i64) ; pub const ANGULAR_LIMIT_UPPER : Param = Param (11i64) ; pub const ANGULAR_LIMIT_LOWER : Param = Param (12i64) ; pub const ANGULAR_LIMIT_SOFTNESS : Param = Param (13i64) ; pub const ANGULAR_LIMIT_RESTITUTION : Param = Param (14i64) ; pub const ANGULAR_LIMIT_DAMPING : Param = Param (15i64) ; pub const ANGULAR_MOTION_SOFTNESS : Param = Param (16i64) ; pub const ANGULAR_MOTION_RESTITUTION : Param = Param (17i64) ; pub const ANGULAR_MOTION_DAMPING : Param = Param (18i64) ; pub const ANGULAR_ORTHOGONAL_SOFTNESS : Param = Param (19i64) ; pub const ANGULAR_ORTHOGONAL_RESTITUTION : Param = Param (20i64) ; pub const ANGULAR_ORTHOGONAL_DAMPING : Param = Param (21i64) ; pub const MAX : Param = Param (22i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SliderJoint { pub const PARAM_ANGULAR_LIMIT_DAMPING : i64 = 15i64 ; pub const PARAM_ANGULAR_LIMIT_LOWER : i64 = 12i64 ; pub const PARAM_ANGULAR_LIMIT_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 13i64 ; pub const PARAM_ANGULAR_LIMIT_UPPER : i64 = 11i64 ; pub const PARAM_ANGULAR_MOTION_DAMPING : i64 = 18i64 ; pub const PARAM_ANGULAR_MOTION_RESTITUTION : i64 = 17i64 ; pub const PARAM_ANGULAR_MOTION_SOFTNESS : i64 = 16i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_DAMPING : i64 = 21i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_RESTITUTION : i64 = 20i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_SOFTNESS : i64 = 19i64 ; pub const PARAM_LINEAR_LIMIT_DAMPING : i64 = 4i64 ; pub const PARAM_LINEAR_LIMIT_LOWER : i64 = 1i64 ; pub const PARAM_LINEAR_LIMIT_RESTITUTION : i64 = 3i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const PARAM_LINEAR_LIMIT_UPPER : i64 = 0i64 ; pub const PARAM_LINEAR_MOTION_DAMPING : i64 = 7i64 ; pub const PARAM_LINEAR_MOTION_RESTITUTION : i64 = 6i64 ; pub const PARAM_LINEAR_MOTION_SOFTNESS : i64 = 5i64 ; pub const PARAM_LINEAR_ORTHOGONAL_DAMPING : i64 = 10i64 ; pub const PARAM_LINEAR_ORTHOGONAL_RESTITUTION : i64 = 9i64 ; pub const PARAM_LINEAR_ORTHOGONAL_SOFTNESS : i64 = 8i64 ; pub const PARAM_MAX : i64 = 22i64 ; } impl SliderJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SliderJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A factor applied to the movement across axes orthogonal to the slider."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "A factor applied to the movement across axes orthogonal to the slider."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SliderJoint { } unsafe impl GodotObject for SliderJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SliderJoint" } } impl QueueFree for SliderJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SliderJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SliderJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for SliderJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SliderJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for SliderJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for SliderJoint { } impl Instanciable for SliderJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SliderJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SliderJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl SliderJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SliderJointMethodTable = SliderJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SliderJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SliderJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:418:8516 [INFO] [stdout] | [INFO] [stdout] 418 | ... : 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] 418 | # [doc = "`core class JSONRPC` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_jsonrpc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`JSONRPC` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nJSONRPC inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JSONRPC { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ErrorCode (pub i64) ; impl ErrorCode { pub const PARSE_ERROR : ErrorCode = ErrorCode (- 32700i64) ; pub const INTERNAL_ERROR : ErrorCode = ErrorCode (- 32603i64) ; pub const INVALID_PARAMS : ErrorCode = ErrorCode (- 32602i64) ; pub const METHOD_NOT_FOUND : ErrorCode = ErrorCode (- 32601i64) ; pub const INVALID_REQUEST : ErrorCode = ErrorCode (- 32600i64) ; } impl From < i64 > for ErrorCode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ErrorCode > for i64 { # [inline] fn from (v : ErrorCode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl JSONRPC { pub const INTERNAL_ERROR : i64 = - 32603i64 ; pub const INVALID_PARAMS : i64 = - 32602i64 ; pub const INVALID_REQUEST : i64 = - 32600i64 ; pub const METHOD_NOT_FOUND : i64 = - 32601i64 ; pub const PARSE_ERROR : i64 = - 32700i64 ; } impl JSONRPC { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = JSONRPCMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn make_notification (& self , method : impl Into < GodotString > , params : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_notification ; let ret = crate :: icalls :: icallptr_dict_str_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn make_request (& self , method : impl Into < GodotString > , params : impl OwnedToVariant , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_request ; let ret = crate :: icalls :: icallptr_dict_str_var_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn make_response (& self , result : impl OwnedToVariant , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_response ; let ret = crate :: icalls :: icallptr_dict_var_var (method_bind , self . this . sys () . as_ptr () , result . owned_to_variant () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = "\n# Default Arguments\n* `id` - `null`"] # [doc = ""] # [inline] pub fn make_response_error (& self , code : i64 , message : impl Into < GodotString > , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_response_error ; let ret = crate :: icalls :: icallptr_dict_i64_str_var (method_bind , self . this . sys () . as_ptr () , code , message . into () , id . owned_to_variant ()) ; Dictionary :: from_sys (ret) } } # [doc = "\n# Default Arguments\n* `recurse` - `false`"] # [doc = ""] # [inline] pub fn process_action (& self , action : impl OwnedToVariant , recurse : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . process_action ; let ret = crate :: icalls :: icallptr_var_var_bool (method_bind , self . this . sys () . as_ptr () , action . owned_to_variant () , recurse) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn process_string (& self , action : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . process_string ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_scope (& self , scope : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . set_scope ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , scope . into () , target . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for JSONRPC { } unsafe impl GodotObject for JSONRPC { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSONRPC" } } impl std :: ops :: Deref for JSONRPC { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSONRPC { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for JSONRPC { } impl Instanciable for JSONRPC { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { JSONRPC :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JSONRPCMethodTable { pub class_constructor : sys :: godot_class_constructor , pub make_notification : * mut sys :: godot_method_bind , pub make_request : * mut sys :: godot_method_bind , pub make_response : * mut sys :: godot_method_bind , pub make_response_error : * mut sys :: godot_method_bind , pub process_action : * mut sys :: godot_method_bind , pub process_string : * mut sys :: godot_method_bind , pub set_scope : * mut sys :: godot_method_bind } impl JSONRPCMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JSONRPCMethodTable = JSONRPCMethodTable { class_constructor : None , make_notification : 0 as * mut sys :: godot_method_bind , make_request : 0 as * mut sys :: godot_method_bind , make_response : 0 as * mut sys :: godot_method_bind , make_response_error : 0 as * mut sys :: godot_method_bind , process_action : 0 as * mut sys :: godot_method_bind , process_string : 0 as * mut sys :: godot_method_bind , set_scope : 0 as * mut sys :: godot_method_bind } ; &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 (|| { JSONRPCMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JSONRPC\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . make_notification = (gd_api . godot_method_bind_get_method) (class_name , "make_notification\0" . as_ptr () as * const c_char) ; table . make_request = (gd_api . godot_method_bind_get_method) (class_name , "make_request\0" . as_ptr () as * const c_char) ; table . make_response = (gd_api . godot_method_bind_get_method) (class_name , "make_response\0" . as_ptr () as * const c_char) ; table . make_response_error = (gd_api . godot_method_bind_get_method) (class_name , "make_response_error\0" . as_ptr () as * const c_char) ; table . process_action = (gd_api . godot_method_bind_get_method) (class_name , "process_action\0" . as_ptr () as * const c_char) ; table . process_string = (gd_api . godot_method_bind_get_method) (class_name , "process_string\0" . as_ptr () as * const c_char) ; table . set_scope = (gd_api . godot_method_bind_get_method) (class_name , "set_scope\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:424:4369 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:430:7494 [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 = "`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-9b9d3e6ddcc0e9b9/out/generated.rs:436:9557 [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 PacketPeer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packetpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeer { this : RawObject < Self > , } impl PacketPeer { # [doc = "Returns the number of packets currently available in the ring-buffer."] # [doc = ""] # [inline] pub fn get_available_packet_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_available_packet_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn encode_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_encode_buffer_max_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a raw packet."] # [doc = ""] # [inline] pub fn get_packet (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the error state of the last packet received (via [method get_packet] and [method get_var])."] # [doc = ""] # [inline] pub fn get_packet_error (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet_error ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Gets a Variant. If `allow_objects` (or [member allow_object_decoding]) is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sends a raw packet."] # [doc = ""] # [inline] pub fn put_packet (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_packet ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sends a [Variant] as a packet. If `full_objects` (or [member allow_object_decoding]) is `true`, encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn put_var (& self , var : impl OwnedToVariant , full_objects : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_var ; let ret = crate :: icalls :: icallptr_i64_var_bool (method_bind , self . this . sys () . as_ptr () , var . owned_to_variant () , full_objects) ; GodotError :: result_from_sys (ret as _) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn set_encode_buffer_max_size (& self , max_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_encode_buffer_max_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeer { } unsafe impl GodotObject for PacketPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeer" } } impl std :: ops :: Deref for PacketPeer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_available_packet_count : * mut sys :: godot_method_bind , pub get_encode_buffer_max_size : * mut sys :: godot_method_bind , pub get_packet : * mut sys :: godot_method_bind , pub get_packet_error : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub put_packet : * mut sys :: godot_method_bind , pub put_var : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_encode_buffer_max_size : * mut sys :: godot_method_bind } impl PacketPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerMethodTable = PacketPeerMethodTable { class_constructor : None , get_available_packet_count : 0 as * mut sys :: godot_method_bind , get_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_packet : 0 as * mut sys :: godot_method_bind , get_packet_error : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , put_packet : 0 as * mut sys :: godot_method_bind , put_var : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind } ; &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 (|| { PacketPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_available_packet_count = (gd_api . godot_method_bind_get_method) (class_name , "get_available_packet_count\0" . as_ptr () as * const c_char) ; table . get_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_packet = (gd_api . godot_method_bind_get_method) (class_name , "get_packet\0" . as_ptr () as * const c_char) ; table . get_packet_error = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_error\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . put_packet = (gd_api . godot_method_bind_get_method) (class_name , "put_packet\0" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:442:40072 [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 = "`core class RichTextLabel` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_richtextlabel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RichTextLabel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRichTextLabel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RichTextLabel { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ItemType (pub i64) ; impl ItemType { pub const FRAME : ItemType = ItemType (0i64) ; pub const TEXT : ItemType = ItemType (1i64) ; pub const IMAGE : ItemType = ItemType (2i64) ; pub const NEWLINE : ItemType = ItemType (3i64) ; pub const FONT : ItemType = ItemType (4i64) ; pub const COLOR : ItemType = ItemType (5i64) ; pub const UNDERLINE : ItemType = ItemType (6i64) ; pub const STRIKETHROUGH : ItemType = ItemType (7i64) ; pub const ALIGN : ItemType = ItemType (8i64) ; pub const INDENT : ItemType = ItemType (9i64) ; pub const LIST : ItemType = ItemType (10i64) ; pub const TABLE : ItemType = ItemType (11i64) ; pub const FADE : ItemType = ItemType (12i64) ; pub const SHAKE : ItemType = ItemType (13i64) ; pub const WAVE : ItemType = ItemType (14i64) ; pub const TORNADO : ItemType = ItemType (15i64) ; pub const RAINBOW : ItemType = ItemType (16i64) ; pub const META : ItemType = ItemType (17i64) ; pub const CUSTOMFX : ItemType = ItemType (18i64) ; } impl From < i64 > for ItemType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ItemType > for i64 { # [inline] fn from (v : ItemType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ListType (pub i64) ; impl ListType { pub const NUMBERS : ListType = ListType (0i64) ; pub const LETTERS : ListType = ListType (1i64) ; pub const DOTS : ListType = ListType (2i64) ; } impl From < i64 > for ListType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ListType > for i64 { # [inline] fn from (v : ListType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RichTextLabel { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const ITEM_ALIGN : i64 = 8i64 ; pub const ITEM_COLOR : i64 = 5i64 ; pub const ITEM_CUSTOMFX : i64 = 18i64 ; pub const ITEM_FADE : i64 = 12i64 ; pub const ITEM_FONT : i64 = 4i64 ; pub const ITEM_FRAME : i64 = 0i64 ; pub const ITEM_IMAGE : i64 = 2i64 ; pub const ITEM_INDENT : i64 = 9i64 ; pub const ITEM_LIST : i64 = 10i64 ; pub const ITEM_META : i64 = 17i64 ; pub const ITEM_NEWLINE : i64 = 3i64 ; pub const ITEM_RAINBOW : i64 = 16i64 ; pub const ITEM_SHAKE : i64 = 13i64 ; pub const ITEM_STRIKETHROUGH : i64 = 7i64 ; pub const ITEM_TABLE : i64 = 11i64 ; pub const ITEM_TEXT : i64 = 1i64 ; pub const ITEM_TORNADO : i64 = 15i64 ; pub const ITEM_UNDERLINE : i64 = 6i64 ; pub const ITEM_WAVE : i64 = 14i64 ; pub const LIST_DOTS : i64 = 2i64 ; pub const LIST_LETTERS : i64 = 1i64 ; pub const LIST_NUMBERS : i64 = 0i64 ; } impl RichTextLabel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RichTextLabelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an image's opening and closing tags to the tag stack, optionally providing a `width` and `height` to resize the image.\nIf `width` or `height` is set to 0, the image size will be adjusted in order to keep the original aspect ratio.\n# Default Arguments\n* `width` - `0`\n* `height` - `0`"] # [doc = ""] # [inline] pub fn add_image (& self , image : impl AsArg < crate :: generated :: texture :: Texture > , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_image ; let ret = crate :: icalls :: icallptr_void_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , width , height) ; } } # [doc = "Adds raw non-BBCode-parsed text to the tag stack."] # [doc = ""] # [inline] pub fn add_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Parses `bbcode` and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful."] # [doc = ""] # [inline] pub fn append_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . append_bbcode ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Clears the tag stack and sets [member bbcode_text] to an empty string."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [doc = ""] # [inline] pub fn bbcode (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_bbcode ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the height of the content."] # [doc = ""] # [inline] pub fn get_content_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_content_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method install_effect]."] # [doc = ""] # [inline] pub fn effects (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_effects ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [member visible_characters] based on current [method get_total_character_count]."] # [doc = ""] # [inline] pub fn percent_visible (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_percent_visible ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn tab_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_tab_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the total number of characters from text tags. Does not include BBCodes."] # [doc = ""] # [inline] pub fn get_total_character_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_total_character_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the vertical scrollbar."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [doc = ""] # [inline] pub fn visible_characters (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_characters ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of visible lines."] # [doc = ""] # [inline] pub fn get_visible_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_line_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Installs a custom effect. `effect` should be a valid [RichTextEffect]."] # [doc = ""] # [inline] pub fn install_effect (& self , effect : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . install_effect ; let ret = crate :: icalls :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , effect . owned_to_variant ()) ; } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn is_fit_content_height_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_fit_content_height_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label underlines meta tags such as `[url]{text}[/url]`."] # [doc = ""] # [inline] pub fn is_meta_underlined (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_meta_underlined ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn is_overriding_selected_font_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_overriding_selected_font_color ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method scroll_to_line]."] # [doc = ""] # [inline] pub fn is_scroll_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn is_scroll_following (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_following ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn is_selection_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_selection_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label uses BBCode formatting."] # [doc = ""] # [inline] pub fn is_using_bbcode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_using_bbcode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adds a newline tag to the tag stack."] # [doc = ""] # [inline] pub fn newline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . newline ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses `bbcode` successfully."] # [doc = ""] # [inline] pub fn parse_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_bbcode ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Parses BBCode parameter `expressions` into a dictionary."] # [doc = ""] # [inline] pub fn parse_expressions_for_values (& self , expressions : StringArray) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_expressions_for_values ; let ret = crate :: icalls :: icallptr_dict_strarr (method_bind , self . this . sys () . as_ptr () , expressions) ; Dictionary :: from_sys (ret) } } # [doc = "Terminates the current tag. Use after `push_*` methods to close BBCodes manually. Does not need to follow `add_*` methods."] # [doc = ""] # [inline] pub fn pop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . pop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds an `[align]` tag based on the given `align` value. See [enum Align] for possible values."] # [doc = ""] # [inline] pub fn push_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "Adds a `[font]` tag with a bold font to the tag stack. This is the same as adding a `**` tag if not currently in a `[i]` tag."] # [doc = ""] # [inline] pub fn push_bold (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[font]` tag with a bold italics font to the tag stack."] # [doc = ""] # [inline] pub fn push_bold_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold_italics ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[cell]` tag to the tag stack. Must be inside a `[table]` tag. See [method push_table] for details."] # [doc = ""] # [inline] pub fn push_cell (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_cell ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[color]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds a `[font]` tag to the tag stack. Overrides default fonts for its duration."] # [doc = ""] # [inline] pub fn push_font (& self , font : impl AsArg < crate :: generated :: font :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_font ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Adds an `[indent]` tag to the tag stack. Multiplies `level` by current [member tab_size] to determine new margin length."] # [doc = ""] # [inline] pub fn push_indent (& self , level : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_indent ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , level) ; } } # [doc = "Adds a `[font]` tag with a italics font to the tag stack. This is the same as adding a `[i]` tag if not currently in a `**` tag."] # [doc = ""] # [inline] pub fn push_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_italics ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[list]` tag to the tag stack. Similar to the BBCodes `[ol]` or `[ul]`, but supports more list types. Not fully implemented!"] # [doc = ""] # [inline] pub fn push_list (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_list ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [doc = "Adds a `[meta]` tag to the tag stack. Similar to the BBCode `[url=something]{text}[/url]`, but supports non-[String] metadata types."] # [doc = ""] # [inline] pub fn push_meta (& self , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_meta ; let ret = crate :: icalls :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant ()) ; } } # [doc = "Adds a `[font]` tag with a monospace font to the tag stack."] # [doc = ""] # [inline] pub fn push_mono (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_mono ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[font]` tag with a normal font to the tag stack."] # [doc = ""] # [inline] pub fn push_normal (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_normal ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[s]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_strikethrough (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_strikethrough ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[table=columns]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_table (& self , columns : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_table ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , columns) ; } } # [doc = "Adds a `[u]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_underline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_underline ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a line of content from the label. Returns `true` if the line exists.\nThe `line` argument is the index of the line to remove, it can take values in the interval `[0, get_line_count() - 1]`."] # [doc = ""] # [inline] pub fn remove_line (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . remove_line ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = "Scrolls the window's top line to match `line`."] # [doc = ""] # [inline] pub fn scroll_to_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . scroll_to_line ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [doc = ""] # [inline] pub fn set_bbcode (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_bbcode ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method install_effect]."] # [doc = ""] # [inline] pub fn set_effects (& self , effects : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_effects ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , effects) ; } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn set_fit_content_height (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_fit_content_height ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the label underlines meta tags such as `[url]{text}[/url]`."] # [doc = ""] # [inline] pub fn set_meta_underline (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_meta_underline ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn set_override_selected_font_color (& self , _override : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_override_selected_font_color ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = "The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [member visible_characters] based on current [method get_total_character_count]."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , percent_visible : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , percent_visible) ; } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method scroll_to_line]."] # [doc = ""] # [inline] pub fn set_scroll_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn set_scroll_follow (& self , follow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_follow ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , follow) ; } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn set_selection_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_selection_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn set_tab_size (& self , spaces : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_tab_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , spaces) ; } } # [doc = "Edits the selected column's expansion options. If `expand` is `true`, the column expands in proportion to its expansion ratio versus the other columns' ratios.\nFor example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.\nIf `expand` is `false`, the column will not contribute to the total ratio."] # [doc = ""] # [inline] pub fn set_table_column_expand (& self , column : i64 , expand : bool , ratio : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_table_column_expand ; let ret = crate :: icalls :: icallptr_void_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , column , expand , ratio) ; } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the label uses BBCode formatting."] # [doc = ""] # [inline] pub fn set_use_bbcode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_use_bbcode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [doc = ""] # [inline] pub fn set_visible_characters (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_visible_characters ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextLabel { } unsafe impl GodotObject for RichTextLabel { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RichTextLabel" } } impl QueueFree for RichTextLabel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RichTextLabel { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextLabel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: node :: Node > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: object :: Object > for RichTextLabel { } impl Instanciable for RichTextLabel { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RichTextLabel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RichTextLabelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_image : * mut sys :: godot_method_bind , pub add_text : * mut sys :: godot_method_bind , pub append_bbcode : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_bbcode : * mut sys :: godot_method_bind , pub get_content_height : * mut sys :: godot_method_bind , pub get_effects : * mut sys :: godot_method_bind , pub get_line_count : * mut sys :: godot_method_bind , pub get_percent_visible : * mut sys :: godot_method_bind , pub get_tab_size : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_total_character_count : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub get_visible_characters : * mut sys :: godot_method_bind , pub get_visible_line_count : * mut sys :: godot_method_bind , pub install_effect : * mut sys :: godot_method_bind , pub is_fit_content_height_enabled : * mut sys :: godot_method_bind , pub is_meta_underlined : * mut sys :: godot_method_bind , pub is_overriding_selected_font_color : * mut sys :: godot_method_bind , pub is_scroll_active : * mut sys :: godot_method_bind , pub is_scroll_following : * mut sys :: godot_method_bind , pub is_selection_enabled : * mut sys :: godot_method_bind , pub is_using_bbcode : * mut sys :: godot_method_bind , pub newline : * mut sys :: godot_method_bind , pub parse_bbcode : * mut sys :: godot_method_bind , pub parse_expressions_for_values : * mut sys :: godot_method_bind , pub pop : * mut sys :: godot_method_bind , pub push_align : * mut sys :: godot_method_bind , pub push_bold : * mut sys :: godot_method_bind , pub push_bold_italics : * mut sys :: godot_method_bind , pub push_cell : * mut sys :: godot_method_bind , pub push_color : * mut sys :: godot_method_bind , pub push_font : * mut sys :: godot_method_bind , pub push_indent : * mut sys :: godot_method_bind , pub push_italics : * mut sys :: godot_method_bind , pub push_list : * mut sys :: godot_method_bind , pub push_meta : * mut sys :: godot_method_bind , pub push_mono : * mut sys :: godot_method_bind , pub push_normal : * mut sys :: godot_method_bind , pub push_strikethrough : * mut sys :: godot_method_bind , pub push_table : * mut sys :: godot_method_bind , pub push_underline : * mut sys :: godot_method_bind , pub remove_line : * mut sys :: godot_method_bind , pub scroll_to_line : * mut sys :: godot_method_bind , pub set_bbcode : * mut sys :: godot_method_bind , pub set_effects : * mut sys :: godot_method_bind , pub set_fit_content_height : * mut sys :: godot_method_bind , pub set_meta_underline : * mut sys :: godot_method_bind , pub set_override_selected_font_color : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind , pub set_scroll_active : * mut sys :: godot_method_bind , pub set_scroll_follow : * mut sys :: godot_method_bind , pub set_selection_enabled : * mut sys :: godot_method_bind , pub set_tab_size : * mut sys :: godot_method_bind , pub set_table_column_expand : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_use_bbcode : * mut sys :: godot_method_bind , pub set_visible_characters : * mut sys :: godot_method_bind } impl RichTextLabelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RichTextLabelMethodTable = RichTextLabelMethodTable { class_constructor : None , add_image : 0 as * mut sys :: godot_method_bind , add_text : 0 as * mut sys :: godot_method_bind , append_bbcode : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_bbcode : 0 as * mut sys :: godot_method_bind , get_content_height : 0 as * mut sys :: godot_method_bind , get_effects : 0 as * mut sys :: godot_method_bind , get_line_count : 0 as * mut sys :: godot_method_bind , get_percent_visible : 0 as * mut sys :: godot_method_bind , get_tab_size : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_total_character_count : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , get_visible_characters : 0 as * mut sys :: godot_method_bind , get_visible_line_count : 0 as * mut sys :: godot_method_bind , install_effect : 0 as * mut sys :: godot_method_bind , is_fit_content_height_enabled : 0 as * mut sys :: godot_method_bind , is_meta_underlined : 0 as * mut sys :: godot_method_bind , is_overriding_selected_font_color : 0 as * mut sys :: godot_method_bind , is_scroll_active : 0 as * mut sys :: godot_method_bind , is_scroll_following : 0 as * mut sys :: godot_method_bind , is_selection_enabled : 0 as * mut sys :: godot_method_bind , is_using_bbcode : 0 as * mut sys :: godot_method_bind , newline : 0 as * mut sys :: godot_method_bind , parse_bbcode : 0 as * mut sys :: godot_method_bind , parse_expressions_for_values : 0 as * mut sys :: godot_method_bind , pop : 0 as * mut sys :: godot_method_bind , push_align : 0 as * mut sys :: godot_method_bind , push_bold : 0 as * mut sys :: godot_method_bind , push_bold_italics : 0 as * mut sys :: godot_method_bind , push_cell : 0 as * mut sys :: godot_method_bind , push_color : 0 as * mut sys :: godot_method_bind , push_font : 0 as * mut sys :: godot_method_bind , push_indent : 0 as * mut sys :: godot_method_bind , push_italics : 0 as * mut sys :: godot_method_bind , push_list : 0 as * mut sys :: godot_method_bind , push_meta : 0 as * mut sys :: godot_method_bind , push_mono : 0 as * mut sys :: godot_method_bind , push_normal : 0 as * mut sys :: godot_method_bind , push_strikethrough : 0 as * mut sys :: godot_method_bind , push_table : 0 as * mut sys :: godot_method_bind , push_underline : 0 as * mut sys :: godot_method_bind , remove_line : 0 as * mut sys :: godot_method_bind , scroll_to_line : 0 as * mut sys :: godot_method_bind , set_bbcode : 0 as * mut sys :: godot_method_bind , set_effects : 0 as * mut sys :: godot_method_bind , set_fit_content_height : 0 as * mut sys :: godot_method_bind , set_meta_underline : 0 as * mut sys :: godot_method_bind , set_override_selected_font_color : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind , set_scroll_active : 0 as * mut sys :: godot_method_bind , set_scroll_follow : 0 as * mut sys :: godot_method_bind , set_selection_enabled : 0 as * mut sys :: godot_method_bind , set_tab_size : 0 as * mut sys :: godot_method_bind , set_table_column_expand : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_use_bbcode : 0 as * mut sys :: godot_method_bind , set_visible_characters : 0 as * mut sys :: godot_method_bind } ; &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 (|| { RichTextLabelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RichTextLabel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_image = (gd_api . godot_method_bind_get_method) (class_name , "add_image\0" . as_ptr () as * const c_char) ; table . add_text = (gd_api . godot_method_bind_get_method) (class_name , "add_text\0" . as_ptr () as * const c_char) ; table . append_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "append_bbcode\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "get_bbcode\0" . as_ptr () as * const c_char) ; table . get_content_height = (gd_api . godot_method_bind_get_method) (class_name , "get_content_height\0" . as_ptr () as * const c_char) ; table . get_effects = (gd_api . godot_method_bind_get_method) (class_name , "get_effects\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\0" . as_ptr () as * const c_char) ; table . get_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_size\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_total_character_count = (gd_api . godot_method_bind_get_method) (class_name , "get_total_character_count\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\0" . as_ptr () as * const c_char) ; table . get_visible_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_line_count\0" . as_ptr () as * const c_char) ; table . install_effect = (gd_api . godot_method_bind_get_method) (class_name , "install_effect\0" . as_ptr () as * const c_char) ; table . is_fit_content_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fit_content_height_enabled\0" . as_ptr () as * const c_char) ; table . is_meta_underlined = (gd_api . godot_method_bind_get_method) (class_name , "is_meta_underlined\0" . as_ptr () as * const c_char) ; table . is_overriding_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_selected_font_color\0" . as_ptr () as * const c_char) ; table . is_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_active\0" . as_ptr () as * const c_char) ; table . is_scroll_following = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_following\0" . as_ptr () as * const c_char) ; table . is_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_enabled\0" . as_ptr () as * const c_char) ; table . is_using_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "is_using_bbcode\0" . as_ptr () as * const c_char) ; table . newline = (gd_api . godot_method_bind_get_method) (class_name , "newline\0" . as_ptr () as * const c_char) ; table . parse_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "parse_bbcode\0" . as_ptr () as * const c_char) ; table . parse_expressions_for_values = (gd_api . godot_method_bind_get_method) (class_name , "parse_expressions_for_values\0" . as_ptr () as * const c_char) ; table . pop = (gd_api . godot_method_bind_get_method) (class_name , "pop\0" . as_ptr () as * const c_char) ; table . push_align = (gd_api . godot_method_bind_get_method) (class_name , "push_align\0" . as_ptr () as * const c_char) ; table . push_bold = (gd_api . godot_method_bind_get_method) (class_name , "push_bold\0" . as_ptr () as * const c_char) ; table . push_bold_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_bold_italics\0" . as_ptr () as * const c_char) ; table . push_cell = (gd_api . godot_method_bind_get_method) (class_name , "push_cell\0" . as_ptr () as * const c_char) ; table . push_color = (gd_api . godot_method_bind_get_method) (class_name , "push_color\0" . as_ptr () as * const c_char) ; table . push_font = (gd_api . godot_method_bind_get_method) (class_name , "push_font\0" . as_ptr () as * const c_char) ; table . push_indent = (gd_api . godot_method_bind_get_method) (class_name , "push_indent\0" . as_ptr () as * const c_char) ; table . push_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_italics\0" . as_ptr () as * const c_char) ; table . push_list = (gd_api . godot_method_bind_get_method) (class_name , "push_list\0" . as_ptr () as * const c_char) ; table . push_meta = (gd_api . godot_method_bind_get_method) (class_name , "push_meta\0" . as_ptr () as * const c_char) ; table . push_mono = (gd_api . godot_method_bind_get_method) (class_name , "push_mono\0" . as_ptr () as * const c_char) ; table . push_normal = (gd_api . godot_method_bind_get_method) (class_name , "push_normal\0" . as_ptr () as * const c_char) ; table . push_strikethrough = (gd_api . godot_method_bind_get_method) (class_name , "push_strikethrough\0" . as_ptr () as * const c_char) ; table . push_table = (gd_api . godot_method_bind_get_method) (class_name , "push_table\0" . as_ptr () as * const c_char) ; table . push_underline = (gd_api . godot_method_bind_get_method) (class_name , "push_underline\0" . as_ptr () as * const c_char) ; table . remove_line = (gd_api . godot_method_bind_get_method) (class_name , "remove_line\0" . as_ptr () as * const c_char) ; table . scroll_to_line = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_line\0" . as_ptr () as * const c_char) ; table . set_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_bbcode\0" . as_ptr () as * const c_char) ; table . set_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_effects\0" . as_ptr () as * const c_char) ; table . set_fit_content_height = (gd_api . godot_method_bind_get_method) (class_name , "set_fit_content_height\0" . as_ptr () as * const c_char) ; table . set_meta_underline = (gd_api . godot_method_bind_get_method) (class_name , "set_meta_underline\0" . as_ptr () as * const c_char) ; table . set_override_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "set_override_selected_font_color\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; table . set_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_active\0" . as_ptr () as * const c_char) ; table . set_scroll_follow = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_follow\0" . as_ptr () as * const c_char) ; table . set_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selection_enabled\0" . as_ptr () as * const c_char) ; table . set_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_size\0" . as_ptr () as * const c_char) ; table . set_table_column_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_table_column_expand\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_use_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_use_bbcode\0" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:448:10664 [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 TextureRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texturerect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`TextureRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextureRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureRect { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const SCALE_ON_EXPAND : StretchMode = StretchMode (0i64) ; pub const SCALE : StretchMode = StretchMode (1i64) ; pub const TILE : StretchMode = StretchMode (2i64) ; pub const KEEP : StretchMode = StretchMode (3i64) ; pub const KEEP_CENTERED : StretchMode = StretchMode (4i64) ; pub const KEEP_ASPECT : StretchMode = StretchMode (5i64) ; pub const KEEP_ASPECT_CENTERED : StretchMode = StretchMode (6i64) ; pub const KEEP_ASPECT_COVERED : StretchMode = StretchMode (7i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureRect { pub const STRETCH_KEEP : i64 = 3i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 6i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 7i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 4i64 ; pub const STRETCH_SCALE : i64 = 1i64 ; pub const STRETCH_SCALE_ON_EXPAND : i64 = 0i64 ; pub const STRETCH_TILE : i64 = 2i64 ; } impl TextureRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]."] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: texture_rect :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: texture_rect :: StretchMode (ret) } } # [doc = "The node's [Texture] resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the texture scales to fit its bounding rectangle."] # [doc = ""] # [inline] pub fn has_expand (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . has_expand ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the texture scales to fit its bounding rectangle."] # [doc = ""] # [inline] pub fn set_expand (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_expand ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]."] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , stretch_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode) ; } } # [doc = "The node's [Texture] resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureRect { } unsafe impl GodotObject for TextureRect { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextureRect" } } impl QueueFree for TextureRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextureRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for TextureRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextureRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextureRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureRect { } impl Instanciable for TextureRect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { TextureRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_stretch_mode : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub has_expand : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub set_expand : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl TextureRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureRectMethodTable = TextureRectMethodTable { class_constructor : None , get_stretch_mode : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , has_expand : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , set_expand : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; &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 (|| { TextureRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:454:60563 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:460:14812 [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 ClippedCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_clippedcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ClippedCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nClippedCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ClippedCamera { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessMode (pub i64) ; impl ProcessMode { pub const PHYSICS : ProcessMode = ProcessMode (0i64) ; pub const IDLE : ProcessMode = ProcessMode (1i64) ; } impl From < i64 > for ProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessMode > for i64 { # [inline] fn from (v : ProcessMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ClippedCamera { pub const CLIP_PROCESS_IDLE : i64 = 1i64 ; pub const CLIP_PROCESS_PHYSICS : i64 = 0i64 ; } impl ClippedCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ClippedCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a collision exception so the camera does not collide with the specified node."] # [doc = ""] # [inline] pub fn add_exception (& self , node : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Adds a collision exception so the camera does not collide with the specified [RID]."] # [doc = ""] # [inline] pub fn add_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . add_exception_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Removes all collision exceptions."] # [doc = ""] # [inline] pub fn clear_exceptions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . clear_exceptions ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the distance the camera has been offset due to a collision."] # [doc = ""] # [inline] pub fn get_clip_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_clip_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the specified bit index is on.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The camera's collision margin. The camera can't get closer than this distance to a colliding object."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The camera's process callback. See [enum ProcessMode]."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: clipped_camera :: ProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: clipped_camera :: ProcessMode (ret) } } # [doc = "If `true`, the camera stops on contact with [Area]s."] # [doc = ""] # [inline] pub fn is_clip_to_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . is_clip_to_areas_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera stops on contact with [PhysicsBody]s."] # [doc = ""] # [inline] pub fn is_clip_to_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . is_clip_to_bodies_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a collision exception with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception with the specified [RID]."] # [doc = ""] # [inline] pub fn remove_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . remove_exception_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "If `true`, the camera stops on contact with [Area]s."] # [doc = ""] # [inline] pub fn set_clip_to_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_clip_to_areas ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the camera stops on contact with [PhysicsBody]s."] # [doc = ""] # [inline] pub fn set_clip_to_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_clip_to_bodies ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Sets the specified bit index to the `value`.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The camera's collision margin. The camera can't get closer than this distance to a colliding object."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The camera's process callback. See [enum ProcessMode]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , process_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , process_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ClippedCamera { } unsafe impl GodotObject for ClippedCamera { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ClippedCamera" } } impl QueueFree for ClippedCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ClippedCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClippedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for ClippedCamera { } impl Instanciable for ClippedCamera { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ClippedCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ClippedCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_exception : * mut sys :: godot_method_bind , pub add_exception_rid : * mut sys :: godot_method_bind , pub clear_exceptions : * mut sys :: godot_method_bind , pub get_clip_offset : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_process_mode : * mut sys :: godot_method_bind , pub is_clip_to_areas_enabled : * mut sys :: godot_method_bind , pub is_clip_to_bodies_enabled : * mut sys :: godot_method_bind , pub remove_exception : * mut sys :: godot_method_bind , pub remove_exception_rid : * mut sys :: godot_method_bind , pub set_clip_to_areas : * mut sys :: godot_method_bind , pub set_clip_to_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind } impl ClippedCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ClippedCameraMethodTable = ClippedCameraMethodTable { class_constructor : None , add_exception : 0 as * mut sys :: godot_method_bind , add_exception_rid : 0 as * mut sys :: godot_method_bind , clear_exceptions : 0 as * mut sys :: godot_method_bind , get_clip_offset : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_process_mode : 0 as * mut sys :: godot_method_bind , is_clip_to_areas_enabled : 0 as * mut sys :: godot_method_bind , is_clip_to_bodies_enabled : 0 as * mut sys :: godot_method_bind , remove_exception : 0 as * mut sys :: godot_method_bind , remove_exception_rid : 0 as * mut sys :: godot_method_bind , set_clip_to_areas : 0 as * mut sys :: godot_method_bind , set_clip_to_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ClippedCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ClippedCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_exception = (gd_api . godot_method_bind_get_method) (class_name , "add_exception\0" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\0" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\0" . as_ptr () as * const c_char) ; table . get_clip_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_offset\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . is_clip_to_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clip_to_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_clip_to_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clip_to_bodies_enabled\0" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\0" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\0" . as_ptr () as * const c_char) ; table . set_clip_to_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_to_areas\0" . as_ptr () as * const c_char) ; table . set_clip_to_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_to_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:466:13081 [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 ARVRInterface` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterface inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterface { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Capabilities (pub i64) ; impl Capabilities { pub const NONE : Capabilities = Capabilities (0i64) ; pub const MONO : Capabilities = Capabilities (1i64) ; pub const STEREO : Capabilities = Capabilities (2i64) ; pub const AR : Capabilities = Capabilities (4i64) ; pub const EXTERNAL : Capabilities = Capabilities (8i64) ; } impl From < i64 > for Capabilities { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Capabilities > for i64 { # [inline] fn from (v : Capabilities) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Eyes (pub i64) ; impl Eyes { pub const MONO : Eyes = Eyes (0i64) ; pub const LEFT : Eyes = Eyes (1i64) ; pub const RIGHT : Eyes = Eyes (2i64) ; } impl From < i64 > for Eyes { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Eyes > for i64 { # [inline] fn from (v : Eyes) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackingStatus (pub i64) ; impl TrackingStatus { pub const NORMAL_TRACKING : TrackingStatus = TrackingStatus (0i64) ; pub const EXCESSIVE_MOTION : TrackingStatus = TrackingStatus (1i64) ; pub const INSUFFICIENT_FEATURES : TrackingStatus = TrackingStatus (2i64) ; pub const UNKNOWN_TRACKING : TrackingStatus = TrackingStatus (3i64) ; pub const NOT_TRACKING : TrackingStatus = TrackingStatus (4i64) ; } impl From < i64 > for TrackingStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackingStatus > for i64 { # [inline] fn from (v : TrackingStatus) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRInterface { pub const ARVR_AR : i64 = 4i64 ; pub const ARVR_EXCESSIVE_MOTION : i64 = 1i64 ; pub const ARVR_EXTERNAL : i64 = 8i64 ; pub const ARVR_INSUFFICIENT_FEATURES : i64 = 2i64 ; pub const ARVR_MONO : i64 = 1i64 ; pub const ARVR_NONE : i64 = 0i64 ; pub const ARVR_NORMAL_TRACKING : i64 = 0i64 ; pub const ARVR_NOT_TRACKING : i64 = 4i64 ; pub const ARVR_STEREO : i64 = 2i64 ; pub const ARVR_UNKNOWN_TRACKING : i64 = 3i64 ; pub const EYE_LEFT : i64 = 1i64 ; pub const EYE_MONO : i64 = 0i64 ; pub const EYE_RIGHT : i64 = 2i64 ; } impl ARVRInterface { # [doc = "On an AR interface, `true` if anchor detection is enabled."] # [doc = ""] # [inline] pub fn anchor_detection_is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_anchor_detection_is_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface."] # [doc = ""] # [inline] pub fn get_camera_feed_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_camera_feed_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface."] # [doc = ""] # [inline] pub fn get_capabilities (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_capabilities ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc)."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform."] # [doc = ""] # [inline] pub fn get_render_targetsize (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_render_targetsize ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking."] # [doc = ""] # [inline] pub fn get_tracking_status (& self) -> crate :: generated :: arvr_interface :: TrackingStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_tracking_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: arvr_interface :: TrackingStatus (ret) } } # [doc = "Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.\nAfter initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.\n**Note:** You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.\nIf you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.\nWhile currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD."] # [doc = ""] # [inline] pub fn initialize (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "`true` if this interface been initialized."] # [doc = ""] # [inline] pub fn is_initialized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_initialized ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "`true` if this is the primary interface."] # [doc = ""] # [inline] pub fn is_primary (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_primary ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the current output of this interface is in stereo."] # [doc = ""] # [inline] pub fn is_stereo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_stereo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "On an AR interface, `true` if anchor detection is enabled."] # [doc = ""] # [inline] pub fn set_anchor_detection_is_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_anchor_detection_is_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "`true` if this interface been initialized."] # [doc = ""] # [inline] pub fn set_is_initialized (& self , initialized : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_is_initialized ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , initialized) ; } } # [doc = "`true` if this is the primary interface."] # [doc = ""] # [inline] pub fn set_is_primary (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_is_primary ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Turns the interface off."] # [doc = ""] # [inline] pub fn uninitialize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . uninitialize ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterface { } unsafe impl GodotObject for ARVRInterface { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterface" } } impl std :: ops :: Deref for ARVRInterface { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterface { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_anchor_detection_is_enabled : * mut sys :: godot_method_bind , pub get_camera_feed_id : * mut sys :: godot_method_bind , pub get_capabilities : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_render_targetsize : * mut sys :: godot_method_bind , pub get_tracking_status : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub is_initialized : * mut sys :: godot_method_bind , pub is_primary : * mut sys :: godot_method_bind , pub is_stereo : * mut sys :: godot_method_bind , pub set_anchor_detection_is_enabled : * mut sys :: godot_method_bind , pub set_is_initialized : * mut sys :: godot_method_bind , pub set_is_primary : * mut sys :: godot_method_bind , pub uninitialize : * mut sys :: godot_method_bind } impl ARVRInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceMethodTable = ARVRInterfaceMethodTable { class_constructor : None , get_anchor_detection_is_enabled : 0 as * mut sys :: godot_method_bind , get_camera_feed_id : 0 as * mut sys :: godot_method_bind , get_capabilities : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_render_targetsize : 0 as * mut sys :: godot_method_bind , get_tracking_status : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , is_initialized : 0 as * mut sys :: godot_method_bind , is_primary : 0 as * mut sys :: godot_method_bind , is_stereo : 0 as * mut sys :: godot_method_bind , set_anchor_detection_is_enabled : 0 as * mut sys :: godot_method_bind , set_is_initialized : 0 as * mut sys :: godot_method_bind , set_is_primary : 0 as * mut sys :: godot_method_bind , uninitialize : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ARVRInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_anchor_detection_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_detection_is_enabled\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_capabilities = (gd_api . godot_method_bind_get_method) (class_name , "get_capabilities\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_render_targetsize = (gd_api . godot_method_bind_get_method) (class_name , "get_render_targetsize\0" . as_ptr () as * const c_char) ; table . get_tracking_status = (gd_api . godot_method_bind_get_method) (class_name , "get_tracking_status\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "is_initialized\0" . as_ptr () as * const c_char) ; table . is_primary = (gd_api . godot_method_bind_get_method) (class_name , "is_primary\0" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\0" . as_ptr () as * const c_char) ; table . set_anchor_detection_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_detection_is_enabled\0" . as_ptr () as * const c_char) ; table . set_is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "set_is_initialized\0" . as_ptr () as * const c_char) ; table . set_is_primary = (gd_api . godot_method_bind_get_method) (class_name , "set_is_primary\0" . as_ptr () as * const c_char) ; table . uninitialize = (gd_api . godot_method_bind_get_method) (class_name , "uninitialize\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:472:4202 [INFO] [stdout] | [INFO] [stdout] 472 | ...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] 472 | # [doc = "`core class Panel` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_panel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Panel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPanel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Panel { this : RawObject < Self > , } impl Panel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Panel { } unsafe impl GodotObject for Panel { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Panel" } } impl QueueFree for Panel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Panel { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Panel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Panel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Panel { } unsafe impl SubClass < crate :: generated :: node :: Node > for Panel { } unsafe impl SubClass < crate :: generated :: object :: Object > for Panel { } impl Instanciable for Panel { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Panel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanelMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PanelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanelMethodTable = PanelMethodTable { class_constructor : None , } ; &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 (|| { PanelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Panel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:478:15700 [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 MultiplayerAPI` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_multiplayerapi.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiplayerAPI inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiplayerAPI { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RpcMode (pub i64) ; impl RpcMode { pub const DISABLED : RpcMode = RpcMode (0i64) ; pub const REMOTE : RpcMode = RpcMode (1i64) ; pub const MASTER : RpcMode = RpcMode (2i64) ; pub const SLAVE : RpcMode = RpcMode (3i64) ; pub const PUPPET : RpcMode = RpcMode (3i64) ; pub const REMOTESYNC : RpcMode = RpcMode (4i64) ; pub const SYNC : RpcMode = RpcMode (4i64) ; pub const MASTERSYNC : RpcMode = RpcMode (5i64) ; pub const PUPPETSYNC : RpcMode = RpcMode (6i64) ; } impl From < i64 > for RpcMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RpcMode > for i64 { # [inline] fn from (v : RpcMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiplayerAPI { pub const RPC_MODE_DISABLED : i64 = 0i64 ; pub const RPC_MODE_MASTER : i64 = 2i64 ; pub const RPC_MODE_MASTERSYNC : i64 = 5i64 ; pub const RPC_MODE_PUPPET : i64 = 3i64 ; pub const RPC_MODE_PUPPETSYNC : i64 = 6i64 ; pub const RPC_MODE_REMOTE : i64 = 1i64 ; pub const RPC_MODE_REMOTESYNC : i64 = 4i64 ; pub const RPC_MODE_SLAVE : i64 = 3i64 ; pub const RPC_MODE_SYNC : i64 = 4i64 ; } impl MultiplayerAPI { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiplayerAPIMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing)."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn network_peer (& self) -> Option < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the unique peer ID of this MultiplayerAPI's [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_unique_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn root_node (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_root_node ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the sender's peer ID for the RPC currently being executed.\n**Note:** If not inside an RPC this method will return 0."] # [doc = ""] # [inline] pub fn get_rpc_sender_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_rpc_sender_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if there is a [member network_peer] set."] # [doc = ""] # [inline] pub fn has_network_peer (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . has_network_peer ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this MultiplayerAPI's [member network_peer] is in server mode (listening for connections)."] # [doc = ""] # [inline] pub fn is_network_server (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_network_server ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true` (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the MultiplayerAPI's [member network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn is_refusing_new_network_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_refusing_new_network_connections ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to `false`. By default, [SceneTree] will poll its MultiplayerAPI for you.\n**Note:** This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. `_process`, `physics`, [Thread])."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sends the given raw `bytes` to a specific peer identified by `id` (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is `0`, i.e. broadcast to all peers.\n# Default Arguments\n* `id` - `0`\n* `mode` - `2`"] # [doc = ""] # [inline] pub fn send_bytes (& self , bytes : ByteArray , id : i64 , mode : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . send_bytes ; let ret = crate :: icalls :: icallptr_i64_bytearr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bytes , id , mode) ; GodotError :: result_from_sys (ret as _) } } # [doc = "If `true` (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn set_network_peer (& self , peer : impl AsArg < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the MultiplayerAPI's [member network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn set_refuse_new_network_connections (& self , refuse : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_refuse_new_network_connections ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , refuse) ; } } # [doc = "Sets the base root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.\nThis effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene."] # [doc = ""] # [inline] pub fn set_root_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_root_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiplayerAPI { } unsafe impl GodotObject for MultiplayerAPI { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerAPI" } } impl std :: ops :: Deref for MultiplayerAPI { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerAPI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiplayerAPI { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiplayerAPI { } impl Instanciable for MultiplayerAPI { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MultiplayerAPI :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiplayerAPIMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub get_network_connected_peers : * mut sys :: godot_method_bind , pub get_network_peer : * mut sys :: godot_method_bind , pub get_network_unique_id : * mut sys :: godot_method_bind , pub get_root_node : * mut sys :: godot_method_bind , pub get_rpc_sender_id : * mut sys :: godot_method_bind , pub has_network_peer : * mut sys :: godot_method_bind , pub is_network_server : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub is_refusing_new_network_connections : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub send_bytes : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_network_peer : * mut sys :: godot_method_bind , pub set_refuse_new_network_connections : * mut sys :: godot_method_bind , pub set_root_node : * mut sys :: godot_method_bind } impl MultiplayerAPIMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiplayerAPIMethodTable = MultiplayerAPIMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , get_network_connected_peers : 0 as * mut sys :: godot_method_bind , get_network_peer : 0 as * mut sys :: godot_method_bind , get_network_unique_id : 0 as * mut sys :: godot_method_bind , get_root_node : 0 as * mut sys :: godot_method_bind , get_rpc_sender_id : 0 as * mut sys :: godot_method_bind , has_network_peer : 0 as * mut sys :: godot_method_bind , is_network_server : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , is_refusing_new_network_connections : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , send_bytes : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_network_peer : 0 as * mut sys :: godot_method_bind , set_refuse_new_network_connections : 0 as * mut sys :: godot_method_bind , set_root_node : 0 as * mut sys :: godot_method_bind } ; &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 (|| { MultiplayerAPIMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiplayerAPI\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_network_connected_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_network_connected_peers\0" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\0" . as_ptr () as * const c_char) ; table . get_network_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_network_unique_id\0" . as_ptr () as * const c_char) ; table . get_root_node = (gd_api . godot_method_bind_get_method) (class_name , "get_root_node\0" . as_ptr () as * const c_char) ; table . get_rpc_sender_id = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_sender_id\0" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\0" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . is_refusing_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_network_connections\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . send_bytes = (gd_api . godot_method_bind_get_method) (class_name , "send_bytes\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\0" . as_ptr () as * const c_char) ; table . set_refuse_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_network_connections\0" . as_ptr () as * const c_char) ; table . set_root_node = (gd_api . godot_method_bind_get_method) (class_name , "set_root_node\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:484:4726 [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 AnimationNodeBlend3` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblend3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlend3 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlend3 { this : RawObject < Self > , } impl AnimationNodeBlend3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlend3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend3 { } unsafe impl GodotObject for AnimationNodeBlend3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend3" } } impl std :: ops :: Deref for AnimationNodeBlend3 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlend3 { } impl Instanciable for AnimationNodeBlend3 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlend3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlend3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeBlend3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlend3MethodTable = AnimationNodeBlend3MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AnimationNodeBlend3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlend3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:490:7245 [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 InputEventScreenDrag` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventscreendrag.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventScreenDrag inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventScreenDrag { this : RawObject < Self > , } impl InputEventScreenDrag { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventScreenDragMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The drag event index in the case of a multi-drag event."] # [doc = ""] # [inline] pub fn index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The drag position."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The drag position relative to its start position."] # [doc = ""] # [inline] pub fn relative (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_relative ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The drag speed."] # [doc = ""] # [inline] pub fn speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_speed ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The drag event index in the case of a multi-drag event."] # [doc = ""] # [inline] pub fn set_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "The drag position."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "The drag position relative to its start position."] # [doc = ""] # [inline] pub fn set_relative (& self , relative : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_relative ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , relative) ; } } # [doc = "The drag speed."] # [doc = ""] # [inline] pub fn set_speed (& self , speed : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_speed ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , speed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenDrag { } unsafe impl GodotObject for InputEventScreenDrag { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenDrag" } } impl std :: ops :: Deref for InputEventScreenDrag { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenDrag { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventScreenDrag { } impl Instanciable for InputEventScreenDrag { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventScreenDrag :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventScreenDragMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_index : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_relative : * mut sys :: godot_method_bind , pub get_speed : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_relative : * mut sys :: godot_method_bind , pub set_speed : * mut sys :: godot_method_bind } impl InputEventScreenDragMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventScreenDragMethodTable = InputEventScreenDragMethodTable { class_constructor : None , get_index : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_relative : 0 as * mut sys :: godot_method_bind , get_speed : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_relative : 0 as * mut sys :: godot_method_bind , set_speed : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputEventScreenDragMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventScreenDrag\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\0" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:496:31794 [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 AnimationPlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AnimationPlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimationPlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationPlayer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationMethodCallMode (pub i64) ; impl AnimationMethodCallMode { pub const DEFERRED : AnimationMethodCallMode = AnimationMethodCallMode (0i64) ; pub const IMMEDIATE : AnimationMethodCallMode = AnimationMethodCallMode (1i64) ; } impl From < i64 > for AnimationMethodCallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationMethodCallMode > for i64 { # [inline] fn from (v : AnimationMethodCallMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationProcessMode (pub i64) ; impl AnimationProcessMode { pub const PHYSICS : AnimationProcessMode = AnimationProcessMode (0i64) ; pub const IDLE : AnimationProcessMode = AnimationProcessMode (1i64) ; pub const MANUAL : AnimationProcessMode = AnimationProcessMode (2i64) ; } impl From < i64 > for AnimationProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationProcessMode > for i64 { # [inline] fn from (v : AnimationProcessMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationPlayer { pub const ANIMATION_METHOD_CALL_DEFERRED : i64 = 0i64 ; pub const ANIMATION_METHOD_CALL_IMMEDIATE : i64 = 1i64 ; pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_MANUAL : i64 = 2i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; } impl AnimationPlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationPlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `animation` to the player accessible with the key `name`."] # [doc = ""] # [inline] pub fn add_animation (& self , name : impl Into < GodotString > , animation : impl AsArg < crate :: generated :: animation :: Animation >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . add_animation ; let ret = crate :: icalls :: icallptr_i64_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , animation . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Shifts position in the animation timeline and immediately updates the animation. `delta` is the time in seconds to shift. Events between the current frame and `delta` are handled."] # [doc = ""] # [inline] pub fn advance (& self , delta : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . advance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; } } # [doc = "Returns the name of the next animation in the queue."] # [doc = ""] # [inline] pub fn animation_get_next (& self , anim_from : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . animation_get_next ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Triggers the `anim_to` animation when the `anim_from` animation completes."] # [doc = ""] # [inline] pub fn animation_set_next (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . animation_set_next ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; } } # [doc = "[AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again."] # [doc = ""] # [inline] pub fn clear_caches (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . clear_caches ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all queued, unplayed animations."] # [doc = ""] # [inline] pub fn clear_queue (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . clear_queue ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the name of `animation` or an empty string if not found."] # [doc = ""] # [inline] pub fn find_animation (& self , animation : impl AsArg < crate :: generated :: animation :: Animation >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . find_animation ; let ret = crate :: icalls :: icallptr_str_obj (method_bind , self . this . sys () . as_ptr () , animation . as_arg_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [Animation] with key `name` or `null` if not found."] # [doc = ""] # [inline] pub fn get_animation (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the list of stored animation names."] # [doc = ""] # [inline] pub fn get_animation_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "The process notification in which to update animations."] # [doc = ""] # [inline] pub fn animation_process_mode (& self) -> crate :: generated :: animation_player :: AnimationProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation_process_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_player :: AnimationProcessMode (ret) } } # [doc = "If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation]."] # [doc = ""] # [inline] pub fn assigned_animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_assigned_animation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The name of the animation to play when the scene loads."] # [doc = ""] # [inline] pub fn autoplay (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_autoplay ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the blend time (in seconds) between two animations, referenced by their names."] # [doc = ""] # [inline] pub fn get_blend_time (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_blend_time ; let ret = crate :: icalls :: icallptr_f64_str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; ret as _ } } # [doc = "The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.\n**Note**: while this property appears in the inspector, it's not meant to be edited and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]."] # [doc = ""] # [inline] pub fn current_animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The length (in seconds) of the currently being played animation."] # [doc = ""] # [inline] pub fn current_animation_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The position (in seconds) of the currently playing animation."] # [doc = ""] # [inline] pub fn current_animation_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation_position ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision."] # [doc = ""] # [inline] pub fn default_blend_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_default_blend_time ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The call mode to use for Call Method tracks."] # [doc = ""] # [inline] pub fn method_call_mode (& self) -> crate :: generated :: animation_player :: AnimationMethodCallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_method_call_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_player :: AnimationMethodCallMode (ret) } } # [doc = "Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by `custom_speed` argument specified when calling the [method play] method."] # [doc = ""] # [inline] pub fn get_playing_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_playing_speed ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of the animation names that are currently queued to play."] # [doc = ""] # [inline] pub fn get_queue (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_queue ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "The node from which node path references will travel."] # [doc = ""] # [inline] pub fn root (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [AnimationPlayer] stores an [Animation] with key `name`."] # [doc = ""] # [inline] pub fn has_animation (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . has_animation ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "If `true`, updates animations in response to process-related notifications."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if playing an animation."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Plays the animation with key `name`. Custom blend times and speed can be set. If `custom_speed` is negative and `from_end` is `true`, the animation will play backwards (which is equivalent to calling [method play_backwards]).\nThe [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation `name`, or with no `name` parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.\n**Note:** The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call `advance(0)`.\n# Default Arguments\n* `name` - `\"\"`\n* `custom_blend` - `-1`\n* `custom_speed` - `1.0`\n* `from_end` - `false`"] # [doc = ""] # [inline] pub fn play (& self , name : impl Into < GodotString > , custom_blend : f64 , custom_speed : f64 , from_end : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallptr_void_str_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend , custom_speed , from_end) ; } } # [doc = "Plays the animation with key `name` in reverse.\nThis method is a shorthand for [method play] with `custom_speed = -1.0` and `from_end = true`, so see its description for more information.\n# Default Arguments\n* `name` - `\"\"`\n* `custom_blend` - `-1`"] # [doc = ""] # [inline] pub fn play_backwards (& self , name : impl Into < GodotString > , custom_blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . play_backwards ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend) ; } } # [doc = "Queues an animation for playback once the current one is done.\n**Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow."] # [doc = ""] # [inline] pub fn queue (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . queue ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes the animation with key `name`."] # [doc = ""] # [inline] pub fn remove_animation (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . remove_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Renames an existing animation with key `name` to `newname`."] # [doc = ""] # [inline] pub fn rename_animation (& self , name : impl Into < GodotString > , newname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . rename_animation ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , newname . into ()) ; } } # [doc = "Seeks the animation to the `seconds` point in time (in seconds). If `update` is `true`, the animation updates too, otherwise it updates at process time. Events between the current frame and `seconds` are skipped.\n# Default Arguments\n* `update` - `false`"] # [doc = ""] # [inline] pub fn seek (& self , seconds : f64 , update : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , seconds , update) ; } } # [doc = "If `true`, updates animations in response to process-related notifications."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "The process notification in which to update animations."] # [doc = ""] # [inline] pub fn set_animation_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_animation_process_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation]."] # [doc = ""] # [inline] pub fn set_assigned_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_assigned_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "The name of the animation to play when the scene loads."] # [doc = ""] # [inline] pub fn set_autoplay (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Specifies a blend time (in seconds) between two animations, referenced by their names."] # [doc = ""] # [inline] pub fn set_blend_time (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString > , sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_blend_time ; let ret = crate :: icalls :: icallptr_void_str_str_f64 (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into () , sec) ; } } # [doc = "The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.\n**Note**: while this property appears in the inspector, it's not meant to be edited and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]."] # [doc = ""] # [inline] pub fn set_current_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_current_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision."] # [doc = ""] # [inline] pub fn set_default_blend_time (& self , sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_default_blend_time ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , sec) ; } } # [doc = "The call mode to use for Call Method tracks."] # [doc = ""] # [inline] pub fn set_method_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_method_call_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The node from which node path references will travel."] # [doc = ""] # [inline] pub fn set_root (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_root ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [doc = "Stops or pauses the currently playing animation. If `reset` is `true`, the animation position is reset to `0` and the playback speed is reset to `1.0`.\nIf `reset` is `false`, the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.\n# Default Arguments\n* `reset` - `true`"] # [doc = ""] # [inline] pub fn stop (& self , reset : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , reset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationPlayer { } unsafe impl GodotObject for AnimationPlayer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimationPlayer" } } impl QueueFree for AnimationPlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimationPlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimationPlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationPlayer { } impl Instanciable for AnimationPlayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationPlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationPlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_animation : * mut sys :: godot_method_bind , pub advance : * mut sys :: godot_method_bind , pub animation_get_next : * mut sys :: godot_method_bind , pub animation_set_next : * mut sys :: godot_method_bind , pub clear_caches : * mut sys :: godot_method_bind , pub clear_queue : * mut sys :: godot_method_bind , pub find_animation : * mut sys :: godot_method_bind , pub get_animation : * mut sys :: godot_method_bind , pub get_animation_list : * mut sys :: godot_method_bind , pub get_animation_process_mode : * mut sys :: godot_method_bind , pub get_assigned_animation : * mut sys :: godot_method_bind , pub get_autoplay : * mut sys :: godot_method_bind , pub get_blend_time : * mut sys :: godot_method_bind , pub get_current_animation : * mut sys :: godot_method_bind , pub get_current_animation_length : * mut sys :: godot_method_bind , pub get_current_animation_position : * mut sys :: godot_method_bind , pub get_default_blend_time : * mut sys :: godot_method_bind , pub get_method_call_mode : * mut sys :: godot_method_bind , pub get_playing_speed : * mut sys :: godot_method_bind , pub get_queue : * mut sys :: godot_method_bind , pub get_root : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub has_animation : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub play_backwards : * mut sys :: godot_method_bind , pub queue : * mut sys :: godot_method_bind , pub remove_animation : * mut sys :: godot_method_bind , pub rename_animation : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_animation_process_mode : * mut sys :: godot_method_bind , pub set_assigned_animation : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_blend_time : * mut sys :: godot_method_bind , pub set_current_animation : * mut sys :: godot_method_bind , pub set_default_blend_time : * mut sys :: godot_method_bind , pub set_method_call_mode : * mut sys :: godot_method_bind , pub set_root : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimationPlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationPlayerMethodTable = AnimationPlayerMethodTable { class_constructor : None , add_animation : 0 as * mut sys :: godot_method_bind , advance : 0 as * mut sys :: godot_method_bind , animation_get_next : 0 as * mut sys :: godot_method_bind , animation_set_next : 0 as * mut sys :: godot_method_bind , clear_caches : 0 as * mut sys :: godot_method_bind , clear_queue : 0 as * mut sys :: godot_method_bind , find_animation : 0 as * mut sys :: godot_method_bind , get_animation : 0 as * mut sys :: godot_method_bind , get_animation_list : 0 as * mut sys :: godot_method_bind , get_animation_process_mode : 0 as * mut sys :: godot_method_bind , get_assigned_animation : 0 as * mut sys :: godot_method_bind , get_autoplay : 0 as * mut sys :: godot_method_bind , get_blend_time : 0 as * mut sys :: godot_method_bind , get_current_animation : 0 as * mut sys :: godot_method_bind , get_current_animation_length : 0 as * mut sys :: godot_method_bind , get_current_animation_position : 0 as * mut sys :: godot_method_bind , get_default_blend_time : 0 as * mut sys :: godot_method_bind , get_method_call_mode : 0 as * mut sys :: godot_method_bind , get_playing_speed : 0 as * mut sys :: godot_method_bind , get_queue : 0 as * mut sys :: godot_method_bind , get_root : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , has_animation : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , play_backwards : 0 as * mut sys :: godot_method_bind , queue : 0 as * mut sys :: godot_method_bind , remove_animation : 0 as * mut sys :: godot_method_bind , rename_animation : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_animation_process_mode : 0 as * mut sys :: godot_method_bind , set_assigned_animation : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_blend_time : 0 as * mut sys :: godot_method_bind , set_current_animation : 0 as * mut sys :: godot_method_bind , set_default_blend_time : 0 as * mut sys :: godot_method_bind , set_method_call_mode : 0 as * mut sys :: godot_method_bind , set_root : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AnimationPlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationPlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_animation = (gd_api . godot_method_bind_get_method) (class_name , "add_animation\0" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\0" . as_ptr () as * const c_char) ; table . animation_get_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_get_next\0" . as_ptr () as * const c_char) ; table . animation_set_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_set_next\0" . as_ptr () as * const c_char) ; table . clear_caches = (gd_api . godot_method_bind_get_method) (class_name , "clear_caches\0" . as_ptr () as * const c_char) ; table . clear_queue = (gd_api . godot_method_bind_get_method) (class_name , "clear_queue\0" . as_ptr () as * const c_char) ; table . find_animation = (gd_api . godot_method_bind_get_method) (class_name , "find_animation\0" . as_ptr () as * const c_char) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_animation_list = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_list\0" . as_ptr () as * const c_char) ; table . get_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_process_mode\0" . as_ptr () as * const c_char) ; table . get_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_assigned_animation\0" . as_ptr () as * const c_char) ; table . get_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "get_autoplay\0" . as_ptr () as * const c_char) ; table . get_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_time\0" . as_ptr () as * const c_char) ; table . get_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation\0" . as_ptr () as * const c_char) ; table . get_current_animation_length = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation_length\0" . as_ptr () as * const c_char) ; table . get_current_animation_position = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation_position\0" . as_ptr () as * const c_char) ; table . get_default_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "get_default_blend_time\0" . as_ptr () as * const c_char) ; table . get_method_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_method_call_mode\0" . as_ptr () as * const c_char) ; table . get_playing_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_speed\0" . as_ptr () as * const c_char) ; table . get_queue = (gd_api . godot_method_bind_get_method) (class_name , "get_queue\0" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . play_backwards = (gd_api . godot_method_bind_get_method) (class_name , "play_backwards\0" . as_ptr () as * const c_char) ; table . queue = (gd_api . godot_method_bind_get_method) (class_name , "queue\0" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\0" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_process_mode\0" . as_ptr () as * const c_char) ; table . set_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_assigned_animation\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_time\0" . as_ptr () as * const c_char) ; table . set_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_current_animation\0" . as_ptr () as * const c_char) ; table . set_default_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "set_default_blend_time\0" . as_ptr () as * const c_char) ; table . set_method_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_method_call_mode\0" . as_ptr () as * const c_char) ; table . set_root = (gd_api . godot_method_bind_get_method) (class_name , "set_root\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:502:7181 [INFO] [stdout] | [INFO] [stdout] 502 | ... : 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] 502 | # [doc = "`core class Joint2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_joint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJoint2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Joint2D { this : RawObject < Self > , } impl Joint2D { # [doc = "When [member node_a] and [member node_b] move in different directions the `bias` controls how fast the joint pulls them back to their original position. The lower the `bias` the more the two bodies can pull on the joint."] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, [member node_a] and [member node_b] can not collide."] # [doc = ""] # [inline] pub fn exclude_nodes_from_collision (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The first body attached to the joint. Must derive from [PhysicsBody2D]."] # [doc = ""] # [inline] pub fn node_a (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_node_a ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The second body attached to the joint. Must derive from [PhysicsBody2D]."] # [doc = ""] # [inline] pub fn node_b (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_node_b ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "When [member node_a] and [member node_b] move in different directions the `bias` controls how fast the joint pulls them back to their original position. The lower the `bias` the more the two bodies can pull on the joint."] # [doc = ""] # [inline] pub fn set_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bias) ; } } # [doc = "If `true`, [member node_a] and [member node_b] can not collide."] # [doc = ""] # [inline] pub fn set_exclude_nodes_from_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The first body attached to the joint. Must derive from [PhysicsBody2D]."] # [doc = ""] # [inline] pub fn set_node_a (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_node_a ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The second body attached to the joint. Must derive from [PhysicsBody2D]."] # [doc = ""] # [inline] pub fn set_node_b (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_node_b ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Joint2D { } unsafe impl GodotObject for Joint2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Joint2D" } } impl QueueFree for Joint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Joint2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Joint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Joint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Joint2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Joint2D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Joint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bias : * mut sys :: godot_method_bind , pub get_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub get_node_a : * mut sys :: godot_method_bind , pub get_node_b : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub set_node_a : * mut sys :: godot_method_bind , pub set_node_b : * mut sys :: godot_method_bind } impl Joint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Joint2DMethodTable = Joint2DMethodTable { class_constructor : None , get_bias : 0 as * mut sys :: godot_method_bind , get_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , get_node_a : 0 as * mut sys :: godot_method_bind , get_node_b : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , set_node_a : 0 as * mut sys :: godot_method_bind , set_node_b : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Joint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Joint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\0" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\0" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:508:16499 [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 SurfaceTool` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_surfacetool.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSurfaceTool inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SurfaceTool { this : RawObject < Self > , } impl SurfaceTool { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SurfaceToolMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an array of bones for the next vertex to use. `bones` must contain 4 integers."] # [doc = ""] # [inline] pub fn add_bones (& self , bones : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_bones ; let ret = crate :: icalls :: icallptr_void_i32arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = "Specifies a [Color] for the next vertex to use."] # [doc = ""] # [inline] pub fn add_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices."] # [doc = ""] # [inline] pub fn add_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Specifies a normal for the next vertex to use."] # [doc = ""] # [inline] pub fn add_normal (& self , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_normal ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; } } # [doc = "Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation."] # [doc = ""] # [inline] pub fn add_smooth_group (& self , smooth : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_smooth_group ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth) ; } } # [doc = "Specifies a tangent for the next vertex to use."] # [doc = ""] # [inline] pub fn add_tangent (& self , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_tangent ; let ret = crate :: icalls :: icallptr_void_plane (method_bind , self . this . sys () . as_ptr () , tangent) ; } } # [doc = "Inserts a triangle fan made of array data into [Mesh] being constructed.\nRequires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `uvs` - `PoolVector2Array( )`\n* `colors` - `PoolColorArray( )`\n* `uv2s` - `PoolVector2Array( )`\n* `normals` - `PoolVector3Array( )`\n* `tangents` - `[ ]`"] # [doc = ""] # [inline] pub fn add_triangle_fan (& self , vertices : Vector3Array , uvs : Vector2Array , colors : ColorArray , uv2s : Vector2Array , normals : Vector3Array , tangents : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_triangle_fan ; let ret = crate :: icalls :: icallptr_void_vec3arr_vec2arr_colorarr_vec2arr_vec3arr_arr (method_bind , self . this . sys () . as_ptr () , vertices , uvs , colors , uv2s , normals , tangents) ; } } # [doc = "Specifies a set of UV coordinates to use for the next vertex."] # [doc = ""] # [inline] pub fn add_uv (& self , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Specifies an optional second set of UV coordinates to use for the next vertex."] # [doc = ""] # [inline] pub fn add_uv2 (& self , uv2 : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv2 ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv2) ; } } # [doc = "Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV)."] # [doc = ""] # [inline] pub fn add_vertex (& self , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_vertex ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , vertex) ; } } # [doc = "Specifies weight values for next vertex to use. `weights` must contain 4 values."] # [doc = ""] # [inline] pub fn add_weights (& self , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_weights ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , weights) ; } } # [doc = "Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]."] # [doc = ""] # [inline] pub fn append_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . append_from ; let ret = crate :: icalls :: icallptr_void_obj_i64_trans (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , transform) ; } } # [doc = "Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES])."] # [doc = ""] # [inline] pub fn begin (& self , primitive : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . begin ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , primitive) ; } } # [doc = "Clear all information passed into the surface tool so far."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].\nDefault flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See `ARRAY_COMPRESS_*` constants in [enum Mesh.ArrayFormat] for other flags.\n# Default Arguments\n* `existing` - `null`\n* `flags` - `97280`"] # [doc = ""] # [inline] pub fn commit (& self , existing : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh > , flags : i64) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallptr_obj_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , flags) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API."] # [doc = ""] # [inline] pub fn commit_to_arrays (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit_to_arrays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a vertex array from an existing [Mesh]."] # [doc = ""] # [inline] pub fn create_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface) ; } } # [doc = "Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape."] # [doc = ""] # [inline] pub fn create_from_blend_shape (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64 , blend_shape : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from_blend_shape ; let ret = crate :: icalls :: icallptr_void_obj_i64_str (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , blend_shape . into ()) ; } } # [doc = "Removes the index array by expanding the vertex array."] # [doc = ""] # [inline] pub fn deindex (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . deindex ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates normals from vertices so you do not have to do it manually. If `flip` is `true`, the resulting normals will be inverted.\nRequires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `flip` - `false`"] # [doc = ""] # [inline] pub fn generate_normals (& self , flip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_normals ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip) ; } } # [doc = "Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already."] # [doc = ""] # [inline] pub fn generate_tangents (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_tangents ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shrinks the vertex array by creating an index array (avoids reusing vertices)."] # [doc = ""] # [inline] pub fn index (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . index ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets [Material] to be used by the [Mesh] you are constructing."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SurfaceTool { } unsafe impl GodotObject for SurfaceTool { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SurfaceTool" } } impl std :: ops :: Deref for SurfaceTool { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SurfaceTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SurfaceTool { } unsafe impl SubClass < crate :: generated :: object :: Object > for SurfaceTool { } impl Instanciable for SurfaceTool { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SurfaceTool :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SurfaceToolMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bones : * mut sys :: godot_method_bind , pub add_color : * mut sys :: godot_method_bind , pub add_index : * mut sys :: godot_method_bind , pub add_normal : * mut sys :: godot_method_bind , pub add_smooth_group : * mut sys :: godot_method_bind , pub add_tangent : * mut sys :: godot_method_bind , pub add_triangle_fan : * mut sys :: godot_method_bind , pub add_uv : * mut sys :: godot_method_bind , pub add_uv2 : * mut sys :: godot_method_bind , pub add_vertex : * mut sys :: godot_method_bind , pub add_weights : * mut sys :: godot_method_bind , pub append_from : * mut sys :: godot_method_bind , pub begin : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub commit : * mut sys :: godot_method_bind , pub commit_to_arrays : * mut sys :: godot_method_bind , pub create_from : * mut sys :: godot_method_bind , pub create_from_blend_shape : * mut sys :: godot_method_bind , pub deindex : * mut sys :: godot_method_bind , pub generate_normals : * mut sys :: godot_method_bind , pub generate_tangents : * mut sys :: godot_method_bind , pub index : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind } impl SurfaceToolMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SurfaceToolMethodTable = SurfaceToolMethodTable { class_constructor : None , add_bones : 0 as * mut sys :: godot_method_bind , add_color : 0 as * mut sys :: godot_method_bind , add_index : 0 as * mut sys :: godot_method_bind , add_normal : 0 as * mut sys :: godot_method_bind , add_smooth_group : 0 as * mut sys :: godot_method_bind , add_tangent : 0 as * mut sys :: godot_method_bind , add_triangle_fan : 0 as * mut sys :: godot_method_bind , add_uv : 0 as * mut sys :: godot_method_bind , add_uv2 : 0 as * mut sys :: godot_method_bind , add_vertex : 0 as * mut sys :: godot_method_bind , add_weights : 0 as * mut sys :: godot_method_bind , append_from : 0 as * mut sys :: godot_method_bind , begin : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , commit : 0 as * mut sys :: godot_method_bind , commit_to_arrays : 0 as * mut sys :: godot_method_bind , create_from : 0 as * mut sys :: godot_method_bind , create_from_blend_shape : 0 as * mut sys :: godot_method_bind , deindex : 0 as * mut sys :: godot_method_bind , generate_normals : 0 as * mut sys :: godot_method_bind , generate_tangents : 0 as * mut sys :: godot_method_bind , index : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SurfaceToolMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SurfaceTool\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bones = (gd_api . godot_method_bind_get_method) (class_name , "add_bones\0" . as_ptr () as * const c_char) ; table . add_color = (gd_api . godot_method_bind_get_method) (class_name , "add_color\0" . as_ptr () as * const c_char) ; table . add_index = (gd_api . godot_method_bind_get_method) (class_name , "add_index\0" . as_ptr () as * const c_char) ; table . add_normal = (gd_api . godot_method_bind_get_method) (class_name , "add_normal\0" . as_ptr () as * const c_char) ; table . add_smooth_group = (gd_api . godot_method_bind_get_method) (class_name , "add_smooth_group\0" . as_ptr () as * const c_char) ; table . add_tangent = (gd_api . godot_method_bind_get_method) (class_name , "add_tangent\0" . as_ptr () as * const c_char) ; table . add_triangle_fan = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle_fan\0" . as_ptr () as * const c_char) ; table . add_uv = (gd_api . godot_method_bind_get_method) (class_name , "add_uv\0" . as_ptr () as * const c_char) ; table . add_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "add_uv2\0" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\0" . as_ptr () as * const c_char) ; table . add_weights = (gd_api . godot_method_bind_get_method) (class_name , "add_weights\0" . as_ptr () as * const c_char) ; table . append_from = (gd_api . godot_method_bind_get_method) (class_name , "append_from\0" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\0" . as_ptr () as * const c_char) ; table . commit_to_arrays = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_arrays\0" . as_ptr () as * const c_char) ; table . create_from = (gd_api . godot_method_bind_get_method) (class_name , "create_from\0" . as_ptr () as * const c_char) ; table . create_from_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_from_blend_shape\0" . as_ptr () as * const c_char) ; table . deindex = (gd_api . godot_method_bind_get_method) (class_name , "deindex\0" . as_ptr () as * const c_char) ; table . generate_normals = (gd_api . godot_method_bind_get_method) (class_name , "generate_normals\0" . as_ptr () as * const c_char) ; table . generate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "generate_tangents\0" . as_ptr () as * const c_char) ; table . index = (gd_api . godot_method_bind_get_method) (class_name , "index\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:514:90357 [INFO] [stdout] | [INFO] [stdout] 514 | ... : 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] 514 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:520:2890 [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 = "`tools class EditorResourcePreviewGenerator` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorresourcepreviewgenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorResourcePreviewGenerator inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourcePreviewGenerator { this : RawObject < Self > , } impl EditorResourcePreviewGenerator { } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePreviewGenerator { } unsafe impl GodotObject for EditorResourcePreviewGenerator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorResourcePreviewGenerator" } } impl std :: ops :: Deref for EditorResourcePreviewGenerator { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreviewGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorResourcePreviewGenerator { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorResourcePreviewGenerator { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourcePreviewGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl EditorResourcePreviewGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourcePreviewGeneratorMethodTable = EditorResourcePreviewGeneratorMethodTable { class_constructor : None , } ; &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 (|| { EditorResourcePreviewGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourcePreviewGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:526:6810 [INFO] [stdout] | [INFO] [stdout] 526 | ... : 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] 526 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:532:6114 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:538:10770 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:544:3927 [INFO] [stdout] | [INFO] [stdout] 544 | ...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] 544 | # [doc = "`core class AudioEffectHighShelfFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffecthighshelffilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectHighShelfFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectHighShelfFilter { this : RawObject < Self > , } impl AudioEffectHighShelfFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectHighShelfFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectHighShelfFilter { } unsafe impl GodotObject for AudioEffectHighShelfFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectHighShelfFilter" } } impl std :: ops :: Deref for AudioEffectHighShelfFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectHighShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectHighShelfFilter { } impl Instanciable for AudioEffectHighShelfFilter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectHighShelfFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectHighShelfFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectHighShelfFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectHighShelfFilterMethodTable = AudioEffectHighShelfFilterMethodTable { class_constructor : None , } ; &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 (|| { AudioEffectHighShelfFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectHighShelfFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:550:3784 [INFO] [stdout] | [INFO] [stdout] 550 | ...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] 550 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:556:6208 [INFO] [stdout] | [INFO] [stdout] 556 | ... : 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] 556 | # [doc = "`core class RegExMatch` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_regexmatch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRegExMatch inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RegExMatch { this : RawObject < Self > , } impl RegExMatch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RegExMatchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_end (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_end ; let ret = crate :: icalls :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_group_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_group_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn names (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_names ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_start (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_start ; let ret = crate :: icalls :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_string (& self , name : impl OwnedToVariant) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_string ; let ret = crate :: icalls :: icallptr_str_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn strings (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_strings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn subject (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_subject ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RegExMatch { } unsafe impl GodotObject for RegExMatch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegExMatch" } } impl std :: ops :: Deref for RegExMatch { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegExMatch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RegExMatch { } unsafe impl SubClass < crate :: generated :: object :: Object > for RegExMatch { } impl Instanciable for RegExMatch { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RegExMatch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RegExMatchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_end : * mut sys :: godot_method_bind , pub get_group_count : * mut sys :: godot_method_bind , pub get_names : * mut sys :: godot_method_bind , pub get_start : * mut sys :: godot_method_bind , pub get_string : * mut sys :: godot_method_bind , pub get_strings : * mut sys :: godot_method_bind , pub get_subject : * mut sys :: godot_method_bind } impl RegExMatchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RegExMatchMethodTable = RegExMatchMethodTable { class_constructor : None , get_end : 0 as * mut sys :: godot_method_bind , get_group_count : 0 as * mut sys :: godot_method_bind , get_names : 0 as * mut sys :: godot_method_bind , get_start : 0 as * mut sys :: godot_method_bind , get_string : 0 as * mut sys :: godot_method_bind , get_strings : 0 as * mut sys :: godot_method_bind , get_subject : 0 as * mut sys :: godot_method_bind } ; &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 (|| { RegExMatchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RegExMatch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\0" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\0" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\0" . as_ptr () as * const c_char) ; table . get_start = (gd_api . godot_method_bind_get_method) (class_name , "get_start\0" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\0" . as_ptr () as * const c_char) ; table . get_strings = (gd_api . godot_method_bind_get_method) (class_name , "get_strings\0" . as_ptr () as * const c_char) ; table . get_subject = (gd_api . godot_method_bind_get_method) (class_name , "get_subject\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:562:11026 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:568:33429 [INFO] [stdout] | [INFO] [stdout] 568 | ... : 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] 568 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:574:13122 [INFO] [stdout] | [INFO] [stdout] 574 | ... : 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] 574 | # [doc = "`core class AnimatedTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animatedtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimatedTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedTexture { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimatedTexture { pub const MAX_FRAMES : i64 = 256i64 ; } impl AnimatedTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the currently visible frame of the texture."] # [doc = ""] # [inline] pub fn current_frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_current_frame ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).\nFor example, an animation with 8 frames, no frame delay and a `fps` value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds."] # [doc = ""] # [inline] pub fn fps (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_fps ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the given frame's delay value."] # [doc = ""] # [inline] pub fn frame_delay (& self , frame : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frame_delay ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; ret as _ } } # [doc = "Returns the given frame's [Texture]."] # [doc = ""] # [inline] pub fn frame_texture (& self , frame : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frame_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]."] # [doc = ""] # [inline] pub fn frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to `true`."] # [doc = ""] # [inline] pub fn oneshot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_oneshot ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to `false`."] # [doc = ""] # [inline] pub fn pause (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_pause ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the currently visible frame of the texture."] # [doc = ""] # [inline] pub fn set_current_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_current_frame ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).\nFor example, an animation with 8 frames, no frame delay and a `fps` value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds."] # [doc = ""] # [inline] pub fn set_fps (& self , fps : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_fps ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be `1.0 / fps + delay`.\nFor example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:\n```gdscript\nFrame 0: 0.5 s (1 / fps)\nFrame 1: 1.7 s (1 / fps + 1.2)\nFrame 2: 0.5 s (1 / fps)\nTotal duration: 2.7 s\n```"] # [doc = ""] # [inline] pub fn set_frame_delay (& self , frame : i64 , delay : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frame_delay ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , frame , delay) ; } } # [doc = "Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.\nYou can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation."] # [doc = ""] # [inline] pub fn set_frame_texture (& self , frame : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frame_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , frame , texture . as_arg_ptr ()) ; } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]."] # [doc = ""] # [inline] pub fn set_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frames ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to `true`."] # [doc = ""] # [inline] pub fn set_oneshot (& self , oneshot : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_oneshot ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , oneshot) ; } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to `false`."] # [doc = ""] # [inline] pub fn set_pause (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_pause ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedTexture { } unsafe impl GodotObject for AnimatedTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimatedTexture" } } impl std :: ops :: Deref for AnimatedTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedTexture { } impl Instanciable for AnimatedTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimatedTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_current_frame : * mut sys :: godot_method_bind , pub get_fps : * mut sys :: godot_method_bind , pub get_frame_delay : * mut sys :: godot_method_bind , pub get_frame_texture : * mut sys :: godot_method_bind , pub get_frames : * mut sys :: godot_method_bind , pub get_oneshot : * mut sys :: godot_method_bind , pub get_pause : * mut sys :: godot_method_bind , pub set_current_frame : * mut sys :: godot_method_bind , pub set_fps : * mut sys :: godot_method_bind , pub set_frame_delay : * mut sys :: godot_method_bind , pub set_frame_texture : * mut sys :: godot_method_bind , pub set_frames : * mut sys :: godot_method_bind , pub set_oneshot : * mut sys :: godot_method_bind , pub set_pause : * mut sys :: godot_method_bind } impl AnimatedTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedTextureMethodTable = AnimatedTextureMethodTable { class_constructor : None , get_current_frame : 0 as * mut sys :: godot_method_bind , get_fps : 0 as * mut sys :: godot_method_bind , get_frame_delay : 0 as * mut sys :: godot_method_bind , get_frame_texture : 0 as * mut sys :: godot_method_bind , get_frames : 0 as * mut sys :: godot_method_bind , get_oneshot : 0 as * mut sys :: godot_method_bind , get_pause : 0 as * mut sys :: godot_method_bind , set_current_frame : 0 as * mut sys :: godot_method_bind , set_fps : 0 as * mut sys :: godot_method_bind , set_frame_delay : 0 as * mut sys :: godot_method_bind , set_frame_texture : 0 as * mut sys :: godot_method_bind , set_frames : 0 as * mut sys :: godot_method_bind , set_oneshot : 0 as * mut sys :: godot_method_bind , set_pause : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AnimatedTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_current_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_current_frame\0" . as_ptr () as * const c_char) ; table . get_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fps\0" . as_ptr () as * const c_char) ; table . get_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_delay\0" . as_ptr () as * const c_char) ; table . get_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_texture\0" . as_ptr () as * const c_char) ; table . get_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_frames\0" . as_ptr () as * const c_char) ; table . get_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "get_oneshot\0" . as_ptr () as * const c_char) ; table . get_pause = (gd_api . godot_method_bind_get_method) (class_name , "get_pause\0" . as_ptr () as * const c_char) ; table . set_current_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_current_frame\0" . as_ptr () as * const c_char) ; table . set_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fps\0" . as_ptr () as * const c_char) ; table . set_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_delay\0" . as_ptr () as * const c_char) ; table . set_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_texture\0" . as_ptr () as * const c_char) ; table . set_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_frames\0" . as_ptr () as * const c_char) ; table . set_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "set_oneshot\0" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:580:8757 [INFO] [stdout] | [INFO] [stdout] 580 | ... : 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] 580 | # [doc = "`core class VisualShaderNodeTexture` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTexture inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTexture { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Source (pub i64) ; impl Source { pub const TEXTURE : Source = Source (0i64) ; pub const SCREEN : Source = Source (1i64) ; pub const _2D_TEXTURE : Source = Source (2i64) ; pub const _2D_NORMAL : Source = Source (3i64) ; pub const DEPTH : Source = Source (4i64) ; pub const PORT : Source = Source (5i64) ; } impl From < i64 > for Source { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Source > for i64 { # [inline] fn from (v : Source) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const DATA : TextureType = TextureType (0i64) ; pub const COLOR : TextureType = TextureType (1i64) ; pub const NORMALMAP : TextureType = TextureType (2i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTexture { pub const SOURCE_2D_NORMAL : i64 = 3i64 ; pub const SOURCE_2D_TEXTURE : i64 = 2i64 ; pub const SOURCE_DEPTH : i64 = 4i64 ; pub const SOURCE_PORT : i64 = 5i64 ; pub const SOURCE_SCREEN : i64 = 1i64 ; pub const SOURCE_TEXTURE : i64 = 0i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; } impl VisualShaderNodeTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Determines the source for the lookup. See [enum Source] for options."] # [doc = ""] # [inline] pub fn source (& self) -> crate :: generated :: visual_shader_node_texture :: Source { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_source ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture :: Source (ret) } } # [doc = "The source texture, if needed for the selected [member source]."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options."] # [doc = ""] # [inline] pub fn texture_type (& self) -> crate :: generated :: visual_shader_node_texture :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_texture_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_texture :: TextureType (ret) } } # [doc = "Determines the source for the lookup. See [enum Source] for options."] # [doc = ""] # [inline] pub fn set_source (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_source ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "The source texture, if needed for the selected [member source]."] # [doc = ""] # [inline] pub fn set_texture (& self , value : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , value . as_arg_ptr ()) ; } } # [doc = "Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options."] # [doc = ""] # [inline] pub fn set_texture_type (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_texture_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTexture { } unsafe impl GodotObject for VisualShaderNodeTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTexture" } } impl std :: ops :: Deref for VisualShaderNodeTexture { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTexture { } impl Instanciable for VisualShaderNodeTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_source : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_type : * mut sys :: godot_method_bind , pub set_source : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_type : * mut sys :: godot_method_bind } impl VisualShaderNodeTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTextureMethodTable = VisualShaderNodeTextureMethodTable { class_constructor : None , get_source : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_type : 0 as * mut sys :: godot_method_bind , set_source : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualShaderNodeTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_source = (gd_api . godot_method_bind_get_method) (class_name , "get_source\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:586:4275 [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 BoxShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_boxshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBoxShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoxShape { this : RawObject < Self > , } impl BoxShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BoxShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxShape { } unsafe impl GodotObject for BoxShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BoxShape" } } impl std :: ops :: Deref for BoxShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for BoxShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BoxShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BoxShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for BoxShape { } impl Instanciable for BoxShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BoxShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoxShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_extents : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind } impl BoxShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoxShapeMethodTable = BoxShapeMethodTable { class_constructor : None , get_extents : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind } ; &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 (|| { BoxShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoxShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:592:4781 [INFO] [stdout] | [INFO] [stdout] 592 | ...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] 592 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:598:14715 [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 VisualScriptFunctionCall` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptfunctioncall.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunctionCall inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunctionCall { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; pub const BASIC_TYPE : CallMode = CallMode (3i64) ; pub const SINGLETON : CallMode = CallMode (4i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RpcCallMode (pub i64) ; impl RpcCallMode { pub const DISABLED : RpcCallMode = RpcCallMode (0i64) ; pub const RELIABLE : RpcCallMode = RpcCallMode (1i64) ; pub const UNRELIABLE : RpcCallMode = RpcCallMode (2i64) ; pub const RELIABLE_TO_ID : RpcCallMode = RpcCallMode (3i64) ; pub const UNRELIABLE_TO_ID : RpcCallMode = RpcCallMode (4i64) ; } impl From < i64 > for RpcCallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RpcCallMode > for i64 { # [inline] fn from (v : RpcCallMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptFunctionCall { pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; pub const CALL_MODE_SINGLETON : i64 = 4i64 ; pub const RPC_DISABLED : i64 = 0i64 ; pub const RPC_RELIABLE : i64 = 1i64 ; pub const RPC_RELIABLE_TO_ID : i64 = 3i64 ; pub const RPC_UNRELIABLE : i64 = 2i64 ; pub const RPC_UNRELIABLE_TO_ID : i64 = 4i64 ; } impl VisualScriptFunctionCall { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionCallMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_function_call :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_function_call :: CallMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn function (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rpc_call_mode (& self) -> crate :: generated :: visual_script_function_call :: RpcCallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_rpc_call_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_function_call :: RpcCallMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn singleton (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn use_default_args (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_use_default_args ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn validate (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_validate ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , base_script : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , base_script . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , basic_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , basic_type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function (& self , function : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , function . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rpc_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_rpc_call_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_singleton (& self , singleton : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_singleton ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , singleton . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_default_args (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_use_default_args ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_validate (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_validate ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionCall { } unsafe impl GodotObject for VisualScriptFunctionCall { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionCall" } } impl std :: ops :: Deref for VisualScriptFunctionCall { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunctionCall { } impl Instanciable for VisualScriptFunctionCall { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptFunctionCall :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionCallMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_basic_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_function : * mut sys :: godot_method_bind , pub get_rpc_call_mode : * mut sys :: godot_method_bind , pub get_singleton : * mut sys :: godot_method_bind , pub get_use_default_args : * mut sys :: godot_method_bind , pub get_validate : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind , pub set_rpc_call_mode : * mut sys :: godot_method_bind , pub set_singleton : * mut sys :: godot_method_bind , pub set_use_default_args : * mut sys :: godot_method_bind , pub set_validate : * mut sys :: godot_method_bind } impl VisualScriptFunctionCallMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionCallMethodTable = VisualScriptFunctionCallMethodTable { class_constructor : None , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_basic_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_function : 0 as * mut sys :: godot_method_bind , get_rpc_call_mode : 0 as * mut sys :: godot_method_bind , get_singleton : 0 as * mut sys :: godot_method_bind , get_use_default_args : 0 as * mut sys :: godot_method_bind , get_validate : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind , set_rpc_call_mode : 0 as * mut sys :: godot_method_bind , set_singleton : 0 as * mut sys :: godot_method_bind , set_use_default_args : 0 as * mut sys :: godot_method_bind , set_validate : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptFunctionCallMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunctionCall\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . get_rpc_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_call_mode\0" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\0" . as_ptr () as * const c_char) ; table . get_use_default_args = (gd_api . godot_method_bind_get_method) (class_name , "get_use_default_args\0" . as_ptr () as * const c_char) ; table . get_validate = (gd_api . godot_method_bind_get_method) (class_name , "get_validate\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; table . set_rpc_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_rpc_call_mode\0" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\0" . as_ptr () as * const c_char) ; table . set_use_default_args = (gd_api . godot_method_bind_get_method) (class_name , "set_use_default_args\0" . as_ptr () as * const c_char) ; table . set_validate = (gd_api . godot_method_bind_get_method) (class_name , "set_validate\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:604:32552 [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 Spatial` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spatial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Spatial` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpatial inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Spatial { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Spatial { pub const NOTIFICATION_ENTER_WORLD : i64 = 41i64 ; pub const NOTIFICATION_EXIT_WORLD : i64 = 42i64 ; pub const NOTIFICATION_TRANSFORM_CHANGED : i64 = 2000i64 ; pub const NOTIFICATION_VISIBILITY_CHANGED : i64 = 43i64 ; } impl Spatial { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpatialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations."] # [doc = ""] # [inline] pub fn force_update_transform (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . force_update_transform ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn gizmo (& self) -> Option < Ref < crate :: generated :: spatial_gizmo :: SpatialGizmo , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_gizmo ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial_gizmo :: SpatialGizmo , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "World space (global) [Transform] of this node."] # [doc = ""] # [inline] pub fn global_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_global_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial]."] # [doc = ""] # [inline] pub fn get_parent_spatial (& self) -> Option < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_parent_spatial ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn rotation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle)."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Scale part of the local transformation."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Local space [Transform] of this node, with respect to the parent node."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Local translation of this node."] # [doc = ""] # [inline] pub fn translation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_translation ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current [World] resource this [Spatial] node is registered to."] # [doc = ""] # [inline] pub fn get_world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system."] # [doc = ""] # [inline] pub fn global_rotate (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_rotate ; let ret = crate :: icalls :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [doc = "Scales the global (world) transformation by the given [Vector3] scale factors."] # [doc = ""] # [inline] pub fn global_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_scale ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system."] # [doc = ""] # [inline] pub fn global_translate (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_translate ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Disables rendering of this node. Changes [member visible] to `false`."] # [doc = ""] # [inline] pub fn hide (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . hide ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns whether node notifies about its local transformation changes. [Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn is_local_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_local_transform_notification_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether this node uses a scale of `(1, 1, 1)` or its local transformation scale."] # [doc = ""] # [inline] pub fn is_scale_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_scale_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations."] # [doc = ""] # [inline] pub fn is_set_as_toplevel (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_set_as_toplevel ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn is_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_transform_notification_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return `true`)."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the node is present in the [SceneTree], its [member visible] property is `true` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree."] # [doc = ""] # [inline] pub fn is_visible_in_tree (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_visible_in_tree ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rotates itself so that the local -Z axis points towards the `target` position.\nThe transform will first be rotated around the given `up` vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the `target` and `up` vectors.\nOperations take place in global space."] # [doc = ""] # [inline] pub fn look_at (& self , target : Vector3 , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . look_at ; let ret = crate :: icalls :: icallptr_void_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , target , up) ; } } # [doc = "Moves the node to the specified `position`, and then rotates itself to point toward the `target` as per [method look_at]. Operations take place in global space."] # [doc = ""] # [inline] pub fn look_at_from_position (& self , position : Vector3 , target : Vector3 , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . look_at_from_position ; let ret = crate :: icalls :: icallptr_void_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , target , up) ; } } # [doc = "Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]."] # [doc = ""] # [inline] pub fn orthonormalize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . orthonormalize ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians."] # [doc = ""] # [inline] pub fn rotate (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate ; let ret = crate :: icalls :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [doc = "Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system."] # [doc = ""] # [inline] pub fn rotate_object_local (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_object_local ; let ret = crate :: icalls :: icallptr_void_vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle) ; } } # [doc = "Rotates the local transformation around the X axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_x (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_x ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [doc = "Rotates the local transformation around the Y axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_y (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_y ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [doc = "Rotates the local transformation around the Z axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_z (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_z ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angle) ; } } # [doc = "Scales the local transformation by given 3D scale factors in object-local coordinate system."] # [doc = ""] # [inline] pub fn scale_object_local (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . scale_object_local ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Makes the node ignore its parents transformations. Node transformations are only in global space."] # [doc = ""] # [inline] pub fn set_as_toplevel (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_as_toplevel ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets whether the node uses a scale of `(1, 1, 1)` or its local transformation scale. Changes to the local transformation scale are preserved."] # [doc = ""] # [inline] pub fn set_disable_scale (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_disable_scale ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn set_gizmo (& self , gizmo : impl AsArg < crate :: generated :: spatial_gizmo :: SpatialGizmo >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_gizmo ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , gizmo . as_arg_ptr ()) ; } } # [doc = "World space (global) [Transform] of this node."] # [doc = ""] # [inline] pub fn set_global_transform (& self , global : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_global_transform ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , global) ; } } # [doc = "Reset all transformations for this node (sets its [Transform] to the identity matrix)."] # [doc = ""] # [inline] pub fn set_identity (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_identity ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets whether the node ignores notification that its transformation (global or local) changed."] # [doc = ""] # [inline] pub fn set_ignore_transform_notification (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_ignore_transform_notification ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Sets whether the node notifies about its local transformation changes. [Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn set_notify_local_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_notify_local_transform ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn set_notify_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_notify_transform ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn set_rotation (& self , euler : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , euler) ; } } # [doc = "Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle)."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , euler_degrees : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , euler_degrees) ; } } # [doc = "Scale part of the local transformation."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local space [Transform] of this node, with respect to the parent node."] # [doc = ""] # [inline] pub fn set_transform (& self , local : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , local) ; } } # [doc = "Local translation of this node."] # [doc = ""] # [inline] pub fn set_translation (& self , translation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_translation ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , translation) ; } } # [doc = "If `true`, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return `true`)."] # [doc = ""] # [inline] pub fn set_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_visible ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [doc = "Enables rendering of this node. Changes [member visible] to `true`."] # [doc = ""] # [inline] pub fn show (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . show ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Transforms `local_point` from this node's local space to world space."] # [doc = ""] # [inline] pub fn to_global (& self , local_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . to_global ; let ret = crate :: icalls :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; mem :: transmute (ret) } } # [doc = "Transforms `global_point` from world space to this node's local space."] # [doc = ""] # [inline] pub fn to_local (& self , global_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . to_local ; let ret = crate :: icalls :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , global_point) ; mem :: transmute (ret) } } # [doc = "Changes the node's position by the given offset [Vector3].\nNote that the translation `offset` is affected by the node's scale, so if scaled by e.g. `(10, 1, 1)`, a translation by an offset of `(2, 0, 0)` would actually add 20 (`2 * 10`) to the X coordinate."] # [doc = ""] # [inline] pub fn translate (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Changes the node's position by the given offset [Vector3] in local space."] # [doc = ""] # [inline] pub fn translate_object_local (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . translate_object_local ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Updates the [SpatialGizmo] of this node."] # [doc = ""] # [inline] pub fn update_gizmo (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . update_gizmo ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Spatial { } unsafe impl GodotObject for Spatial { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Spatial" } } impl QueueFree for Spatial { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Spatial { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Spatial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Spatial { } unsafe impl SubClass < crate :: generated :: object :: Object > for Spatial { } impl Instanciable for Spatial { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Spatial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpatialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_transform : * mut sys :: godot_method_bind , pub get_gizmo : * mut sys :: godot_method_bind , pub get_global_transform : * mut sys :: godot_method_bind , pub get_parent_spatial : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_translation : * mut sys :: godot_method_bind , pub get_world : * mut sys :: godot_method_bind , pub global_rotate : * mut sys :: godot_method_bind , pub global_scale : * mut sys :: godot_method_bind , pub global_translate : * mut sys :: godot_method_bind , pub hide : * mut sys :: godot_method_bind , pub is_local_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_scale_disabled : * mut sys :: godot_method_bind , pub is_set_as_toplevel : * mut sys :: godot_method_bind , pub is_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub is_visible_in_tree : * mut sys :: godot_method_bind , pub look_at : * mut sys :: godot_method_bind , pub look_at_from_position : * mut sys :: godot_method_bind , pub orthonormalize : * mut sys :: godot_method_bind , pub rotate : * mut sys :: godot_method_bind , pub rotate_object_local : * mut sys :: godot_method_bind , pub rotate_x : * mut sys :: godot_method_bind , pub rotate_y : * mut sys :: godot_method_bind , pub rotate_z : * mut sys :: godot_method_bind , pub scale_object_local : * mut sys :: godot_method_bind , pub set_as_toplevel : * mut sys :: godot_method_bind , pub set_disable_scale : * mut sys :: godot_method_bind , pub set_gizmo : * mut sys :: godot_method_bind , pub set_global_transform : * mut sys :: godot_method_bind , pub set_identity : * mut sys :: godot_method_bind , pub set_ignore_transform_notification : * mut sys :: godot_method_bind , pub set_notify_local_transform : * mut sys :: godot_method_bind , pub set_notify_transform : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind , pub set_translation : * mut sys :: godot_method_bind , pub set_visible : * mut sys :: godot_method_bind , pub show : * mut sys :: godot_method_bind , pub to_global : * mut sys :: godot_method_bind , pub to_local : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind , pub translate_object_local : * mut sys :: godot_method_bind , pub update_gizmo : * mut sys :: godot_method_bind } impl SpatialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpatialMethodTable = SpatialMethodTable { class_constructor : None , force_update_transform : 0 as * mut sys :: godot_method_bind , get_gizmo : 0 as * mut sys :: godot_method_bind , get_global_transform : 0 as * mut sys :: godot_method_bind , get_parent_spatial : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_translation : 0 as * mut sys :: godot_method_bind , get_world : 0 as * mut sys :: godot_method_bind , global_rotate : 0 as * mut sys :: godot_method_bind , global_scale : 0 as * mut sys :: godot_method_bind , global_translate : 0 as * mut sys :: godot_method_bind , hide : 0 as * mut sys :: godot_method_bind , is_local_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_scale_disabled : 0 as * mut sys :: godot_method_bind , is_set_as_toplevel : 0 as * mut sys :: godot_method_bind , is_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , is_visible_in_tree : 0 as * mut sys :: godot_method_bind , look_at : 0 as * mut sys :: godot_method_bind , look_at_from_position : 0 as * mut sys :: godot_method_bind , orthonormalize : 0 as * mut sys :: godot_method_bind , rotate : 0 as * mut sys :: godot_method_bind , rotate_object_local : 0 as * mut sys :: godot_method_bind , rotate_x : 0 as * mut sys :: godot_method_bind , rotate_y : 0 as * mut sys :: godot_method_bind , rotate_z : 0 as * mut sys :: godot_method_bind , scale_object_local : 0 as * mut sys :: godot_method_bind , set_as_toplevel : 0 as * mut sys :: godot_method_bind , set_disable_scale : 0 as * mut sys :: godot_method_bind , set_gizmo : 0 as * mut sys :: godot_method_bind , set_global_transform : 0 as * mut sys :: godot_method_bind , set_identity : 0 as * mut sys :: godot_method_bind , set_ignore_transform_notification : 0 as * mut sys :: godot_method_bind , set_notify_local_transform : 0 as * mut sys :: godot_method_bind , set_notify_transform : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind , set_translation : 0 as * mut sys :: godot_method_bind , set_visible : 0 as * mut sys :: godot_method_bind , show : 0 as * mut sys :: godot_method_bind , to_global : 0 as * mut sys :: godot_method_bind , to_local : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind , translate_object_local : 0 as * mut sys :: godot_method_bind , update_gizmo : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SpatialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Spatial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . force_update_transform = (gd_api . godot_method_bind_get_method) (class_name , "force_update_transform\0" . as_ptr () as * const c_char) ; table . get_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "get_gizmo\0" . as_ptr () as * const c_char) ; table . get_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform\0" . as_ptr () as * const c_char) ; table . get_parent_spatial = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_spatial\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_translation = (gd_api . godot_method_bind_get_method) (class_name , "get_translation\0" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\0" . as_ptr () as * const c_char) ; table . global_rotate = (gd_api . godot_method_bind_get_method) (class_name , "global_rotate\0" . as_ptr () as * const c_char) ; table . global_scale = (gd_api . godot_method_bind_get_method) (class_name , "global_scale\0" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\0" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\0" . as_ptr () as * const c_char) ; table . is_local_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_local_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_scale_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_scale_disabled\0" . as_ptr () as * const c_char) ; table . is_set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "is_set_as_toplevel\0" . as_ptr () as * const c_char) ; table . is_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . is_visible_in_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_visible_in_tree\0" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\0" . as_ptr () as * const c_char) ; table . look_at_from_position = (gd_api . godot_method_bind_get_method) (class_name , "look_at_from_position\0" . as_ptr () as * const c_char) ; table . orthonormalize = (gd_api . godot_method_bind_get_method) (class_name , "orthonormalize\0" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\0" . as_ptr () as * const c_char) ; table . rotate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "rotate_object_local\0" . as_ptr () as * const c_char) ; table . rotate_x = (gd_api . godot_method_bind_get_method) (class_name , "rotate_x\0" . as_ptr () as * const c_char) ; table . rotate_y = (gd_api . godot_method_bind_get_method) (class_name , "rotate_y\0" . as_ptr () as * const c_char) ; table . rotate_z = (gd_api . godot_method_bind_get_method) (class_name , "rotate_z\0" . as_ptr () as * const c_char) ; table . scale_object_local = (gd_api . godot_method_bind_get_method) (class_name , "scale_object_local\0" . as_ptr () as * const c_char) ; table . set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "set_as_toplevel\0" . as_ptr () as * const c_char) ; table . set_disable_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_scale\0" . as_ptr () as * const c_char) ; table . set_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "set_gizmo\0" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\0" . as_ptr () as * const c_char) ; table . set_identity = (gd_api . godot_method_bind_get_method) (class_name , "set_identity\0" . as_ptr () as * const c_char) ; table . set_ignore_transform_notification = (gd_api . godot_method_bind_get_method) (class_name , "set_ignore_transform_notification\0" . as_ptr () as * const c_char) ; table . set_notify_local_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_local_transform\0" . as_ptr () as * const c_char) ; table . set_notify_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_transform\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; table . set_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_translation\0" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\0" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\0" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\0" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; table . translate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "translate_object_local\0" . as_ptr () as * const c_char) ; table . update_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "update_gizmo\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:610:5284 [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 CanvasModulate` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_canvasmodulate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CanvasModulate` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCanvasModulate inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasModulate { this : RawObject < Self > , } impl CanvasModulate { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasModulateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The tint color to apply."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasModulateMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The tint color to apply."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasModulateMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasModulate { } unsafe impl GodotObject for CanvasModulate { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CanvasModulate" } } impl QueueFree for CanvasModulate { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CanvasModulate { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasModulate { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: node :: Node > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasModulate { } impl Instanciable for CanvasModulate { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CanvasModulate :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasModulateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind } impl CanvasModulateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasModulateMethodTable = CanvasModulateMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CanvasModulateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasModulate\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:616:11944 [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 NinePatchRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_ninepatchrect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`NinePatchRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNinePatchRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NinePatchRect { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AxisStretchMode (pub i64) ; impl AxisStretchMode { pub const STRETCH : AxisStretchMode = AxisStretchMode (0i64) ; pub const TILE : AxisStretchMode = AxisStretchMode (1i64) ; pub const TILE_FIT : AxisStretchMode = AxisStretchMode (2i64) ; } impl From < i64 > for AxisStretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AxisStretchMode > for i64 { # [inline] fn from (v : AxisStretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NinePatchRect { pub const AXIS_STRETCH_MODE_STRETCH : i64 = 0i64 ; pub const AXIS_STRETCH_MODE_TILE : i64 = 1i64 ; pub const AXIS_STRETCH_MODE_TILE_FIT : i64 = 2i64 ; } impl NinePatchRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NinePatchRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn h_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [doc = "The height of the 9-slice's top row."] # [doc = ""] # [inline] pub fn patch_margin (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn v_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn set_draw_center (& self , draw_center : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_center) ; } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn set_h_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The height of the 9-slice's top row."] # [doc = ""] # [inline] pub fn set_patch_margin (& self , margin : i64 , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , value) ; } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn set_v_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NinePatchRect { } unsafe impl GodotObject for NinePatchRect { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NinePatchRect" } } impl QueueFree for NinePatchRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NinePatchRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NinePatchRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for NinePatchRect { } impl Instanciable for NinePatchRect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NinePatchRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NinePatchRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub get_patch_margin : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_v_axis_stretch_mode : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub set_patch_margin : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_v_axis_stretch_mode : * mut sys :: godot_method_bind } impl NinePatchRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NinePatchRectMethodTable = NinePatchRectMethodTable { class_constructor : None , get_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , get_patch_margin : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , set_patch_margin : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &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 (|| { NinePatchRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NinePatchRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_patch_margin\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_patch_margin\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:622:3784 [INFO] [stdout] | [INFO] [stdout] 622 | ...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] 622 | # [doc = "`core class VisualShaderNodeDeterminant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodedeterminant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeDeterminant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeDeterminant { this : RawObject < Self > , } impl VisualShaderNodeDeterminant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeDeterminantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeDeterminant { } unsafe impl GodotObject for VisualShaderNodeDeterminant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeDeterminant" } } impl std :: ops :: Deref for VisualShaderNodeDeterminant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeDeterminant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeDeterminant { } impl Instanciable for VisualShaderNodeDeterminant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeDeterminant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeDeterminantMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeDeterminantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeDeterminantMethodTable = VisualShaderNodeDeterminantMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeDeterminantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeDeterminant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:628:7550 [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 AudioEffectCapture` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectcapture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectCapture inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectCapture { this : RawObject < Self > , } impl AudioEffectCapture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectCaptureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn can_get_buffer (& self , frames : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . can_get_buffer ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_buffer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . clear_buffer ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_buffer (& self , frames : i64) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallptr_vec2arr_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn buffer_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_buffer_length_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer_length_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_discarded_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_discarded_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_frames_available (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_frames_available ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_pushed_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_pushed_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffer_length (& self , buffer_length_seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . set_buffer_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , buffer_length_seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCapture { } unsafe impl GodotObject for AudioEffectCapture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCapture" } } impl std :: ops :: Deref for AudioEffectCapture { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCapture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectCapture { } impl Instanciable for AudioEffectCapture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectCapture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectCaptureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_get_buffer : * mut sys :: godot_method_bind , pub clear_buffer : * mut sys :: godot_method_bind , pub get_buffer : * mut sys :: godot_method_bind , pub get_buffer_length : * mut sys :: godot_method_bind , pub get_buffer_length_frames : * mut sys :: godot_method_bind , pub get_discarded_frames : * mut sys :: godot_method_bind , pub get_frames_available : * mut sys :: godot_method_bind , pub get_pushed_frames : * mut sys :: godot_method_bind , pub set_buffer_length : * mut sys :: godot_method_bind } impl AudioEffectCaptureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectCaptureMethodTable = AudioEffectCaptureMethodTable { class_constructor : None , can_get_buffer : 0 as * mut sys :: godot_method_bind , clear_buffer : 0 as * mut sys :: godot_method_bind , get_buffer : 0 as * mut sys :: godot_method_bind , get_buffer_length : 0 as * mut sys :: godot_method_bind , get_buffer_length_frames : 0 as * mut sys :: godot_method_bind , get_discarded_frames : 0 as * mut sys :: godot_method_bind , get_frames_available : 0 as * mut sys :: godot_method_bind , get_pushed_frames : 0 as * mut sys :: godot_method_bind , set_buffer_length : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AudioEffectCaptureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectCapture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "can_get_buffer\0" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\0" . as_ptr () as * const c_char) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\0" . as_ptr () as * const c_char) ; table . get_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length\0" . as_ptr () as * const c_char) ; table . get_buffer_length_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length_frames\0" . as_ptr () as * const c_char) ; table . get_discarded_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_discarded_frames\0" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\0" . as_ptr () as * const c_char) ; table . get_pushed_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_pushed_frames\0" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:634:2890 [INFO] [stdout] | [INFO] [stdout] 634 | ...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] 634 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:640:8609 [INFO] [stdout] | [INFO] [stdout] 640 | ... : 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] 640 | # [doc = "`core class CollisionPolygon` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_collisionpolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CollisionPolygon` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionPolygon inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionPolygon { this : RawObject < Self > , } impl CollisionPolygon { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionPolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Length that the resulting collision extends in either direction perpendicular to its polygon."] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Array of vertices which define the polygon.\n**Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the `polygon` member."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "If `true`, no collision will be produced."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Length that the resulting collision extends in either direction perpendicular to its polygon."] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [doc = "If `true`, no collision will be produced."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "Array of vertices which define the polygon.\n**Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the `polygon` member."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon { } unsafe impl GodotObject for CollisionPolygon { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionPolygon" } } impl QueueFree for CollisionPolygon { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionPolygon { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionPolygon { } impl Instanciable for CollisionPolygon { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CollisionPolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionPolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind } impl CollisionPolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionPolygonMethodTable = CollisionPolygonMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CollisionPolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionPolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:4:1652 [INFO] [stdout] | [INFO] [stdout] 4 | ...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] = 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-9b9d3e6ddcc0e9b9/out/generated.rs:34:1450 [INFO] [stdout] | [INFO] [stdout] 34 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:52:1408 [INFO] [stdout] | [INFO] [stdout] 52 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:76:1450 [INFO] [stdout] | [INFO] [stdout] 76 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:88:1908 [INFO] [stdout] | [INFO] [stdout] 88 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:100:1522 [INFO] [stdout] | [INFO] [stdout] 100 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:652:10863 [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 Resource` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_resource.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResource inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Resource { this : RawObject < Self > , } impl Resource { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing `true` to the `subresources` argument which will copy the subresources.\n**Note:** If `subresources` is `true`, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.\n# Default Arguments\n* `subresources` - `false`"] # [doc = ""] # [inline] pub fn duplicate (& self , subresources : bool) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallptr_obj_bool (method_bind , self . this . sys () . as_ptr () , subresources) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn emit_changed (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . emit_changed ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns `null`."] # [doc = ""] # [inline] pub fn get_local_scene (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_local_scene ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The name of the resource. This is an optional identifier."] # [doc = ""] # [inline] pub fn name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index."] # [doc = ""] # [inline] pub fn path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "If `true`, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene."] # [doc = ""] # [inline] pub fn is_local_to_scene (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . is_local_to_scene ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene."] # [doc = ""] # [inline] pub fn set_local_to_scene (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_local_to_scene ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The name of the resource. This is an optional identifier."] # [doc = ""] # [inline] pub fn set_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index."] # [doc = ""] # [inline] pub fn set_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script.\nFor most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport."] # [doc = ""] # [inline] pub fn setup_local_to_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . setup_local_to_scene ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path."] # [doc = ""] # [inline] pub fn take_over_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . take_over_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Resource { } unsafe impl GodotObject for Resource { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Resource" } } impl std :: ops :: Deref for Resource { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Resource { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Resource { } unsafe impl SubClass < crate :: generated :: object :: Object > for Resource { } impl Instanciable for Resource { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Resource :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub duplicate : * mut sys :: godot_method_bind , pub emit_changed : * mut sys :: godot_method_bind , pub get_local_scene : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub is_local_to_scene : * mut sys :: godot_method_bind , pub set_local_to_scene : * mut sys :: godot_method_bind , pub set_name : * mut sys :: godot_method_bind , pub set_path : * mut sys :: godot_method_bind , pub setup_local_to_scene : * mut sys :: godot_method_bind , pub take_over_path : * mut sys :: godot_method_bind } impl ResourceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceMethodTable = ResourceMethodTable { class_constructor : None , duplicate : 0 as * mut sys :: godot_method_bind , emit_changed : 0 as * mut sys :: godot_method_bind , get_local_scene : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , is_local_to_scene : 0 as * mut sys :: godot_method_bind , set_local_to_scene : 0 as * mut sys :: godot_method_bind , set_name : 0 as * mut sys :: godot_method_bind , set_path : 0 as * mut sys :: godot_method_bind , setup_local_to_scene : 0 as * mut sys :: godot_method_bind , take_over_path : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ResourceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Resource\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\0" . as_ptr () as * const c_char) ; table . get_local_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_local_scene\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . is_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "is_local_to_scene\0" . as_ptr () as * const c_char) ; table . set_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_local_to_scene\0" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\0" . as_ptr () as * const c_char) ; table . set_path = (gd_api . godot_method_bind_get_method) (class_name , "set_path\0" . as_ptr () as * const c_char) ; table . setup_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "setup_local_to_scene\0" . as_ptr () as * const c_char) ; table . take_over_path = (gd_api . godot_method_bind_get_method) (class_name , "take_over_path\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:658:7110 [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 singleton class TranslationServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_translationserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nTranslationServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TranslationServer { this : RawObject < Self > , } impl TranslationServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("TranslationServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a [Translation] resource."] # [doc = ""] # [inline] pub fn add_translation (& self , translation : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . add_translation ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , translation . as_arg_ptr ()) ; } } # [doc = "Clears the server from all translations."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns an Array of all loaded locales of the game."] # [doc = ""] # [inline] pub fn get_loaded_locales (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_loaded_locales ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current locale of the game."] # [doc = ""] # [inline] pub fn get_locale (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_locale ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns a locale's language and its variant (e.g. `\"en_US\"` would return `\"English (United States)\"`)."] # [doc = ""] # [inline] pub fn get_locale_name (& self , locale : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_locale_name ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Removes the given translation from the server."] # [doc = ""] # [inline] pub fn remove_translation (& self , translation : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . remove_translation ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , translation . as_arg_ptr ()) ; } } # [doc = "Sets the locale of the game."] # [doc = ""] # [inline] pub fn set_locale (& self , locale : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . set_locale ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; } } # [doc = "Returns the current locale's translation for the given message (key)."] # [doc = ""] # [inline] pub fn translate (& self , message : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for TranslationServer { } unsafe impl GodotObject for TranslationServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TranslationServer" } } impl std :: ops :: Deref for TranslationServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TranslationServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for TranslationServer { } unsafe impl Send for TranslationServer { } unsafe impl Sync for TranslationServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TranslationServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_translation : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_loaded_locales : * mut sys :: godot_method_bind , pub get_locale : * mut sys :: godot_method_bind , pub get_locale_name : * mut sys :: godot_method_bind , pub remove_translation : * mut sys :: godot_method_bind , pub set_locale : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind } impl TranslationServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TranslationServerMethodTable = TranslationServerMethodTable { class_constructor : None , add_translation : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_loaded_locales : 0 as * mut sys :: godot_method_bind , get_locale : 0 as * mut sys :: godot_method_bind , get_locale_name : 0 as * mut sys :: godot_method_bind , remove_translation : 0 as * mut sys :: godot_method_bind , set_locale : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind } ; &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 (|| { TranslationServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TranslationServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_translation = (gd_api . godot_method_bind_get_method) (class_name , "add_translation\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_loaded_locales = (gd_api . godot_method_bind_get_method) (class_name , "get_loaded_locales\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_locale_name = (gd_api . godot_method_bind_get_method) (class_name , "get_locale_name\0" . as_ptr () as * const c_char) ; table . remove_translation = (gd_api . godot_method_bind_get_method) (class_name , "remove_translation\0" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:160:1760 [INFO] [stdout] | [INFO] [stdout] 160 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:172:1873 [INFO] [stdout] | [INFO] [stdout] 172 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:190:1321 [INFO] [stdout] | [INFO] [stdout] 190 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:208:1244 [INFO] [stdout] | [INFO] [stdout] 208 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:214:1398 [INFO] [stdout] | [INFO] [stdout] 214 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:226:1872 [INFO] [stdout] | [INFO] [stdout] 226 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:664:10367 [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 CubeMap` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cubemap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCubeMap inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CubeMap { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : Flags = Flags (7i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Side (pub i64) ; impl Side { pub const LEFT : Side = Side (0i64) ; pub const RIGHT : Side = Side (1i64) ; pub const BOTTOM : Side = Side (2i64) ; pub const TOP : Side = Side (3i64) ; pub const FRONT : Side = Side (4i64) ; pub const BACK : Side = Side (5i64) ; } impl From < i64 > for Side { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Side > for i64 { # [inline] fn from (v : Side) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Storage (pub i64) ; impl Storage { pub const RAW : Storage = Storage (0i64) ; pub const COMPRESS_LOSSY : Storage = Storage (1i64) ; pub const COMPRESS_LOSSLESS : Storage = Storage (2i64) ; } impl From < i64 > for Storage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Storage > for i64 { # [inline] fn from (v : Storage) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CubeMap { pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const SIDE_BACK : i64 = 5i64 ; pub const SIDE_BOTTOM : i64 = 2i64 ; pub const SIDE_FRONT : i64 = 4i64 ; pub const SIDE_LEFT : i64 = 0i64 ; pub const SIDE_RIGHT : i64 = 1i64 ; pub const SIDE_TOP : i64 = 3i64 ; pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const STORAGE_RAW : i64 = 0i64 ; } impl CubeMap { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CubeMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The render flags for the [CubeMap]. See the [enum Flags] constants for details."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [CubeMap]'s height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn lossy_storage_quality (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_lossy_storage_quality ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants."] # [doc = ""] # [inline] pub fn get_side (& self , side : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_side ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , side) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [CubeMap]'s storage mode. See [enum Storage] constants."] # [doc = ""] # [inline] pub fn storage (& self) -> crate :: generated :: cube_map :: Storage { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_storage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cube_map :: Storage (ret) } } # [doc = "Returns the [CubeMap]'s width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The render flags for the [CubeMap]. See the [enum Flags] constants for details."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [doc = "The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn set_lossy_storage_quality (& self , quality : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_lossy_storage_quality ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = "Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants."] # [doc = ""] # [inline] pub fn set_side (& self , side : i64 , image : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_side ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , side , image . as_arg_ptr ()) ; } } # [doc = "The [CubeMap]'s storage mode. See [enum Storage] constants."] # [doc = ""] # [inline] pub fn set_storage (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_storage ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMap { } unsafe impl GodotObject for CubeMap { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMap" } } impl std :: ops :: Deref for CubeMap { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CubeMap { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CubeMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for CubeMap { } impl Instanciable for CubeMap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CubeMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CubeMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flags : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_lossy_storage_quality : * mut sys :: godot_method_bind , pub get_side : * mut sys :: godot_method_bind , pub get_storage : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind , pub set_lossy_storage_quality : * mut sys :: godot_method_bind , pub set_side : * mut sys :: godot_method_bind , pub set_storage : * mut sys :: godot_method_bind } impl CubeMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CubeMapMethodTable = CubeMapMethodTable { class_constructor : None , get_flags : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , get_side : 0 as * mut sys :: godot_method_bind , get_storage : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind , set_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , set_side : 0 as * mut sys :: godot_method_bind , set_storage : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CubeMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CubeMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . get_side = (gd_api . godot_method_bind_get_method) (class_name , "get_side\0" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; table . set_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . set_side = (gd_api . godot_method_bind_get_method) (class_name , "set_side\0" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:262:1462 [INFO] [stdout] | [INFO] [stdout] 262 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:274:1486 [INFO] [stdout] | [INFO] [stdout] 274 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:298:1442 [INFO] [stdout] | [INFO] [stdout] 298 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:304:1560 [INFO] [stdout] | [INFO] [stdout] 304 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:328:1186 [INFO] [stdout] | [INFO] [stdout] 328 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:382:1486 [INFO] [stdout] | [INFO] [stdout] 382 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:670:4352 [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 EncodedObjectAsID` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_encodedobjectasid.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEncodedObjectAsID inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EncodedObjectAsID { this : RawObject < Self > , } impl EncodedObjectAsID { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = EncodedObjectAsIDMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn object_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EncodedObjectAsIDMethodTable :: get (get_api ()) . get_object_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn set_object_id (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EncodedObjectAsIDMethodTable :: get (get_api ()) . set_object_id ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EncodedObjectAsID { } unsafe impl GodotObject for EncodedObjectAsID { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EncodedObjectAsID" } } impl std :: ops :: Deref for EncodedObjectAsID { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EncodedObjectAsID { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EncodedObjectAsID { } unsafe impl SubClass < crate :: generated :: object :: Object > for EncodedObjectAsID { } impl Instanciable for EncodedObjectAsID { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { EncodedObjectAsID :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EncodedObjectAsIDMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_object_id : * mut sys :: godot_method_bind , pub set_object_id : * mut sys :: godot_method_bind } impl EncodedObjectAsIDMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EncodedObjectAsIDMethodTable = EncodedObjectAsIDMethodTable { class_constructor : None , get_object_id : 0 as * mut sys :: godot_method_bind , set_object_id : 0 as * mut sys :: godot_method_bind } ; &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 (|| { EncodedObjectAsIDMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EncodedObjectAsID\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_object_id = (gd_api . godot_method_bind_get_method) (class_name , "get_object_id\0" . as_ptr () as * const c_char) ; table . set_object_id = (gd_api . godot_method_bind_get_method) (class_name , "set_object_id\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:676:4038 [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 Shape` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_shape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShape inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shape { this : RawObject < Self > , } impl Shape { # [doc = ""] # [doc = ""] # [inline] pub fn get_debug_mesh (& self) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_debug_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape { } unsafe impl GodotObject for Shape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape" } } impl std :: ops :: Deref for Shape { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shape { } unsafe impl SubClass < crate :: generated :: object :: Object > for Shape { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_debug_mesh : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind } impl ShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShapeMethodTable = ShapeMethodTable { class_constructor : None , get_debug_mesh : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_debug_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_mesh\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:388:1194 [INFO] [stdout] | [INFO] [stdout] 388 | ..._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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:682:4743 [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 VisualScriptPreload` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptpreload.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptPreload inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptPreload { this : RawObject < Self > , } impl VisualScriptPreload { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptPreloadMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn preload (& self) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . get_preload ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_preload (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . set_preload ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptPreload { } unsafe impl GodotObject for VisualScriptPreload { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPreload" } } impl std :: ops :: Deref for VisualScriptPreload { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPreload { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptPreload { } impl Instanciable for VisualScriptPreload { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptPreload :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptPreloadMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_preload : * mut sys :: godot_method_bind , pub set_preload : * mut sys :: godot_method_bind } impl VisualScriptPreloadMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptPreloadMethodTable = VisualScriptPreloadMethodTable { class_constructor : None , get_preload : 0 as * mut sys :: godot_method_bind , set_preload : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptPreloadMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptPreload\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_preload = (gd_api . godot_method_bind_get_method) (class_name , "get_preload\0" . as_ptr () as * const c_char) ; table . set_preload = (gd_api . godot_method_bind_get_method) (class_name , "set_preload\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:472:1771 [INFO] [stdout] | [INFO] [stdout] 472 | ...(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-9b9d3e6ddcc0e9b9/out/generated.rs:520:1458 [INFO] [stdout] | [INFO] [stdout] 520 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:544:1520 [INFO] [stdout] | [INFO] [stdout] 544 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:550:1478 [INFO] [stdout] | [INFO] [stdout] 550 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:592:1926 [INFO] [stdout] | [INFO] [stdout] 592 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:688:4465 [INFO] [stdout] | [INFO] [stdout] 688 | ...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] 688 | # [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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:622:1478 [INFO] [stdout] | [INFO] [stdout] 622 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:634:1458 [INFO] [stdout] | [INFO] [stdout] 634 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:688:1846 [INFO] [stdout] | [INFO] [stdout] 688 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:730:1349 [INFO] [stdout] | [INFO] [stdout] 730 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:742:1688 [INFO] [stdout] | [INFO] [stdout] 742 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:694:11283 [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 ParallaxBackground` inherits `CanvasLayer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_parallaxbackground.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ParallaxBackground` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParallaxBackground inherits methods from:\n - [CanvasLayer](struct.CanvasLayer.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ParallaxBackground { this : RawObject < Self > , } impl ParallaxBackground { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParallaxBackgroundMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work."] # [doc = ""] # [inline] pub fn limit_begin (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_limit_begin ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work."] # [doc = ""] # [inline] pub fn limit_end (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_limit_end ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The base position offset for all [ParallaxLayer] children."] # [doc = ""] # [inline] pub fn scroll_base_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_base_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The base motion scale for all [ParallaxLayer] children."] # [doc = ""] # [inline] pub fn scroll_base_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_base_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present."] # [doc = ""] # [inline] pub fn scroll_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, elements in [ParallaxLayer] child aren't affected by the zoom level of the camera."] # [doc = ""] # [inline] pub fn is_ignore_camera_zoom (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . is_ignore_camera_zoom ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, elements in [ParallaxLayer] child aren't affected by the zoom level of the camera."] # [doc = ""] # [inline] pub fn set_ignore_camera_zoom (& self , ignore : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_ignore_camera_zoom ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ignore) ; } } # [doc = "Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work."] # [doc = ""] # [inline] pub fn set_limit_begin (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_limit_begin ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work."] # [doc = ""] # [inline] pub fn set_limit_end (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_limit_end ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base position offset for all [ParallaxLayer] children."] # [doc = ""] # [inline] pub fn set_scroll_base_offset (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_base_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base motion scale for all [ParallaxLayer] children."] # [doc = ""] # [inline] pub fn set_scroll_base_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_base_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present."] # [doc = ""] # [inline] pub fn set_scroll_offset (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxBackground { } unsafe impl GodotObject for ParallaxBackground { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ParallaxBackground" } } impl QueueFree for ParallaxBackground { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ParallaxBackground { type Target = crate :: generated :: canvas_layer :: CanvasLayer ; # [inline] fn deref (& self) -> & crate :: generated :: canvas_layer :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxBackground { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: canvas_layer :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: canvas_layer :: CanvasLayer > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: node :: Node > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: object :: Object > for ParallaxBackground { } impl Instanciable for ParallaxBackground { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ParallaxBackground :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParallaxBackgroundMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_limit_begin : * mut sys :: godot_method_bind , pub get_limit_end : * mut sys :: godot_method_bind , pub get_scroll_base_offset : * mut sys :: godot_method_bind , pub get_scroll_base_scale : * mut sys :: godot_method_bind , pub get_scroll_offset : * mut sys :: godot_method_bind , pub is_ignore_camera_zoom : * mut sys :: godot_method_bind , pub set_ignore_camera_zoom : * mut sys :: godot_method_bind , pub set_limit_begin : * mut sys :: godot_method_bind , pub set_limit_end : * mut sys :: godot_method_bind , pub set_scroll_base_offset : * mut sys :: godot_method_bind , pub set_scroll_base_scale : * mut sys :: godot_method_bind , pub set_scroll_offset : * mut sys :: godot_method_bind } impl ParallaxBackgroundMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParallaxBackgroundMethodTable = ParallaxBackgroundMethodTable { class_constructor : None , get_limit_begin : 0 as * mut sys :: godot_method_bind , get_limit_end : 0 as * mut sys :: godot_method_bind , get_scroll_base_offset : 0 as * mut sys :: godot_method_bind , get_scroll_base_scale : 0 as * mut sys :: godot_method_bind , get_scroll_offset : 0 as * mut sys :: godot_method_bind , is_ignore_camera_zoom : 0 as * mut sys :: godot_method_bind , set_ignore_camera_zoom : 0 as * mut sys :: godot_method_bind , set_limit_begin : 0 as * mut sys :: godot_method_bind , set_limit_end : 0 as * mut sys :: godot_method_bind , set_scroll_base_offset : 0 as * mut sys :: godot_method_bind , set_scroll_base_scale : 0 as * mut sys :: godot_method_bind , set_scroll_offset : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ParallaxBackgroundMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ParallaxBackground\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_limit_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_limit_begin\0" . as_ptr () as * const c_char) ; table . get_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "get_limit_end\0" . as_ptr () as * const c_char) ; table . get_scroll_base_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_base_offset\0" . as_ptr () as * const c_char) ; table . get_scroll_base_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_base_scale\0" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\0" . as_ptr () as * const c_char) ; table . is_ignore_camera_zoom = (gd_api . godot_method_bind_get_method) (class_name , "is_ignore_camera_zoom\0" . as_ptr () as * const c_char) ; table . set_ignore_camera_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_ignore_camera_zoom\0" . as_ptr () as * const c_char) ; table . set_limit_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_begin\0" . as_ptr () as * const c_char) ; table . set_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_end\0" . as_ptr () as * const c_char) ; table . set_scroll_base_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_base_offset\0" . as_ptr () as * const c_char) ; table . set_scroll_base_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_base_scale\0" . as_ptr () as * const c_char) ; table . set_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_offset\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:754:1450 [INFO] [stdout] | [INFO] [stdout] 754 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:772:1926 [INFO] [stdout] | [INFO] [stdout] 772 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:784:1520 [INFO] [stdout] | [INFO] [stdout] 784 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:796:1464 [INFO] [stdout] | [INFO] [stdout] 796 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:826:1446 [INFO] [stdout] | [INFO] [stdout] 826 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:700:10056 [INFO] [stdout] | [INFO] [stdout] 700 | ... : 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] 700 | # [doc = "`core class AspectRatioContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_aspectratiocontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AspectRatioContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAspectRatioContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AspectRatioContainer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlignMode (pub i64) ; impl AlignMode { pub const BEGIN : AlignMode = AlignMode (0i64) ; pub const CENTER : AlignMode = AlignMode (1i64) ; pub const END : AlignMode = AlignMode (2i64) ; } impl From < i64 > for AlignMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlignMode > for i64 { # [inline] fn from (v : AlignMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const WIDTH_CONTROLS_HEIGHT : StretchMode = StretchMode (0i64) ; pub const HEIGHT_CONTROLS_WIDTH : StretchMode = StretchMode (1i64) ; pub const FIT : StretchMode = StretchMode (2i64) ; pub const COVER : StretchMode = StretchMode (3i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AspectRatioContainer { pub const ALIGN_BEGIN : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_END : i64 = 2i64 ; pub const STRETCH_COVER : i64 = 3i64 ; pub const STRETCH_FIT : i64 = 2i64 ; pub const STRETCH_HEIGHT_CONTROLS_WIDTH : i64 = 1i64 ; pub const STRETCH_WIDTH_CONTROLS_HEIGHT : i64 = 0i64 ; } impl AspectRatioContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AspectRatioContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn alignment_horizontal (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_horizontal ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn alignment_vertical (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_vertical ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: aspect_ratio_container :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: StretchMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alignment_horizontal (& self , alignment_horizontal : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_horizontal ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_horizontal) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alignment_vertical (& self , alignment_vertical : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_vertical ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_vertical) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , stretch_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AspectRatioContainer { } unsafe impl GodotObject for AspectRatioContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AspectRatioContainer" } } impl QueueFree for AspectRatioContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AspectRatioContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AspectRatioContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AspectRatioContainer { } impl Instanciable for AspectRatioContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AspectRatioContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AspectRatioContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_alignment_horizontal : * mut sys :: godot_method_bind , pub get_alignment_vertical : * mut sys :: godot_method_bind , pub get_ratio : * mut sys :: godot_method_bind , pub get_stretch_mode : * mut sys :: godot_method_bind , pub set_alignment_horizontal : * mut sys :: godot_method_bind , pub set_alignment_vertical : * mut sys :: godot_method_bind , pub set_ratio : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind } impl AspectRatioContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AspectRatioContainerMethodTable = AspectRatioContainerMethodTable { class_constructor : None , get_alignment_horizontal : 0 as * mut sys :: godot_method_bind , get_alignment_vertical : 0 as * mut sys :: godot_method_bind , get_ratio : 0 as * mut sys :: godot_method_bind , get_stretch_mode : 0 as * mut sys :: godot_method_bind , set_alignment_horizontal : 0 as * mut sys :: godot_method_bind , set_alignment_vertical : 0 as * mut sys :: godot_method_bind , set_ratio : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AspectRatioContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AspectRatioContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . get_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_vertical\0" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\0" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . set_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_vertical\0" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:706:4643 [INFO] [stdout] | [INFO] [stdout] 706 | ... : 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] 706 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:712:4567 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:850:1516 [INFO] [stdout] | [INFO] [stdout] 850 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:892:1477 [INFO] [stdout] | [INFO] [stdout] 892 | ..._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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:718:8153 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:898:1309 [INFO] [stdout] | [INFO] [stdout] 898 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:904:1458 [INFO] [stdout] | [INFO] [stdout] 904 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:910:1470 [INFO] [stdout] | [INFO] [stdout] 910 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:916:1494 [INFO] [stdout] | [INFO] [stdout] 916 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:922:1908 [INFO] [stdout] | [INFO] [stdout] 922 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:964:1553 [INFO] [stdout] | [INFO] [stdout] 964 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:976:1906 [INFO] [stdout] | [INFO] [stdout] 976 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:988:1798 [INFO] [stdout] | [INFO] [stdout] 988 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1066:1564 [INFO] [stdout] | [INFO] [stdout] 1066 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1108:1482 [INFO] [stdout] | [INFO] [stdout] 1108 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1198:1337 [INFO] [stdout] | [INFO] [stdout] 1198 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1228:1449 [INFO] [stdout] | [INFO] [stdout] 1228 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1240:1498 [INFO] [stdout] | [INFO] [stdout] 1240 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1258:1880 [INFO] [stdout] | [INFO] [stdout] 1258 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1264:1478 [INFO] [stdout] | [INFO] [stdout] 1264 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1306:1400 [INFO] [stdout] | [INFO] [stdout] 1306 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1348:1490 [INFO] [stdout] | [INFO] [stdout] 1348 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:724:27207 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:1378:1498 [INFO] [stdout] | [INFO] [stdout] 1378 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1402:1429 [INFO] [stdout] | [INFO] [stdout] 1402 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1408:1437 [INFO] [stdout] | [INFO] [stdout] 1408 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1444:1445 [INFO] [stdout] | [INFO] [stdout] 1444 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1474:1498 [INFO] [stdout] | [INFO] [stdout] 1474 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1492:1349 [INFO] [stdout] | [INFO] [stdout] 1492 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:736:15292 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:1582:1454 [INFO] [stdout] | [INFO] [stdout] 1582 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:742:4601 [INFO] [stdout] | [INFO] [stdout] 742 | ...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] 742 | # [doc = "`core class VisualShaderNodeTextureUniformTriplanar` inherits `VisualShaderNodeTextureUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetextureuniformtriplanar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTextureUniformTriplanar inherits methods from:\n - [VisualShaderNodeTextureUniform](struct.VisualShaderNodeTextureUniform.html)\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTextureUniformTriplanar { this : RawObject < Self > , } impl VisualShaderNodeTextureUniformTriplanar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTextureUniformTriplanarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTextureUniformTriplanar { } unsafe impl GodotObject for VisualShaderNodeTextureUniformTriplanar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTextureUniformTriplanar" } } impl std :: ops :: Deref for VisualShaderNodeTextureUniformTriplanar { type Target = crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTextureUniformTriplanar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_texture_uniform :: VisualShaderNodeTextureUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTextureUniformTriplanar { } impl Instanciable for VisualShaderNodeTextureUniformTriplanar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTextureUniformTriplanar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTextureUniformTriplanarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTextureUniformTriplanarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTextureUniformTriplanarMethodTable = VisualShaderNodeTextureUniformTriplanarMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeTextureUniformTriplanarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTextureUniformTriplanar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:1636:1572 [INFO] [stdout] | [INFO] [stdout] 1636 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1648:1341 [INFO] [stdout] | [INFO] [stdout] 1648 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1654:1482 [INFO] [stdout] | [INFO] [stdout] 1654 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1684:1792 [INFO] [stdout] | [INFO] [stdout] 1684 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1696:1365 [INFO] [stdout] | [INFO] [stdout] 1696 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1726:1458 [INFO] [stdout] | [INFO] [stdout] 1726 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1732:1498 [INFO] [stdout] | [INFO] [stdout] 1732 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1744:1460 [INFO] [stdout] | [INFO] [stdout] 1744 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1780:1442 [INFO] [stdout] | [INFO] [stdout] 1780 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1786:1874 [INFO] [stdout] | [INFO] [stdout] 1786 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1816:1365 [INFO] [stdout] | [INFO] [stdout] 1816 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:1924:1464 [INFO] [stdout] | [INFO] [stdout] 1924 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:748:8095 [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 WebSocketClient` inherits `WebSocketMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_websocketclient.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketClient inherits methods from:\n - [WebSocketMultiplayerPeer](struct.WebSocketMultiplayerPeer.html)\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketClient { this : RawObject < Self > , } impl WebSocketClient { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketClientMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn connect_to_url (& self , url : impl Into < GodotString > , protocols : StringArray , gd_mp_api : bool , custom_headers : StringArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . connect_to_url ; let ret = crate :: icalls :: icallptr_i64_str_strarr_bool_strarr (method_bind , self . this . sys () . as_ptr () , url . into () , protocols , gd_mp_api , custom_headers) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn disconnect_from_host (& self , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . disconnect_from_host ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , code , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_host (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_connected_host ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_connected_port ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn trusted_ssl_certificate (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_trusted_ssl_certificate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_verify_ssl_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . is_verify_ssl_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_trusted_ssl_certificate (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . set_trusted_ssl_certificate ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_verify_ssl_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . set_verify_ssl_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketClient { } unsafe impl GodotObject for WebSocketClient { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketClient" } } impl std :: ops :: Deref for WebSocketClient { type Target = crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketClient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketClient { } impl Instanciable for WebSocketClient { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebSocketClient :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketClientMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_url : * mut sys :: godot_method_bind , pub disconnect_from_host : * mut sys :: godot_method_bind , pub get_connected_host : * mut sys :: godot_method_bind , pub get_connected_port : * mut sys :: godot_method_bind , pub get_trusted_ssl_certificate : * mut sys :: godot_method_bind , pub is_verify_ssl_enabled : * mut sys :: godot_method_bind , pub set_trusted_ssl_certificate : * mut sys :: godot_method_bind , pub set_verify_ssl_enabled : * mut sys :: godot_method_bind } impl WebSocketClientMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketClientMethodTable = WebSocketClientMethodTable { class_constructor : None , connect_to_url : 0 as * mut sys :: godot_method_bind , disconnect_from_host : 0 as * mut sys :: godot_method_bind , get_connected_host : 0 as * mut sys :: godot_method_bind , get_connected_port : 0 as * mut sys :: godot_method_bind , get_trusted_ssl_certificate : 0 as * mut sys :: godot_method_bind , is_verify_ssl_enabled : 0 as * mut sys :: godot_method_bind , set_trusted_ssl_certificate : 0 as * mut sys :: godot_method_bind , set_verify_ssl_enabled : 0 as * mut sys :: godot_method_bind } ; &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 (|| { WebSocketClientMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketClient\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_url = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_url\0" . as_ptr () as * const c_char) ; table . disconnect_from_host = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_host\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_trusted_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_trusted_ssl_certificate\0" . as_ptr () as * const c_char) ; table . is_verify_ssl_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_verify_ssl_enabled\0" . as_ptr () as * const c_char) ; table . set_trusted_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_trusted_ssl_certificate\0" . as_ptr () as * const c_char) ; table . set_verify_ssl_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_verify_ssl_enabled\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:1942:1516 [INFO] [stdout] | [INFO] [stdout] 1942 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:1984:1506 [INFO] [stdout] | [INFO] [stdout] 1984 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:1990:1439 [INFO] [stdout] | [INFO] [stdout] 1990 | ...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] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:2086:1434 [INFO] [stdout] | [INFO] [stdout] 2086 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2092:1426 [INFO] [stdout] | [INFO] [stdout] 2092 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:754:3637 [INFO] [stdout] | [INFO] [stdout] 754 | ...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] 754 | # [doc = "`core class VisualScriptIndexSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptindexset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIndexSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIndexSet { this : RawObject < Self > , } impl VisualScriptIndexSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIndexSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIndexSet { } unsafe impl GodotObject for VisualScriptIndexSet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexSet" } } impl std :: ops :: Deref for VisualScriptIndexSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIndexSet { } impl Instanciable for VisualScriptIndexSet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptIndexSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIndexSetMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIndexSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIndexSetMethodTable = VisualScriptIndexSetMethodTable { class_constructor : None , } ; &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 (|| { VisualScriptIndexSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIndexSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:2110:1412 [INFO] [stdout] | [INFO] [stdout] 2110 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2122:1504 [INFO] [stdout] | [INFO] [stdout] 2122 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2134:1387 [INFO] [stdout] | [INFO] [stdout] 2134 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2152:1321 [INFO] [stdout] | [INFO] [stdout] 2152 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2176:1438 [INFO] [stdout] | [INFO] [stdout] 2176 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2242:1842 [INFO] [stdout] | [INFO] [stdout] 2242 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2248:1165 [INFO] [stdout] | [INFO] [stdout] 2248 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2278:1842 [INFO] [stdout] | [INFO] [stdout] 2278 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2296:1836 [INFO] [stdout] | [INFO] [stdout] 2296 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2350:1866 [INFO] [stdout] | [INFO] [stdout] 2350 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2368:1458 [INFO] [stdout] | [INFO] [stdout] 2368 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2386:1512 [INFO] [stdout] | [INFO] [stdout] 2386 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2458:1307 [INFO] [stdout] | [INFO] [stdout] 2458 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2464:1293 [INFO] [stdout] | [INFO] [stdout] 2464 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2500:1309 [INFO] [stdout] | [INFO] [stdout] 2500 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2560:1454 [INFO] [stdout] | [INFO] [stdout] 2560 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2578:1450 [INFO] [stdout] | [INFO] [stdout] 2578 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2602:1246 [INFO] [stdout] | [INFO] [stdout] 2602 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2608:1494 [INFO] [stdout] | [INFO] [stdout] 2608 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2614:1522 [INFO] [stdout] | [INFO] [stdout] 2614 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:2722:1478 [INFO] [stdout] | [INFO] [stdout] 2722 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2734:1454 [INFO] [stdout] | [INFO] [stdout] 2734 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2746:1490 [INFO] [stdout] | [INFO] [stdout] 2746 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2758:1353 [INFO] [stdout] | [INFO] [stdout] 2758 | ...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-9b9d3e6ddcc0e9b9/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-9b9d3e6ddcc0e9b9/out/generated.rs:2872:1830 [INFO] [stdout] | [INFO] [stdout] 2872 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2902:1470 [INFO] [stdout] | [INFO] [stdout] 2902 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:760:32579 [INFO] [stdout] | [INFO] [stdout] 760 | ... : 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] 760 | # [doc = "`core singleton class Input` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_input.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInput inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Input { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CursorShape (pub i64) ; impl CursorShape { pub const ARROW : CursorShape = CursorShape (0i64) ; pub const IBEAM : CursorShape = CursorShape (1i64) ; pub const POINTING_HAND : CursorShape = CursorShape (2i64) ; pub const CROSS : CursorShape = CursorShape (3i64) ; pub const WAIT : CursorShape = CursorShape (4i64) ; pub const BUSY : CursorShape = CursorShape (5i64) ; pub const DRAG : CursorShape = CursorShape (6i64) ; pub const CAN_DROP : CursorShape = CursorShape (7i64) ; pub const FORBIDDEN : CursorShape = CursorShape (8i64) ; pub const VSIZE : CursorShape = CursorShape (9i64) ; pub const HSIZE : CursorShape = CursorShape (10i64) ; pub const BDIAGSIZE : CursorShape = CursorShape (11i64) ; pub const FDIAGSIZE : CursorShape = CursorShape (12i64) ; pub const MOVE : CursorShape = CursorShape (13i64) ; pub const VSPLIT : CursorShape = CursorShape (14i64) ; pub const HSPLIT : CursorShape = CursorShape (15i64) ; pub const HELP : CursorShape = CursorShape (16i64) ; } impl From < i64 > for CursorShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CursorShape > for i64 { # [inline] fn from (v : CursorShape) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MouseMode (pub i64) ; impl MouseMode { pub const VISIBLE : MouseMode = MouseMode (0i64) ; pub const HIDDEN : MouseMode = MouseMode (1i64) ; pub const CAPTURED : MouseMode = MouseMode (2i64) ; pub const CONFINED : MouseMode = MouseMode (3i64) ; } impl From < i64 > for MouseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MouseMode > for i64 { # [inline] fn from (v : MouseMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Input { pub const CURSOR_ARROW : i64 = 0i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const CURSOR_HELP : i64 = 16i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const MOUSE_MODE_CAPTURED : i64 = 2i64 ; pub const MOUSE_MODE_CONFINED : i64 = 3i64 ; pub const MOUSE_MODE_HIDDEN : i64 = 1i64 ; pub const MOUSE_MODE_VISIBLE : i64 = 0i64 ; } impl Input { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Input\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "This will simulate pressing the specified action.\nThe strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action.\n**Note:** This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate `_input`, use [method parse_input_event] instead.\n# Default Arguments\n* `strength` - `1.0`"] # [doc = ""] # [inline] pub fn action_press (& self , action : impl Into < GodotString > , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_press ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , strength) ; } } # [doc = "If the specified action is already pressed, this will release it."] # [doc = ""] # [inline] pub fn action_release (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_release ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.\n# Default Arguments\n* `update_existing` - `false`"] # [doc = ""] # [inline] pub fn add_joy_mapping (& self , mapping : impl Into < GodotString > , update_existing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . add_joy_mapping ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , mapping . into () , update_existing) ; } } # [doc = "Returns the acceleration of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\nNote this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer.\n**Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_accelerometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_accelerometer ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1."] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns an [Array] containing the device IDs of all currently connected joypads."] # [doc = ""] # [inline] pub fn get_connected_joypads (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_connected_joypads ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently assigned cursor shape (see [enum CursorShape])."] # [doc = ""] # [inline] pub fn get_current_cursor_shape (& self) -> crate :: generated :: input :: CursorShape { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_current_cursor_shape ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: CursorShape (ret) } } # [doc = "Returns the gravity of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_gyroscope (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gyroscope ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current value of the joypad axis at given index (see [enum JoystickList])."] # [doc = ""] # [inline] pub fn get_joy_axis (& self , device : i64 , axis : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , axis) ; ret as _ } } # [doc = "Returns the index of the provided axis name."] # [doc = ""] # [inline] pub fn get_joy_axis_index_from_string (& self , axis : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_index_from_string ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , axis . into ()) ; ret as _ } } # [doc = "Receives a [enum JoystickList] axis and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_axis_string (& self , axis_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , axis_index) ; GodotString :: from_sys (ret) } } # [doc = "Returns the index of the provided button name."] # [doc = ""] # [inline] pub fn get_joy_button_index_from_string (& self , button : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_index_from_string ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , button . into ()) ; ret as _ } } # [doc = "Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_button_string (& self , button_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; GodotString :: from_sys (ret) } } # [doc = "Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns `\"Default Gamepad\"` otherwise."] # [doc = ""] # [inline] pub fn get_joy_guid (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_guid ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the joypad at the specified device index."] # [doc = ""] # [inline] pub fn get_joy_name (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [doc = "Returns the duration of the current vibration effect in seconds."] # [doc = ""] # [inline] pub fn get_joy_vibration_duration (& self , device : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_duration ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [doc = "Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor."] # [doc = ""] # [inline] pub fn get_joy_vibration_strength (& self , device : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_strength ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , device) ; mem :: transmute (ret) } } # [doc = "Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion."] # [doc = ""] # [inline] pub fn get_last_mouse_speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_last_mouse_speed ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and UWP. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_magnetometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_magnetometer ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together."] # [doc = ""] # [inline] pub fn get_mouse_button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_button_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the mouse mode. See the constants for more information."] # [doc = ""] # [inline] pub fn get_mouse_mode (& self) -> crate :: generated :: input :: MouseMode { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: MouseMode (ret) } } # [doc = "Returns `true` when the user starts pressing the action event, meaning it's `true` only on the frame that the user pressed down the button.\nThis is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed."] # [doc = ""] # [inline] pub fn is_action_just_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` when the user stops pressing the action event, meaning it's `true` only on the frame that the user released the button."] # [doc = ""] # [inline] pub fn is_action_just_released (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_released ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed."] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if you are pressing the joypad button (see [enum JoystickList])."] # [doc = ""] # [inline] pub fn is_joy_button_pressed (& self , device : i64 , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_button_pressed ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , button) ; ret as _ } } # [doc = "Returns `true` if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them."] # [doc = ""] # [inline] pub fn is_joy_known (& self , device : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_known ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [doc = "Returns `true` if you are pressing the key. You can pass a [enum KeyList] constant."] # [doc = ""] # [inline] pub fn is_key_pressed (& self , scancode : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_key_pressed ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; ret as _ } } # [doc = "Returns `true` if you are pressing the mouse button specified with [enum ButtonList]."] # [doc = ""] # [inline] pub fn is_mouse_button_pressed (& self , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_mouse_button_pressed ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , button) ; ret as _ } } # [doc = "Notifies the [Input] singleton that a connection has changed, to update the state for the `device` index.\nThis is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally."] # [doc = ""] # [inline] pub fn joy_connection_changed (& self , device : i64 , connected : bool , name : impl Into < GodotString > , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . joy_connection_changed ; let ret = crate :: icalls :: icallptr_void_i64_bool_str_str (method_bind , self . this . sys () . as_ptr () , device , connected , name . into () , guid . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFeeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.\nExample:\n```gdscript\nvar a = InputEventAction.new()\na.action = \"ui_cancel\"\na.pressed = true\nInput.parse_input_event(a)\n```"] # [doc = ""] # [inline] pub fn parse_input_event (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . parse_input_event ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Removes all mappings from the internal database that match the given GUID."] # [doc = ""] # [inline] pub fn remove_joy_mapping (& self , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . remove_joy_mapping ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , guid . into ()) ; } } # [doc = "Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing `null` to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes.\n`image`'s size must be lower than 256×256.\n`hotspot` must be within `image`'s size.\n**Note:** [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed.\n**Note:** Only images imported with the **Lossless**, **Lossy** or **Uncompressed** compression modes are supported. The **Video RAM** compression mode can't be used for custom cursors.\n# Default Arguments\n* `shape` - `0`\n* `hotspot` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_custom_mouse_cursor (& self , image : impl AsArg < crate :: generated :: resource :: Resource > , shape : i64 , hotspot : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_custom_mouse_cursor ; let ret = crate :: icalls :: icallptr_void_obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , shape , hotspot) ; } } # [doc = "Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].\n**Note:** If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.\n**Note:** This method generates an [InputEventMouseMotion] to update cursor immediately.\n# Default Arguments\n* `shape` - `0`"] # [doc = ""] # [inline] pub fn set_default_cursor_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_default_cursor_shape ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "Sets the mouse mode. See the constants for more information."] # [doc = ""] # [inline] pub fn set_mouse_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_mouse_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.\nInput accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input."] # [doc = ""] # [inline] pub fn set_use_accumulated_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_use_accumulated_input ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. `weak_magnitude` is the strength of the weak motor (between 0 and 1) and `strong_magnitude` is the strength of the strong motor (between 0 and 1). `duration` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).\n**Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.\n# Default Arguments\n* `duration` - `0`"] # [doc = ""] # [inline] pub fn start_joy_vibration (& self , device : i64 , weak_magnitude : f64 , strong_magnitude : f64 , duration : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . start_joy_vibration ; let ret = crate :: icalls :: icallptr_void_i64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , device , weak_magnitude , strong_magnitude , duration) ; } } # [doc = "Stops the vibration of the joypad."] # [doc = ""] # [inline] pub fn stop_joy_vibration (& self , device : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . stop_joy_vibration ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , device) ; } } # [doc = "Vibrate Android and iOS devices.\n**Note:** It needs VIBRATE permission for Android at export settings. iOS does not support duration.\n# Default Arguments\n* `duration_ms` - `500`"] # [doc = ""] # [inline] pub fn vibrate_handheld (& self , duration_ms : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . vibrate_handheld ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , duration_ms) ; } } # [doc = "Sets the mouse position to the specified vector."] # [doc = ""] # [inline] pub fn warp_mouse_position (& self , to : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . warp_mouse_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Input { } unsafe impl GodotObject for Input { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Input" } } impl std :: ops :: Deref for Input { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Input { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Input { } unsafe impl Send for Input { } unsafe impl Sync for Input { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputMethodTable { pub class_constructor : sys :: godot_class_constructor , pub action_press : * mut sys :: godot_method_bind , pub action_release : * mut sys :: godot_method_bind , pub add_joy_mapping : * mut sys :: godot_method_bind , pub get_accelerometer : * mut sys :: godot_method_bind , pub get_action_strength : * mut sys :: godot_method_bind , pub get_connected_joypads : * mut sys :: godot_method_bind , pub get_current_cursor_shape : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gyroscope : * mut sys :: godot_method_bind , pub get_joy_axis : * mut sys :: godot_method_bind , pub get_joy_axis_index_from_string : * mut sys :: godot_method_bind , pub get_joy_axis_string : * mut sys :: godot_method_bind , pub get_joy_button_index_from_string : * mut sys :: godot_method_bind , pub get_joy_button_string : * mut sys :: godot_method_bind , pub get_joy_guid : * mut sys :: godot_method_bind , pub get_joy_name : * mut sys :: godot_method_bind , pub get_joy_vibration_duration : * mut sys :: godot_method_bind , pub get_joy_vibration_strength : * mut sys :: godot_method_bind , pub get_last_mouse_speed : * mut sys :: godot_method_bind , pub get_magnetometer : * mut sys :: godot_method_bind , pub get_mouse_button_mask : * mut sys :: godot_method_bind , pub get_mouse_mode : * mut sys :: godot_method_bind , pub is_action_just_pressed : * mut sys :: godot_method_bind , pub is_action_just_released : * mut sys :: godot_method_bind , pub is_action_pressed : * mut sys :: godot_method_bind , pub is_joy_button_pressed : * mut sys :: godot_method_bind , pub is_joy_known : * mut sys :: godot_method_bind , pub is_key_pressed : * mut sys :: godot_method_bind , pub is_mouse_button_pressed : * mut sys :: godot_method_bind , pub joy_connection_changed : * mut sys :: godot_method_bind , pub parse_input_event : * mut sys :: godot_method_bind , pub remove_joy_mapping : * mut sys :: godot_method_bind , pub set_custom_mouse_cursor : * mut sys :: godot_method_bind , pub set_default_cursor_shape : * mut sys :: godot_method_bind , pub set_mouse_mode : * mut sys :: godot_method_bind , pub set_use_accumulated_input : * mut sys :: godot_method_bind , pub start_joy_vibration : * mut sys :: godot_method_bind , pub stop_joy_vibration : * mut sys :: godot_method_bind , pub vibrate_handheld : * mut sys :: godot_method_bind , pub warp_mouse_position : * mut sys :: godot_method_bind } impl InputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputMethodTable = InputMethodTable { class_constructor : None , action_press : 0 as * mut sys :: godot_method_bind , action_release : 0 as * mut sys :: godot_method_bind , add_joy_mapping : 0 as * mut sys :: godot_method_bind , get_accelerometer : 0 as * mut sys :: godot_method_bind , get_action_strength : 0 as * mut sys :: godot_method_bind , get_connected_joypads : 0 as * mut sys :: godot_method_bind , get_current_cursor_shape : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gyroscope : 0 as * mut sys :: godot_method_bind , get_joy_axis : 0 as * mut sys :: godot_method_bind , get_joy_axis_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_axis_string : 0 as * mut sys :: godot_method_bind , get_joy_button_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_button_string : 0 as * mut sys :: godot_method_bind , get_joy_guid : 0 as * mut sys :: godot_method_bind , get_joy_name : 0 as * mut sys :: godot_method_bind , get_joy_vibration_duration : 0 as * mut sys :: godot_method_bind , get_joy_vibration_strength : 0 as * mut sys :: godot_method_bind , get_last_mouse_speed : 0 as * mut sys :: godot_method_bind , get_magnetometer : 0 as * mut sys :: godot_method_bind , get_mouse_button_mask : 0 as * mut sys :: godot_method_bind , get_mouse_mode : 0 as * mut sys :: godot_method_bind , is_action_just_pressed : 0 as * mut sys :: godot_method_bind , is_action_just_released : 0 as * mut sys :: godot_method_bind , is_action_pressed : 0 as * mut sys :: godot_method_bind , is_joy_button_pressed : 0 as * mut sys :: godot_method_bind , is_joy_known : 0 as * mut sys :: godot_method_bind , is_key_pressed : 0 as * mut sys :: godot_method_bind , is_mouse_button_pressed : 0 as * mut sys :: godot_method_bind , joy_connection_changed : 0 as * mut sys :: godot_method_bind , parse_input_event : 0 as * mut sys :: godot_method_bind , remove_joy_mapping : 0 as * mut sys :: godot_method_bind , set_custom_mouse_cursor : 0 as * mut sys :: godot_method_bind , set_default_cursor_shape : 0 as * mut sys :: godot_method_bind , set_mouse_mode : 0 as * mut sys :: godot_method_bind , set_use_accumulated_input : 0 as * mut sys :: godot_method_bind , start_joy_vibration : 0 as * mut sys :: godot_method_bind , stop_joy_vibration : 0 as * mut sys :: godot_method_bind , vibrate_handheld : 0 as * mut sys :: godot_method_bind , warp_mouse_position : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Input\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . action_press = (gd_api . godot_method_bind_get_method) (class_name , "action_press\0" . as_ptr () as * const c_char) ; table . action_release = (gd_api . godot_method_bind_get_method) (class_name , "action_release\0" . as_ptr () as * const c_char) ; table . add_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_joy_mapping\0" . as_ptr () as * const c_char) ; table . get_accelerometer = (gd_api . godot_method_bind_get_method) (class_name , "get_accelerometer\0" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\0" . as_ptr () as * const c_char) ; table . get_connected_joypads = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_joypads\0" . as_ptr () as * const c_char) ; table . get_current_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_current_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gyroscope = (gd_api . godot_method_bind_get_method) (class_name , "get_gyroscope\0" . as_ptr () as * const c_char) ; table . get_joy_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis\0" . as_ptr () as * const c_char) ; table . get_joy_axis_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_axis_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_string\0" . as_ptr () as * const c_char) ; table . get_joy_guid = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_guid\0" . as_ptr () as * const c_char) ; table . get_joy_name = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_name\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_duration = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_duration\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_strength\0" . as_ptr () as * const c_char) ; table . get_last_mouse_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_last_mouse_speed\0" . as_ptr () as * const c_char) ; table . get_magnetometer = (gd_api . godot_method_bind_get_method) (class_name , "get_magnetometer\0" . as_ptr () as * const c_char) ; table . get_mouse_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_button_mask\0" . as_ptr () as * const c_char) ; table . get_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_mode\0" . as_ptr () as * const c_char) ; table . is_action_just_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_pressed\0" . as_ptr () as * const c_char) ; table . is_action_just_released = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_released\0" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_button_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_known = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_known\0" . as_ptr () as * const c_char) ; table . is_key_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_key_pressed\0" . as_ptr () as * const c_char) ; table . is_mouse_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_mouse_button_pressed\0" . as_ptr () as * const c_char) ; table . joy_connection_changed = (gd_api . godot_method_bind_get_method) (class_name , "joy_connection_changed\0" . as_ptr () as * const c_char) ; table . parse_input_event = (gd_api . godot_method_bind_get_method) (class_name , "parse_input_event\0" . as_ptr () as * const c_char) ; table . remove_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "remove_joy_mapping\0" . as_ptr () as * const c_char) ; table . set_custom_mouse_cursor = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_mouse_cursor\0" . as_ptr () as * const c_char) ; table . set_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . set_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_mode\0" . as_ptr () as * const c_char) ; table . set_use_accumulated_input = (gd_api . godot_method_bind_get_method) (class_name , "set_use_accumulated_input\0" . as_ptr () as * const c_char) ; table . start_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "start_joy_vibration\0" . as_ptr () as * const c_char) ; table . stop_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "stop_joy_vibration\0" . as_ptr () as * const c_char) ; table . vibrate_handheld = (gd_api . godot_method_bind_get_method) (class_name , "vibrate_handheld\0" . as_ptr () as * const c_char) ; table . warp_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse_position\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:766:7732 [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 ParallaxLayer` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_parallaxlayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ParallaxLayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParallaxLayer inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ParallaxLayer { this : RawObject < Self > , } impl ParallaxLayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParallaxLayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [Texture] will not be mirrored."] # [doc = ""] # [inline] pub fn mirroring (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_mirroring ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]."] # [doc = ""] # [inline] pub fn motion_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_motion_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll."] # [doc = ""] # [inline] pub fn motion_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_motion_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [Texture] will not be mirrored."] # [doc = ""] # [inline] pub fn set_mirroring (& self , mirror : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_mirroring ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , mirror) ; } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]."] # [doc = ""] # [inline] pub fn set_motion_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_motion_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll."] # [doc = ""] # [inline] pub fn set_motion_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_motion_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxLayer { } unsafe impl GodotObject for ParallaxLayer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ParallaxLayer" } } impl QueueFree for ParallaxLayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ParallaxLayer { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: node :: Node > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for ParallaxLayer { } impl Instanciable for ParallaxLayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ParallaxLayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParallaxLayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_mirroring : * mut sys :: godot_method_bind , pub get_motion_offset : * mut sys :: godot_method_bind , pub get_motion_scale : * mut sys :: godot_method_bind , pub set_mirroring : * mut sys :: godot_method_bind , pub set_motion_offset : * mut sys :: godot_method_bind , pub set_motion_scale : * mut sys :: godot_method_bind } impl ParallaxLayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParallaxLayerMethodTable = ParallaxLayerMethodTable { class_constructor : None , get_mirroring : 0 as * mut sys :: godot_method_bind , get_motion_offset : 0 as * mut sys :: godot_method_bind , get_motion_scale : 0 as * mut sys :: godot_method_bind , set_mirroring : 0 as * mut sys :: godot_method_bind , set_motion_offset : 0 as * mut sys :: godot_method_bind , set_motion_scale : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ParallaxLayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ParallaxLayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "get_mirroring\0" . as_ptr () as * const c_char) ; table . get_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_offset\0" . as_ptr () as * const c_char) ; table . get_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_scale\0" . as_ptr () as * const c_char) ; table . set_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "set_mirroring\0" . as_ptr () as * const c_char) ; table . set_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_offset\0" . as_ptr () as * const c_char) ; table . set_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:2938:1353 [INFO] [stdout] | [INFO] [stdout] 2938 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2992:1482 [INFO] [stdout] | [INFO] [stdout] 2992 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:2998:1556 [INFO] [stdout] | [INFO] [stdout] 2998 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3022:1458 [INFO] [stdout] | [INFO] [stdout] 3022 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:772:4781 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:3082:1516 [INFO] [stdout] | [INFO] [stdout] 3082 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:3088:1349 [INFO] [stdout] | [INFO] [stdout] 3088 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3202:1434 [INFO] [stdout] | [INFO] [stdout] 3202 | ..._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-9b9d3e6ddcc0e9b9/out/generated.rs:3256:1832 [INFO] [stdout] | [INFO] [stdout] 3256 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3274:1707 [INFO] [stdout] | [INFO] [stdout] 3274 | ..._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-9b9d3e6ddcc0e9b9/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-9b9d3e6ddcc0e9b9/out/generated.rs:3292:1353 [INFO] [stdout] | [INFO] [stdout] 3292 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:778:5195 [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 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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:3334:1474 [INFO] [stdout] | [INFO] [stdout] 3334 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:784:3927 [INFO] [stdout] | [INFO] [stdout] 784 | ...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] 784 | # [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: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:3340:1458 [INFO] [stdout] | [INFO] [stdout] 3340 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3346:1652 [INFO] [stdout] | [INFO] [stdout] 3346 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3448:1862 [INFO] [stdout] | [INFO] [stdout] 3448 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:790:6914 [INFO] [stdout] | [INFO] [stdout] 790 | ... : 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] 790 | # [doc = "`tools class EditorResourcePreview` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorresourcepreview.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorResourcePreview inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourcePreview { this : RawObject < Self > , } impl EditorResourcePreview { # [doc = "Create an own, custom preview generator."] # [doc = ""] # [inline] pub fn add_preview_generator (& self , generator : impl AsArg < crate :: generated :: editor_resource_preview_generator :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . add_preview_generator ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , generator . as_arg_ptr ()) ; } } # [doc = "Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted."] # [doc = ""] # [inline] pub fn check_for_invalidation (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . check_for_invalidation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything."] # [doc = ""] # [inline] pub fn queue_edited_resource_preview (& self , resource : impl AsArg < crate :: generated :: resource :: Resource > , receiver : impl AsArg < crate :: generated :: object :: Object > , receiver_func : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . queue_edited_resource_preview ; let ret = crate :: icalls :: icallptr_void_obj_obj_str_var (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr () , receiver . as_arg_ptr () , receiver_func . into () , userdata . owned_to_variant ()) ; } } # [doc = "Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything."] # [doc = ""] # [inline] pub fn queue_resource_preview (& self , path : impl Into < GodotString > , receiver : impl AsArg < crate :: generated :: object :: Object > , receiver_func : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . queue_resource_preview ; let ret = crate :: icalls :: icallptr_void_str_obj_str_var (method_bind , self . this . sys () . as_ptr () , path . into () , receiver . as_arg_ptr () , receiver_func . into () , userdata . owned_to_variant ()) ; } } # [doc = "Removes a custom preview generator."] # [doc = ""] # [inline] pub fn remove_preview_generator (& self , generator : impl AsArg < crate :: generated :: editor_resource_preview_generator :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . remove_preview_generator ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , generator . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePreview { } unsafe impl GodotObject for EditorResourcePreview { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorResourcePreview" } } impl QueueFree for EditorResourcePreview { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorResourcePreview { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreview { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorResourcePreview { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorResourcePreview { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourcePreviewMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_preview_generator : * mut sys :: godot_method_bind , pub check_for_invalidation : * mut sys :: godot_method_bind , pub queue_edited_resource_preview : * mut sys :: godot_method_bind , pub queue_resource_preview : * mut sys :: godot_method_bind , pub remove_preview_generator : * mut sys :: godot_method_bind } impl EditorResourcePreviewMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourcePreviewMethodTable = EditorResourcePreviewMethodTable { class_constructor : None , add_preview_generator : 0 as * mut sys :: godot_method_bind , check_for_invalidation : 0 as * mut sys :: godot_method_bind , queue_edited_resource_preview : 0 as * mut sys :: godot_method_bind , queue_resource_preview : 0 as * mut sys :: godot_method_bind , remove_preview_generator : 0 as * mut sys :: godot_method_bind } ; &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 (|| { EditorResourcePreviewMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourcePreview\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_preview_generator = (gd_api . godot_method_bind_get_method) (class_name , "add_preview_generator\0" . as_ptr () as * const c_char) ; table . check_for_invalidation = (gd_api . godot_method_bind_get_method) (class_name , "check_for_invalidation\0" . as_ptr () as * const c_char) ; table . queue_edited_resource_preview = (gd_api . godot_method_bind_get_method) (class_name , "queue_edited_resource_preview\0" . as_ptr () as * const c_char) ; table . queue_resource_preview = (gd_api . godot_method_bind_get_method) (class_name , "queue_resource_preview\0" . as_ptr () as * const c_char) ; table . remove_preview_generator = (gd_api . godot_method_bind_get_method) (class_name , "remove_preview_generator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:3496:1846 [INFO] [stdout] | [INFO] [stdout] 3496 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3538:1552 [INFO] [stdout] | [INFO] [stdout] 3538 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3544:1873 [INFO] [stdout] | [INFO] [stdout] 3544 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:796:3641 [INFO] [stdout] | [INFO] [stdout] 796 | ...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] 796 | # [doc = "`core class AudioEffectEQ10` inherits `AudioEffectEQ` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffecteq10.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ10 inherits methods from:\n - [AudioEffectEQ](struct.AudioEffectEQ.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ10 { this : RawObject < Self > , } impl AudioEffectEQ10 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQ10MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ10 { } unsafe impl GodotObject for AudioEffectEQ10 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ10" } } impl std :: ops :: Deref for AudioEffectEQ10 { type Target = crate :: generated :: audio_effect_eq :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ10 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_eq :: AudioEffectEQ > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ10 { } impl Instanciable for AudioEffectEQ10 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectEQ10 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQ10MethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectEQ10MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQ10MethodTable = AudioEffectEQ10MethodTable { class_constructor : None , } ; &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 (|| { AudioEffectEQ10MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ10\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:3580:1457 [INFO] [stdout] | [INFO] [stdout] 3580 | ...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-9b9d3e6ddcc0e9b9/out/generated.rs:3670:1258 [INFO] [stdout] | [INFO] [stdout] 3670 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-9b9d3e6ddcc0e9b9/out/generated.rs:802:18262 [INFO] [stdout] | [INFO] [stdout] 802 | ... : 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] 802 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:808:5075 [INFO] [stdout] | [INFO] [stdout] 808 | ... : 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] 808 | # [doc = "`core class CylinderShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cylindershape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCylinderShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CylinderShape { this : RawObject < Self > , } impl CylinderShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CylinderShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The cylinder's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The cylinder's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The cylinder's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The cylinder's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CylinderShape { } unsafe impl GodotObject for CylinderShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CylinderShape" } } impl std :: ops :: Deref for CylinderShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CylinderShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for CylinderShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CylinderShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CylinderShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CylinderShape { } impl Instanciable for CylinderShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CylinderShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CylinderShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CylinderShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CylinderShapeMethodTable = CylinderShapeMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CylinderShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CylinderShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:4:4401 [INFO] [stdout] | [INFO] [stdout] 4 | ...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] = 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 VisualShaderNodeGlobalExpression` inherits `VisualShaderNodeExpression` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeglobalexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeGlobalExpression inherits methods from:\n - [VisualShaderNodeExpression](struct.VisualShaderNodeExpression.html)\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeGlobalExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGlobalExpression { } unsafe impl GodotObject for VisualShaderNodeGlobalExpression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGlobalExpression" } } impl std :: ops :: Deref for VisualShaderNodeGlobalExpression { type Target = crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGlobalExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeGlobalExpression { } impl Instanciable for VisualShaderNodeGlobalExpression { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeGlobalExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeGlobalExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeGlobalExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeGlobalExpressionMethodTable = VisualShaderNodeGlobalExpressionMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeGlobalExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeGlobalExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:10:5425 [INFO] [stdout] | [INFO] [stdout] 10 | ... : 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] 10 | # [doc = "`core class VisualScriptReturn` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptreturn.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptReturn inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptReturn { this : RawObject < Self > , } impl VisualScriptReturn { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptReturnMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn return_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . get_return_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_return_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . is_return_value_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_enable_return_value (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_enable_return_value ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_return_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_return_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptReturn { } unsafe impl GodotObject for VisualScriptReturn { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptReturn" } } impl std :: ops :: Deref for VisualScriptReturn { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptReturn { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptReturn { } impl Instanciable for VisualScriptReturn { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptReturn :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptReturnMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_return_type : * mut sys :: godot_method_bind , pub is_return_value_enabled : * mut sys :: godot_method_bind , pub set_enable_return_value : * mut sys :: godot_method_bind , pub set_return_type : * mut sys :: godot_method_bind } impl VisualScriptReturnMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptReturnMethodTable = VisualScriptReturnMethodTable { class_constructor : None , get_return_type : 0 as * mut sys :: godot_method_bind , is_return_value_enabled : 0 as * mut sys :: godot_method_bind , set_enable_return_value : 0 as * mut sys :: godot_method_bind , set_return_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptReturnMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptReturn\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_return_type = (gd_api . godot_method_bind_get_method) (class_name , "get_return_type\0" . as_ptr () as * const c_char) ; table . is_return_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_return_value_enabled\0" . as_ptr () as * const c_char) ; table . set_enable_return_value = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_return_value\0" . as_ptr () as * const c_char) ; table . set_return_type = (gd_api . godot_method_bind_get_method) (class_name , "set_return_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:814:7571 [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 CollisionShape` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_collisionshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CollisionShape` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionShape inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionShape { this : RawObject < Self > , } impl CollisionShape { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A disabled collision shape has no effect in the world."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry."] # [doc = ""] # [inline] pub fn make_convex_from_brothers (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . make_convex_from_brothers ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If this method exists within a script it will be called whenever the shape resource has been modified."] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = "A disabled collision shape has no effect in the world."] # [doc = ""] # [inline] pub fn set_disabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionShape { } unsafe impl GodotObject for CollisionShape { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionShape" } } impl QueueFree for CollisionShape { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionShape { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionShape { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionShape { } impl Instanciable for CollisionShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CollisionShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shape : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub make_convex_from_brothers : * mut sys :: godot_method_bind , pub resource_changed : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl CollisionShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionShapeMethodTable = CollisionShapeMethodTable { class_constructor : None , get_shape : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , make_convex_from_brothers : 0 as * mut sys :: godot_method_bind , resource_changed : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CollisionShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . make_convex_from_brothers = (gd_api . godot_method_bind_get_method) (class_name , "make_convex_from_brothers\0" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:16:14333 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:820:5457 [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 singleton class ResourceSaver` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_resourcesaver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nResourceSaver inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceSaver { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SaverFlags (pub i64) ; impl SaverFlags { pub const RELATIVE_PATHS : SaverFlags = SaverFlags (1i64) ; pub const BUNDLE_RESOURCES : SaverFlags = SaverFlags (2i64) ; pub const CHANGE_PATH : SaverFlags = SaverFlags (4i64) ; pub const OMIT_EDITOR_PROPERTIES : SaverFlags = SaverFlags (8i64) ; pub const SAVE_BIG_ENDIAN : SaverFlags = SaverFlags (16i64) ; pub const COMPRESS : SaverFlags = SaverFlags (32i64) ; pub const REPLACE_SUBRESOURCE_PATHS : SaverFlags = SaverFlags (64i64) ; } impl From < i64 > for SaverFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SaverFlags > for i64 { # [inline] fn from (v : SaverFlags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ResourceSaver { pub const FLAG_BUNDLE_RESOURCES : i64 = 2i64 ; pub const FLAG_CHANGE_PATH : i64 = 4i64 ; pub const FLAG_COMPRESS : i64 = 32i64 ; pub const FLAG_OMIT_EDITOR_PROPERTIES : i64 = 8i64 ; pub const FLAG_RELATIVE_PATHS : i64 = 1i64 ; pub const FLAG_REPLACE_SUBRESOURCE_PATHS : i64 = 64i64 ; pub const FLAG_SAVE_BIG_ENDIAN : i64 = 16i64 ; } impl ResourceSaver { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ResourceSaver\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns the list of extensions available for saving a resource of a given type."] # [doc = ""] # [inline] pub fn get_recognized_extensions (& self , _type : impl AsArg < crate :: generated :: resource :: Resource >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . get_recognized_extensions ; let ret = crate :: icalls :: icallptr_strarr_obj (method_bind , self . this . sys () . as_ptr () , _type . as_arg_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.\nThe `flags` bitmask can be specified to customize the save behavior.\nReturns [constant OK] on success.\n# Default Arguments\n* `flags` - `0`"] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString > , resource : impl AsArg < crate :: generated :: resource :: Resource > , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64_str_obj_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , resource . as_arg_ptr () , flags) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceSaver { } unsafe impl GodotObject for ResourceSaver { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourceSaver" } } impl std :: ops :: Deref for ResourceSaver { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourceSaver { } unsafe impl Send for ResourceSaver { } unsafe impl Sync for ResourceSaver { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceSaverMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_recognized_extensions : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind } impl ResourceSaverMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceSaverMethodTable = ResourceSaverMethodTable { class_constructor : None , get_recognized_extensions : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ResourceSaverMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_ResourceSaver\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_recognized_extensions = (gd_api . godot_method_bind_get_method) (class_name , "get_recognized_extensions\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:826:3616 [INFO] [stdout] | [INFO] [stdout] 826 | ...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] 826 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:832:18273 [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 ArrayMesh` inherits `Mesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arraymesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nArrayMesh inherits methods from:\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ArrayMesh { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const BONES : ArrayFormat = ArrayFormat (64i64) ; pub const WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const INDEX : ArrayFormat = ArrayFormat (256i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ArrayMesh { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; } impl ArrayMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ArrayMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added."] # [doc = ""] # [inline] pub fn add_blend_shape (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_blend_shape ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Creates a new surface.\nSurfaces are created to be rendered using a `primitive`, which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the `surf_idx` for this new surface.\nThe `arrays` argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into \"index mode\" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.\nAdding an index array puts this function into \"index mode\" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.\n# Default Arguments\n* `blend_shapes` - `[ ]`\n* `compress_flags` - `97280`"] # [doc = ""] # [inline] pub fn add_surface_from_arrays (& self , primitive : i64 , arrays : VariantArray , blend_shapes : VariantArray , compress_flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_surface_from_arrays ; let ret = crate :: icalls :: icallptr_void_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , primitive , arrays , blend_shapes , compress_flags) ; } } # [doc = "Removes all blend shapes from this [ArrayMesh]."] # [doc = ""] # [inline] pub fn clear_blend_shapes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . clear_blend_shapes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of blend shapes that the [ArrayMesh] holds."] # [doc = ""] # [inline] pub fn get_blend_shape_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn blend_shape_mode (& self) -> crate :: generated :: mesh :: BlendShapeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: mesh :: BlendShapeMode (ret) } } # [doc = "Returns the name of the blend shape at this index."] # [doc = ""] # [inline] pub fn get_blend_shape_name (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn custom_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_custom_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping."] # [doc = ""] # [inline] pub fn lightmap_unwrap (& self , transform : Transform , texel_size : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . lightmap_unwrap ; let ret = crate :: icalls :: icallptr_i64_trans_f64 (method_bind , self . this . sys () . as_ptr () , transform , texel_size) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Will regenerate normal maps for the [ArrayMesh]."] # [doc = ""] # [inline] pub fn regen_normalmaps (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . regen_normalmaps ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn set_blend_shape_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_blend_shape_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned."] # [doc = ""] # [inline] pub fn surface_find_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_find_by_name ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_index_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_index_len ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_len ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the format mask of the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_format (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_format ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Gets the name assigned to this surface."] # [doc = ""] # [inline] pub fn surface_get_name (& self , surf_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the primitive type of the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_primitive_type (& self , surf_idx : i64) -> crate :: generated :: mesh :: PrimitiveType { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_primitive_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; crate :: generated :: mesh :: PrimitiveType (ret) } } # [doc = "Removes a surface at position `surf_idx`, shifting greater surfaces one `surf_idx` slot down."] # [doc = ""] # [inline] pub fn surface_remove (& self , surf_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; } } # [doc = "Sets a name for a given surface."] # [doc = ""] # [inline] pub fn surface_set_name (& self , surf_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_set_name ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , surf_idx , name . into ()) ; } } # [doc = "Updates a specified region of mesh arrays on the GPU.\n**Warning:** Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments."] # [doc = ""] # [inline] pub fn surface_update_region (& self , surf_idx : i64 , offset : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_update_region ; let ret = crate :: icalls :: icallptr_void_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , surf_idx , offset , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ArrayMesh { } unsafe impl GodotObject for ArrayMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ArrayMesh" } } impl std :: ops :: Deref for ArrayMesh { type Target = crate :: generated :: mesh :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ArrayMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for ArrayMesh { } impl Instanciable for ArrayMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ArrayMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ArrayMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_shape : * mut sys :: godot_method_bind , pub add_surface_from_arrays : * mut sys :: godot_method_bind , pub clear_blend_shapes : * mut sys :: godot_method_bind , pub get_blend_shape_count : * mut sys :: godot_method_bind , pub get_blend_shape_mode : * mut sys :: godot_method_bind , pub get_blend_shape_name : * mut sys :: godot_method_bind , pub get_custom_aabb : * mut sys :: godot_method_bind , pub lightmap_unwrap : * mut sys :: godot_method_bind , pub regen_normalmaps : * mut sys :: godot_method_bind , pub set_blend_shape_mode : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub surface_find_by_name : * mut sys :: godot_method_bind , pub surface_get_array_index_len : * mut sys :: godot_method_bind , pub surface_get_array_len : * mut sys :: godot_method_bind , pub surface_get_format : * mut sys :: godot_method_bind , pub surface_get_name : * mut sys :: godot_method_bind , pub surface_get_primitive_type : * mut sys :: godot_method_bind , pub surface_remove : * mut sys :: godot_method_bind , pub surface_set_name : * mut sys :: godot_method_bind , pub surface_update_region : * mut sys :: godot_method_bind } impl ArrayMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ArrayMeshMethodTable = ArrayMeshMethodTable { class_constructor : None , add_blend_shape : 0 as * mut sys :: godot_method_bind , add_surface_from_arrays : 0 as * mut sys :: godot_method_bind , clear_blend_shapes : 0 as * mut sys :: godot_method_bind , get_blend_shape_count : 0 as * mut sys :: godot_method_bind , get_blend_shape_mode : 0 as * mut sys :: godot_method_bind , get_blend_shape_name : 0 as * mut sys :: godot_method_bind , get_custom_aabb : 0 as * mut sys :: godot_method_bind , lightmap_unwrap : 0 as * mut sys :: godot_method_bind , regen_normalmaps : 0 as * mut sys :: godot_method_bind , set_blend_shape_mode : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , surface_find_by_name : 0 as * mut sys :: godot_method_bind , surface_get_array_index_len : 0 as * mut sys :: godot_method_bind , surface_get_array_len : 0 as * mut sys :: godot_method_bind , surface_get_format : 0 as * mut sys :: godot_method_bind , surface_get_name : 0 as * mut sys :: godot_method_bind , surface_get_primitive_type : 0 as * mut sys :: godot_method_bind , surface_remove : 0 as * mut sys :: godot_method_bind , surface_set_name : 0 as * mut sys :: godot_method_bind , surface_update_region : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ArrayMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ArrayMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_shape\0" . as_ptr () as * const c_char) ; table . add_surface_from_arrays = (gd_api . godot_method_bind_get_method) (class_name , "add_surface_from_arrays\0" . as_ptr () as * const c_char) ; table . clear_blend_shapes = (gd_api . godot_method_bind_get_method) (class_name , "clear_blend_shapes\0" . as_ptr () as * const c_char) ; table . get_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_count\0" . as_ptr () as * const c_char) ; table . get_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . get_blend_shape_name = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_name\0" . as_ptr () as * const c_char) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\0" . as_ptr () as * const c_char) ; table . lightmap_unwrap = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_unwrap\0" . as_ptr () as * const c_char) ; table . regen_normalmaps = (gd_api . godot_method_bind_get_method) (class_name , "regen_normalmaps\0" . as_ptr () as * const c_char) ; table . set_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . surface_find_by_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_find_by_name\0" . as_ptr () as * const c_char) ; table . surface_get_array_index_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_index_len\0" . as_ptr () as * const c_char) ; table . surface_get_array_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_len\0" . as_ptr () as * const c_char) ; table . surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_format\0" . as_ptr () as * const c_char) ; table . surface_get_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_name\0" . as_ptr () as * const c_char) ; table . surface_get_primitive_type = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_primitive_type\0" . as_ptr () as * const c_char) ; table . surface_remove = (gd_api . godot_method_bind_get_method) (class_name , "surface_remove\0" . as_ptr () as * const c_char) ; table . surface_set_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_name\0" . as_ptr () as * const c_char) ; table . surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "surface_update_region\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:22:15877 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:838:10063 [INFO] [stdout] | [INFO] [stdout] 838 | ... : 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] 838 | # [doc = "`core class CSGTorus` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgtorus.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGTorus` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGTorus inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGTorus { this : RawObject < Self > , } impl CSGTorus { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGTorusMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn inner_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_inner_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn outer_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_outer_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn ring_sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_ring_sides ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_sides ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_inner_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_inner_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_outer_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_outer_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ring_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_ring_sides ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_sides ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGTorus { } unsafe impl GodotObject for CSGTorus { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGTorus" } } impl QueueFree for CSGTorus { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGTorus { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGTorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGTorus { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGTorus { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGTorus { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGTorus { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGTorus { } impl Instanciable for CSGTorus { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGTorus :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGTorusMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_inner_radius : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_outer_radius : * mut sys :: godot_method_bind , pub get_ring_sides : * mut sys :: godot_method_bind , pub get_sides : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub set_inner_radius : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_outer_radius : * mut sys :: godot_method_bind , pub set_ring_sides : * mut sys :: godot_method_bind , pub set_sides : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGTorusMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGTorusMethodTable = CSGTorusMethodTable { class_constructor : None , get_inner_radius : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_outer_radius : 0 as * mut sys :: godot_method_bind , get_ring_sides : 0 as * mut sys :: godot_method_bind , get_sides : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , set_inner_radius : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_outer_radius : 0 as * mut sys :: godot_method_bind , set_ring_sides : 0 as * mut sys :: godot_method_bind , set_sides : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CSGTorusMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGTorus\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_inner_radius\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_outer_radius\0" . as_ptr () as * const c_char) ; table . get_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_ring_sides\0" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_inner_radius\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_outer_radius\0" . as_ptr () as * const c_char) ; table . set_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_ring_sides\0" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:844:6025 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:850:3905 [INFO] [stdout] | [INFO] [stdout] 850 | ...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] 850 | # [doc = "`core class AudioEffectLowShelfFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectlowshelffilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLowShelfFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLowShelfFilter { this : RawObject < Self > , } impl AudioEffectLowShelfFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLowShelfFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLowShelfFilter { } unsafe impl GodotObject for AudioEffectLowShelfFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowShelfFilter" } } impl std :: ops :: Deref for AudioEffectLowShelfFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLowShelfFilter { } impl Instanciable for AudioEffectLowShelfFilter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectLowShelfFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLowShelfFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectLowShelfFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLowShelfFilterMethodTable = AudioEffectLowShelfFilterMethodTable { class_constructor : None , } ; &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 (|| { AudioEffectLowShelfFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLowShelfFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:856:5667 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:862:5943 [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 class VisibilityNotifier` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visibilitynotifier.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VisibilityNotifier` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityNotifier inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityNotifier { this : RawObject < Self > , } impl VisibilityNotifier { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityNotifierMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The VisibilityNotifier's bounding box."] # [doc = ""] # [inline] pub fn aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the bounding box is on the screen.\n**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return `false` right after it is instantiated, even if it will be on screen in the draw pass."] # [doc = ""] # [inline] pub fn is_on_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . is_on_screen ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The VisibilityNotifier's bounding box."] # [doc = ""] # [inline] pub fn set_aabb (& self , rect : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . set_aabb ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier { } unsafe impl GodotObject for VisibilityNotifier { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityNotifier" } } impl QueueFree for VisibilityNotifier { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityNotifier { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityNotifier { } impl Instanciable for VisibilityNotifier { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisibilityNotifier :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityNotifierMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aabb : * mut sys :: godot_method_bind , pub is_on_screen : * mut sys :: godot_method_bind , pub set_aabb : * mut sys :: godot_method_bind } impl VisibilityNotifierMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityNotifierMethodTable = VisibilityNotifierMethodTable { class_constructor : None , get_aabb : 0 as * mut sys :: godot_method_bind , is_on_screen : 0 as * mut sys :: godot_method_bind , set_aabb : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisibilityNotifierMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityNotifier\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\0" . as_ptr () as * const c_char) ; table . set_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_aabb\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:868:28077 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:874:4948 [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 CurveTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_curvetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurveTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CurveTexture { this : RawObject < Self > , } impl CurveTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CurveTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The `curve` rendered onto the texture."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The `curve` rendered onto the texture."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } # [doc = "The width of the texture."] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CurveTexture { } unsafe impl GodotObject for CurveTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CurveTexture" } } impl std :: ops :: Deref for CurveTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CurveTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for CurveTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CurveTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CurveTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for CurveTexture { } impl Instanciable for CurveTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CurveTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CurveTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl CurveTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CurveTextureMethodTable = CurveTextureMethodTable { class_constructor : None , get_curve : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CurveTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CurveTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:28:41714 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:34:3637 [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 VisualScriptFunction` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptfunction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunction inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunction { this : RawObject < Self > , } impl VisualScriptFunction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunction { } unsafe impl GodotObject for VisualScriptFunction { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunction" } } impl std :: ops :: Deref for VisualScriptFunction { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunction { } impl Instanciable for VisualScriptFunction { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptFunction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptFunctionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionMethodTable = VisualScriptFunctionMethodTable { class_constructor : None , } ; &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 (|| { VisualScriptFunctionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:40:4375 [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 class VideoStreamTheora` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_videostreamtheora.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamTheora inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamTheora { this : RawObject < Self > , } impl VideoStreamTheora { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamTheoraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamTheora { } unsafe impl GodotObject for VideoStreamTheora { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamTheora" } } impl std :: ops :: Deref for VideoStreamTheora { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamTheora { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamTheora { } impl Instanciable for VideoStreamTheora { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VideoStreamTheora :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamTheoraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamTheoraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamTheoraMethodTable = VideoStreamTheoraMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VideoStreamTheoraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamTheora\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:880:13743 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:46:5646 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:52:3486 [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 ARVRInterfaceGDNative` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrinterfacegdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterfaceGDNative inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { this : RawObject < Self > , } impl ARVRInterfaceGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRInterfaceGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterfaceGDNative { } unsafe impl GodotObject for ARVRInterfaceGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterfaceGDNative" } } impl std :: ops :: Deref for ARVRInterfaceGDNative { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterfaceGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRInterfaceGDNative { } impl Instanciable for ARVRInterfaceGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ARVRInterfaceGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRInterfaceGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceGDNativeMethodTable = ARVRInterfaceGDNativeMethodTable { class_constructor : None , } ; &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 (|| { ARVRInterfaceGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterfaceGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:886:5471 [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 VisualScriptTypeCast` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscripttypecast.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptTypeCast inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptTypeCast { this : RawObject < Self > , } impl VisualScriptTypeCast { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptTypeCastMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptTypeCast { } unsafe impl GodotObject for VisualScriptTypeCast { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptTypeCast" } } impl std :: ops :: Deref for VisualScriptTypeCast { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptTypeCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptTypeCast { } impl Instanciable for VisualScriptTypeCast { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptTypeCast :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptTypeCastMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind } impl VisualScriptTypeCastMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptTypeCastMethodTable = VisualScriptTypeCastMethodTable { class_constructor : None , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptTypeCastMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptTypeCast\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:892:3766 [INFO] [stdout] | [INFO] [stdout] 892 | ...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] 892 | # [doc = "`core class WebRTCDataChannelGDNative` inherits `WebRTCDataChannel` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webrtcdatachannelgdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCDataChannelGDNative inherits methods from:\n - [WebRTCDataChannel](struct.WebRTCDataChannel.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCDataChannelGDNative { this : RawObject < Self > , } impl WebRTCDataChannelGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCDataChannelGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannelGDNative { } unsafe impl GodotObject for WebRTCDataChannelGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannelGDNative" } } impl std :: ops :: Deref for WebRTCDataChannelGDNative { type Target = crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel ; # [inline] fn deref (& self) -> & crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannelGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_rtc_data_channel :: WebRTCDataChannel > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCDataChannelGDNative { } impl Instanciable for WebRTCDataChannelGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebRTCDataChannelGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCDataChannelGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl WebRTCDataChannelGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCDataChannelGDNativeMethodTable = WebRTCDataChannelGDNativeMethodTable { class_constructor : None , } ; &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 (|| { WebRTCDataChannelGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCDataChannelGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:904:3679 [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 VisualShaderNodeCustom` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodecustom.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeCustom inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCustom { this : RawObject < Self > , } impl VisualShaderNodeCustom { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeCustomMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCustom { } unsafe impl GodotObject for VisualShaderNodeCustom { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCustom" } } impl std :: ops :: Deref for VisualShaderNodeCustom { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCustom { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeCustom { } impl Instanciable for VisualShaderNodeCustom { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeCustom :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeCustomMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeCustomMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeCustomMethodTable = VisualShaderNodeCustomMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeCustomMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeCustom\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:910:3742 [INFO] [stdout] | [INFO] [stdout] 910 | ...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] 910 | # [doc = "`core class VisualShaderNodeVectorLen` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorlen.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorLen inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorLen { this : RawObject < Self > , } impl VisualShaderNodeVectorLen { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorLenMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorLen { } unsafe impl GodotObject for VisualShaderNodeVectorLen { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorLen" } } impl std :: ops :: Deref for VisualShaderNodeVectorLen { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorLen { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorLen { } impl Instanciable for VisualShaderNodeVectorLen { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorLen :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorLenMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorLenMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorLenMethodTable = VisualShaderNodeVectorLenMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeVectorLenMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorLen\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:916:3868 [INFO] [stdout] | [INFO] [stdout] 916 | ...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] 916 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:58:16904 [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 Curve` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_curve.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurve inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Curve { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TangentMode (pub i64) ; impl TangentMode { pub const FREE : TangentMode = TangentMode (0i64) ; pub const LINEAR : TangentMode = TangentMode (1i64) ; pub const MODE_COUNT : TangentMode = TangentMode (2i64) ; } impl From < i64 > for TangentMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TangentMode > for i64 { # [inline] fn from (v : TangentMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Curve { pub const TANGENT_FREE : i64 = 0i64 ; pub const TANGENT_LINEAR : i64 = 1i64 ; pub const TANGENT_MODE_COUNT : i64 = 2i64 ; } impl Curve { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CurveMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point to the curve. For each side, if the `*_mode` is [constant TANGENT_LINEAR], the `*_tangent` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the `*_tangent` angle if `*_mode` is set to [constant TANGENT_FREE].\n# Default Arguments\n* `left_tangent` - `0`\n* `right_tangent` - `0`\n* `left_mode` - `0`\n* `right_mode` - `0`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , left_tangent : f64 , right_tangent : f64 , left_mode : i64 , right_mode : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_i64_vec2_f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , position , left_tangent , right_tangent , left_mode , right_mode) ; ret as _ } } # [doc = "Recomputes the baked cache of points for the curve."] # [doc = ""] # [inline] pub fn bake (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes points that are closer than `CMP_EPSILON` (0.00001) units to their neighbor on the curve."] # [doc = ""] # [inline] pub fn clean_dupes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clean_dupes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all points from the curve."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn bake_resolution (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_bake_resolution ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn max_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_max_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn min_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_min_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of points describing the curve."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the left [enum TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_mode ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [doc = "Returns the left tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_tangent ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [doc = "Returns the curve coordinates for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_position (& self , index : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , index) ; mem :: transmute (ret) } } # [doc = "Returns the right [enum TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_mode ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; crate :: generated :: curve :: TangentMode (ret) } } # [doc = "Returns the right tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_tangent ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ret as _ } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve."] # [doc = ""] # [inline] pub fn interpolate (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve using the baked cache. Bakes the curve's points if not already baked."] # [doc = ""] # [inline] pub fn interpolate_baked (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallptr_f64_f64 (method_bind , self . this . sys () . as_ptr () , offset) ; ret as _ } } # [doc = "Removes the point at `index` from the curve."] # [doc = ""] # [inline] pub fn remove_point (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn set_bake_resolution (& self , resolution : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_bake_resolution ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , resolution) ; } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn set_max_value (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_max_value ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn set_min_value (& self , min : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_min_value ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min) ; } } # [doc = "Sets the left [enum TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_left_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_mode ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [doc = "Sets the left tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_left_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_tangent ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [doc = "Sets the offset from `0.5`."] # [doc = ""] # [inline] pub fn set_point_offset (& self , index : i64 , offset : f64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_offset ; let ret = crate :: icalls :: icallptr_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , offset) ; ret as _ } } # [doc = "Sets the right [enum TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_right_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_mode ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , mode) ; } } # [doc = "Sets the right tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_right_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_tangent ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , tangent) ; } } # [doc = "Assigns the vertical position `y` to the point at `index`."] # [doc = ""] # [inline] pub fn set_point_value (& self , index : i64 , y : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_value ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , index , y) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve { } unsafe impl GodotObject for Curve { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve" } } impl std :: ops :: Deref for Curve { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Curve { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Curve { } unsafe impl SubClass < crate :: generated :: object :: Object > for Curve { } impl Instanciable for Curve { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Curve :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CurveMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub bake : * mut sys :: godot_method_bind , pub clean_dupes : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_bake_resolution : * mut sys :: godot_method_bind , pub get_max_value : * mut sys :: godot_method_bind , pub get_min_value : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_left_mode : * mut sys :: godot_method_bind , pub get_point_left_tangent : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_right_mode : * mut sys :: godot_method_bind , pub get_point_right_tangent : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub interpolate_baked : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_bake_resolution : * mut sys :: godot_method_bind , pub set_max_value : * mut sys :: godot_method_bind , pub set_min_value : * mut sys :: godot_method_bind , pub set_point_left_mode : * mut sys :: godot_method_bind , pub set_point_left_tangent : * mut sys :: godot_method_bind , pub set_point_offset : * mut sys :: godot_method_bind , pub set_point_right_mode : * mut sys :: godot_method_bind , pub set_point_right_tangent : * mut sys :: godot_method_bind , pub set_point_value : * mut sys :: godot_method_bind } impl CurveMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CurveMethodTable = CurveMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , bake : 0 as * mut sys :: godot_method_bind , clean_dupes : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_bake_resolution : 0 as * mut sys :: godot_method_bind , get_max_value : 0 as * mut sys :: godot_method_bind , get_min_value : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_left_mode : 0 as * mut sys :: godot_method_bind , get_point_left_tangent : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_right_mode : 0 as * mut sys :: godot_method_bind , get_point_right_tangent : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , interpolate_baked : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_bake_resolution : 0 as * mut sys :: godot_method_bind , set_max_value : 0 as * mut sys :: godot_method_bind , set_min_value : 0 as * mut sys :: godot_method_bind , set_point_left_mode : 0 as * mut sys :: godot_method_bind , set_point_left_tangent : 0 as * mut sys :: godot_method_bind , set_point_offset : 0 as * mut sys :: godot_method_bind , set_point_right_mode : 0 as * mut sys :: godot_method_bind , set_point_right_tangent : 0 as * mut sys :: godot_method_bind , set_point_value : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CurveMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Curve\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . clean_dupes = (gd_api . godot_method_bind_get_method) (class_name , "clean_dupes\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_resolution\0" . as_ptr () as * const c_char) ; table . get_max_value = (gd_api . godot_method_bind_get_method) (class_name , "get_max_value\0" . as_ptr () as * const c_char) ; table . get_min_value = (gd_api . godot_method_bind_get_method) (class_name , "get_min_value\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_mode\0" . as_ptr () as * const c_char) ; table . get_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_tangent\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_mode\0" . as_ptr () as * const c_char) ; table . get_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_tangent\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_resolution\0" . as_ptr () as * const c_char) ; table . set_max_value = (gd_api . godot_method_bind_get_method) (class_name , "set_max_value\0" . as_ptr () as * const c_char) ; table . set_min_value = (gd_api . godot_method_bind_get_method) (class_name , "set_min_value\0" . as_ptr () as * const c_char) ; table . set_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_mode\0" . as_ptr () as * const c_char) ; table . set_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_tangent\0" . as_ptr () as * const c_char) ; table . set_point_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_point_offset\0" . as_ptr () as * const c_char) ; table . set_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_mode\0" . as_ptr () as * const c_char) ; table . set_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_tangent\0" . as_ptr () as * const c_char) ; table . set_point_value = (gd_api . godot_method_bind_get_method) (class_name , "set_point_value\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:922:4707 [INFO] [stdout] | [INFO] [stdout] 922 | ...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] 922 | # [doc = "`core class VBoxContainer` inherits `BoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vboxcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VBoxContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVBoxContainer inherits methods from:\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VBoxContainer { this : RawObject < Self > , } impl VBoxContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VBoxContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VBoxContainer { } unsafe impl GodotObject for VBoxContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VBoxContainer" } } impl QueueFree for VBoxContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VBoxContainer { type Target = crate :: generated :: box_container :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VBoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: container :: Container > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for VBoxContainer { } impl Instanciable for VBoxContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VBoxContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VBoxContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VBoxContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VBoxContainerMethodTable = VBoxContainerMethodTable { class_constructor : None , } ; &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 (|| { VBoxContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VBoxContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:928:9838 [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 singleton class InputMap` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInputMap inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputMap { this : RawObject < Self > , } impl InputMap { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("InputMap\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds an [InputEvent] to an action. This [InputEvent] will trigger the action."] # [doc = ""] # [inline] pub fn action_add_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_add_event ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; } } # [doc = "Removes an [InputEvent] from an action."] # [doc = ""] # [inline] pub fn action_erase_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_erase_event ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; } } # [doc = "Removes all events from an action."] # [doc = ""] # [inline] pub fn action_erase_events (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_erase_events ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Returns `true` if the action has the given [InputEvent] associated with it."] # [doc = ""] # [inline] pub fn action_has_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_has_event ; let ret = crate :: icalls :: icallptr_bool_str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; ret as _ } } # [doc = "Sets a deadzone value for the action."] # [doc = ""] # [inline] pub fn action_set_deadzone (& self , action : impl Into < GodotString > , deadzone : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_set_deadzone ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone) ; } } # [doc = "Adds an empty action to the [InputMap] with a configurable `deadzone`.\nAn [InputEvent] can then be added to this action with [method action_add_event].\n# Default Arguments\n* `deadzone` - `0.5`"] # [doc = ""] # [inline] pub fn add_action (& self , action : impl Into < GodotString > , deadzone : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . add_action ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone) ; } } # [doc = "Removes an action from the [InputMap]."] # [doc = ""] # [inline] pub fn erase_action (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . erase_action ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Returns `true` if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior."] # [doc = ""] # [inline] pub fn event_is_action (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent > , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . event_is_action ; let ret = crate :: icalls :: icallptr_bool_obj_str (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns an array of [InputEvent]s associated with a given action."] # [doc = ""] # [inline] pub fn get_action_list (& self , action : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . get_action_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of all actions in the [InputMap]."] # [doc = ""] # [inline] pub fn get_actions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . get_actions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the [InputMap] has a registered action with the given name."] # [doc = ""] # [inline] pub fn has_action (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . has_action ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings]."] # [doc = ""] # [inline] pub fn load_from_globals (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . load_from_globals ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputMap { } unsafe impl GodotObject for InputMap { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InputMap" } } impl std :: ops :: Deref for InputMap { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for InputMap { } unsafe impl Send for InputMap { } unsafe impl Sync for InputMap { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub action_add_event : * mut sys :: godot_method_bind , pub action_erase_event : * mut sys :: godot_method_bind , pub action_erase_events : * mut sys :: godot_method_bind , pub action_has_event : * mut sys :: godot_method_bind , pub action_set_deadzone : * mut sys :: godot_method_bind , pub add_action : * mut sys :: godot_method_bind , pub erase_action : * mut sys :: godot_method_bind , pub event_is_action : * mut sys :: godot_method_bind , pub get_action_list : * mut sys :: godot_method_bind , pub get_actions : * mut sys :: godot_method_bind , pub has_action : * mut sys :: godot_method_bind , pub load_from_globals : * mut sys :: godot_method_bind } impl InputMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputMapMethodTable = InputMapMethodTable { class_constructor : None , action_add_event : 0 as * mut sys :: godot_method_bind , action_erase_event : 0 as * mut sys :: godot_method_bind , action_erase_events : 0 as * mut sys :: godot_method_bind , action_has_event : 0 as * mut sys :: godot_method_bind , action_set_deadzone : 0 as * mut sys :: godot_method_bind , add_action : 0 as * mut sys :: godot_method_bind , erase_action : 0 as * mut sys :: godot_method_bind , event_is_action : 0 as * mut sys :: godot_method_bind , get_action_list : 0 as * mut sys :: godot_method_bind , get_actions : 0 as * mut sys :: godot_method_bind , has_action : 0 as * mut sys :: godot_method_bind , load_from_globals : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . action_add_event = (gd_api . godot_method_bind_get_method) (class_name , "action_add_event\0" . as_ptr () as * const c_char) ; table . action_erase_event = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_event\0" . as_ptr () as * const c_char) ; table . action_erase_events = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_events\0" . as_ptr () as * const c_char) ; table . action_has_event = (gd_api . godot_method_bind_get_method) (class_name , "action_has_event\0" . as_ptr () as * const c_char) ; table . action_set_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "action_set_deadzone\0" . as_ptr () as * const c_char) ; table . add_action = (gd_api . godot_method_bind_get_method) (class_name , "add_action\0" . as_ptr () as * const c_char) ; table . erase_action = (gd_api . godot_method_bind_get_method) (class_name , "erase_action\0" . as_ptr () as * const c_char) ; table . event_is_action = (gd_api . godot_method_bind_get_method) (class_name , "event_is_action\0" . as_ptr () as * const c_char) ; table . get_action_list = (gd_api . godot_method_bind_get_method) (class_name , "get_action_list\0" . as_ptr () as * const c_char) ; table . get_actions = (gd_api . godot_method_bind_get_method) (class_name , "get_actions\0" . as_ptr () as * const c_char) ; table . has_action = (gd_api . godot_method_bind_get_method) (class_name , "has_action\0" . as_ptr () as * const c_char) ; table . load_from_globals = (gd_api . godot_method_bind_get_method) (class_name , "load_from_globals\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:934:13904 [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 AnimatedSprite` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animatedsprite.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AnimatedSprite` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimatedSprite inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedSprite { this : RawObject < Self > , } impl AnimatedSprite { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedSpriteMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if an animation is currently being played."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Plays the animation named `anim`. If no `anim` is provided, the current animation is played. If `backwards` is `true`, the animation will be played in reverse.\n# Default Arguments\n* `anim` - `\"\"`\n* `backwards` - `false`"] # [doc = ""] # [inline] pub fn play (& self , anim : impl Into < GodotString > , backwards : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , backwards) ; } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn set_animation (& self , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , animation . into ()) ; } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed_scale) ; } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: sprite_frames :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , sprite_frames . as_arg_ptr ()) ; } } # [doc = "Stops the current animation (does not reset the frame counter)."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite { } unsafe impl GodotObject for AnimatedSprite { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimatedSprite" } } impl QueueFree for AnimatedSprite { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimatedSprite { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedSprite { } impl Instanciable for AnimatedSprite { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimatedSprite :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedSpriteMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_sprite_frames : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_sprite_frames : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimatedSpriteMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedSpriteMethodTable = AnimatedSpriteMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_sprite_frames : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_sprite_frames : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AnimatedSpriteMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedSprite\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:64:25426 [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 Polygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_polygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Polygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Polygon2D { this : RawObject < Self > , } impl Polygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Polygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone with the specified `path` and `weights`."] # [doc = ""] # [inline] pub fn add_bone (& self , path : impl Into < NodePath > , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallptr_void_nodepath_f32arr (method_bind , self . this . sys () . as_ptr () , path . into () , weights) ; } } # [doc = "Removes all bones from this [Polygon2D]."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the specified bone from this [Polygon2D]."] # [doc = ""] # [inline] pub fn erase_bone (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . erase_bone ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of bones in this [Polygon2D]."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn get_bone_path (& self , index : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , index) ; NodePath :: from_sys (ret) } } # [doc = "Returns the height values of the specified bone."] # [doc = ""] # [inline] pub fn get_bone_weights (& self , index : i64) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_weights ; let ret = crate :: icalls :: icallptr_f32arr_i64 (method_bind , self . this . sys () . as_ptr () , index) ; Float32Array :: from_sys (ret) } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn internal_vertex_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_internal_vertex_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn invert (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn invert_border (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert_border ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn texture_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn texture_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn uv (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_uv ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn vertex_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_vertex_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "Sets the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn set_bone_path (& self , index : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_path ; let ret = crate :: icalls :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , index , path . into ()) ; } } # [doc = "Sets the weight values for the specified bone."] # [doc = ""] # [inline] pub fn set_bone_weights (& self , index : i64 , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_weights ; let ret = crate :: icalls :: icallptr_void_i64_f32arr (method_bind , self . this . sys () . as_ptr () , index , weights) ; } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_internal_vertex_count (& self , internal_vertex_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_internal_vertex_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , internal_vertex_count) ; } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn set_invert (& self , invert : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert) ; } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn set_invert_border (& self , invert_border : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert_border ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , invert_border) ; } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygons (& self , polygons : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygons ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , polygons) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , skeleton . into ()) ; } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn set_texture_rotation (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn set_texture_rotation_degrees (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn set_uv (& self , uv : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn set_vertex_colors (& self , vertex_colors : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_vertex_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , vertex_colors) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Polygon2D { } unsafe impl GodotObject for Polygon2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Polygon2D" } } impl QueueFree for Polygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Polygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Polygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Polygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Polygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Polygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Polygon2D { } impl Instanciable for Polygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Polygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Polygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub erase_bone : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_path : * mut sys :: godot_method_bind , pub get_bone_weights : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_internal_vertex_count : * mut sys :: godot_method_bind , pub get_invert : * mut sys :: godot_method_bind , pub get_invert_border : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygons : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_rotation : * mut sys :: godot_method_bind , pub get_texture_rotation_degrees : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_uv : * mut sys :: godot_method_bind , pub get_vertex_colors : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_bone_path : * mut sys :: godot_method_bind , pub set_bone_weights : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_internal_vertex_count : * mut sys :: godot_method_bind , pub set_invert : * mut sys :: godot_method_bind , pub set_invert_border : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_polygons : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_rotation : * mut sys :: godot_method_bind , pub set_texture_rotation_degrees : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_uv : * mut sys :: godot_method_bind , pub set_vertex_colors : * mut sys :: godot_method_bind } impl Polygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Polygon2DMethodTable = Polygon2DMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , erase_bone : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_path : 0 as * mut sys :: godot_method_bind , get_bone_weights : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_internal_vertex_count : 0 as * mut sys :: godot_method_bind , get_invert : 0 as * mut sys :: godot_method_bind , get_invert_border : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygons : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_rotation : 0 as * mut sys :: godot_method_bind , get_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_uv : 0 as * mut sys :: godot_method_bind , get_vertex_colors : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_bone_path : 0 as * mut sys :: godot_method_bind , set_bone_weights : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_internal_vertex_count : 0 as * mut sys :: godot_method_bind , set_invert : 0 as * mut sys :: godot_method_bind , set_invert_border : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_polygons : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_rotation : 0 as * mut sys :: godot_method_bind , set_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_uv : 0 as * mut sys :: godot_method_bind , set_vertex_colors : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Polygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Polygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . erase_bone = (gd_api . godot_method_bind_get_method) (class_name , "erase_bone\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_path\0" . as_ptr () as * const c_char) ; table . get_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_weights\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . get_invert = (gd_api . godot_method_bind_get_method) (class_name , "get_invert\0" . as_ptr () as * const c_char) ; table . get_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "get_invert_border\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygons = (gd_api . godot_method_bind_get_method) (class_name , "get_polygons\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation\0" . as_ptr () as * const c_char) ; table . get_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_uv\0" . as_ptr () as * const c_char) ; table . get_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_colors\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_path\0" . as_ptr () as * const c_char) ; table . set_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_weights\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "set_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . set_invert = (gd_api . godot_method_bind_get_method) (class_name , "set_invert\0" . as_ptr () as * const c_char) ; table . set_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_border\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_polygons = (gd_api . godot_method_bind_get_method) (class_name , "set_polygons\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation\0" . as_ptr () as * const c_char) ; table . set_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\0" . as_ptr () as * const c_char) ; table . set_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_colors\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:940:7531 [INFO] [stdout] | [INFO] [stdout] 940 | ... : 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] 940 | # [doc = "`core class MainLoop` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_mainloop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`MainLoop` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMainLoop inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MainLoop { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MainLoop { pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; pub const NOTIFICATION_OS_MEMORY_WARNING : i64 = 1009i64 ; pub const NOTIFICATION_TRANSLATION_CHANGED : i64 = 1010i64 ; pub const NOTIFICATION_WM_ABOUT : i64 = 1011i64 ; pub const NOTIFICATION_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; } impl MainLoop { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MainLoopMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Should not be called manually, override [method _finalize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _idle] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn idle (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . idle ; let ret = crate :: icalls :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } # [doc = "Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn init (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . init ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_event (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_event ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Should not be called manually, override [method _iteration] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn iteration (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . iteration ; let ret = crate :: icalls :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for MainLoop { } unsafe impl GodotObject for MainLoop { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MainLoop" } } impl std :: ops :: Deref for MainLoop { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MainLoop { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for MainLoop { } impl Instanciable for MainLoop { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MainLoop :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MainLoopMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub idle : * mut sys :: godot_method_bind , pub init : * mut sys :: godot_method_bind , pub input_event : * mut sys :: godot_method_bind , pub input_text : * mut sys :: godot_method_bind , pub iteration : * mut sys :: godot_method_bind } impl MainLoopMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MainLoopMethodTable = MainLoopMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , idle : 0 as * mut sys :: godot_method_bind , init : 0 as * mut sys :: godot_method_bind , input_event : 0 as * mut sys :: godot_method_bind , input_text : 0 as * mut sys :: godot_method_bind , iteration : 0 as * mut sys :: godot_method_bind } ; &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 (|| { MainLoopMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MainLoop\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . idle = (gd_api . godot_method_bind_get_method) (class_name , "idle\0" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\0" . as_ptr () as * const c_char) ; table . input_event = (gd_api . godot_method_bind_get_method) (class_name , "input_event\0" . as_ptr () as * const c_char) ; table . input_text = (gd_api . godot_method_bind_get_method) (class_name , "input_text\0" . as_ptr () as * const c_char) ; table . iteration = (gd_api . godot_method_bind_get_method) (class_name , "iteration\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:70:15251 [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 SceneState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_scenestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneState { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GenEditState (pub i64) ; impl GenEditState { pub const DISABLED : GenEditState = GenEditState (0i64) ; pub const INSTANCE : GenEditState = GenEditState (1i64) ; pub const MAIN : GenEditState = GenEditState (2i64) ; } impl From < i64 > for GenEditState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GenEditState > for i64 { # [inline] fn from (v : GenEditState) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneState { pub const GEN_EDIT_STATE_DISABLED : i64 = 0i64 ; pub const GEN_EDIT_STATE_INSTANCE : i64 = 1i64 ; pub const GEN_EDIT_STATE_MAIN : i64 = 2i64 ; } impl SceneState { # [doc = "Returns the list of bound parameters for the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_binds (& self , idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_binds ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of signal connections in the scene.\nThe `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`."] # [doc = ""] # [inline] pub fn get_connection_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the connection flags for the signal at `idx`. See [enum Object.ConnectFlags] constants."] # [doc = ""] # [inline] pub fn get_connection_flags (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_flags ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the method connected to the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_method (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_method ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_signal (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_signal ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path to the node that owns the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_source (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_source ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the path to the node that owns the method connected to the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_target (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_target ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the number of nodes in the scene.\nThe `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the list of group names associated with the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_groups (& self , idx : i64) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_groups ; let ret = crate :: icalls :: icallptr_strarr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; StringArray :: from_sys (ret) } } # [doc = "Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the `idx` argument used here and in other methods."] # [doc = ""] # [inline] pub fn get_node_index (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_index ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns a [PackedScene] for the node at `idx` (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance."] # [doc = ""] # [inline] pub fn get_node_instance (& self , idx : i64) -> Option < Ref < crate :: generated :: packed_scene :: PackedScene , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packed_scene :: PackedScene , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path to the represented scene file if the node at `idx` is an [InstancePlaceholder]."] # [doc = ""] # [inline] pub fn get_node_instance_placeholder (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance_placeholder ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path to the owner of the node at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_node_owner_path (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_owner_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; NodePath :: from_sys (ret) } } # [doc = "Returns the path to the node at `idx`.\nIf `for_parent` is `true`, returns the path of the `idx` node's parent instead.\n# Default Arguments\n* `for_parent` - `false`"] # [doc = ""] # [inline] pub fn get_node_path (& self , idx : i64 , for_parent : bool) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallptr_nodepath_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , for_parent) ; NodePath :: from_sys (ret) } } # [doc = "Returns the number of exported or overridden properties for the node at `idx`.\nThe `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_property_count (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_count ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the name of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_name (& self , idx : i64 , prop_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_name ; let ret = crate :: icalls :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the value of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_value (& self , idx : i64 , prop_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_value ; let ret = crate :: icalls :: icallptr_var_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx , prop_idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the type of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_type (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_type ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the node at `idx` is an [InstancePlaceholder]."] # [doc = ""] # [inline] pub fn is_node_instance_placeholder (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . is_node_instance_placeholder ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneState { } unsafe impl GodotObject for SceneState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneState" } } impl std :: ops :: Deref for SceneState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SceneState { } unsafe impl SubClass < crate :: generated :: object :: Object > for SceneState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_connection_binds : * mut sys :: godot_method_bind , pub get_connection_count : * mut sys :: godot_method_bind , pub get_connection_flags : * mut sys :: godot_method_bind , pub get_connection_method : * mut sys :: godot_method_bind , pub get_connection_signal : * mut sys :: godot_method_bind , pub get_connection_source : * mut sys :: godot_method_bind , pub get_connection_target : * mut sys :: godot_method_bind , pub get_node_count : * mut sys :: godot_method_bind , pub get_node_groups : * mut sys :: godot_method_bind , pub get_node_index : * mut sys :: godot_method_bind , pub get_node_instance : * mut sys :: godot_method_bind , pub get_node_instance_placeholder : * mut sys :: godot_method_bind , pub get_node_name : * mut sys :: godot_method_bind , pub get_node_owner_path : * mut sys :: godot_method_bind , pub get_node_path : * mut sys :: godot_method_bind , pub get_node_property_count : * mut sys :: godot_method_bind , pub get_node_property_name : * mut sys :: godot_method_bind , pub get_node_property_value : * mut sys :: godot_method_bind , pub get_node_type : * mut sys :: godot_method_bind , pub is_node_instance_placeholder : * mut sys :: godot_method_bind } impl SceneStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneStateMethodTable = SceneStateMethodTable { class_constructor : None , get_connection_binds : 0 as * mut sys :: godot_method_bind , get_connection_count : 0 as * mut sys :: godot_method_bind , get_connection_flags : 0 as * mut sys :: godot_method_bind , get_connection_method : 0 as * mut sys :: godot_method_bind , get_connection_signal : 0 as * mut sys :: godot_method_bind , get_connection_source : 0 as * mut sys :: godot_method_bind , get_connection_target : 0 as * mut sys :: godot_method_bind , get_node_count : 0 as * mut sys :: godot_method_bind , get_node_groups : 0 as * mut sys :: godot_method_bind , get_node_index : 0 as * mut sys :: godot_method_bind , get_node_instance : 0 as * mut sys :: godot_method_bind , get_node_instance_placeholder : 0 as * mut sys :: godot_method_bind , get_node_name : 0 as * mut sys :: godot_method_bind , get_node_owner_path : 0 as * mut sys :: godot_method_bind , get_node_path : 0 as * mut sys :: godot_method_bind , get_node_property_count : 0 as * mut sys :: godot_method_bind , get_node_property_name : 0 as * mut sys :: godot_method_bind , get_node_property_value : 0 as * mut sys :: godot_method_bind , get_node_type : 0 as * mut sys :: godot_method_bind , is_node_instance_placeholder : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SceneStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_connection_binds = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_binds\0" . as_ptr () as * const c_char) ; table . get_connection_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_count\0" . as_ptr () as * const c_char) ; table . get_connection_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_flags\0" . as_ptr () as * const c_char) ; table . get_connection_method = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_method\0" . as_ptr () as * const c_char) ; table . get_connection_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_signal\0" . as_ptr () as * const c_char) ; table . get_connection_source = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_source\0" . as_ptr () as * const c_char) ; table . get_connection_target = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_target\0" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\0" . as_ptr () as * const c_char) ; table . get_node_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_node_groups\0" . as_ptr () as * const c_char) ; table . get_node_index = (gd_api . godot_method_bind_get_method) (class_name , "get_node_index\0" . as_ptr () as * const c_char) ; table . get_node_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance\0" . as_ptr () as * const c_char) ; table . get_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance_placeholder\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_owner_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_owner_path\0" . as_ptr () as * const c_char) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . get_node_property_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_count\0" . as_ptr () as * const c_char) ; table . get_node_property_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_name\0" . as_ptr () as * const c_char) ; table . get_node_property_value = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_value\0" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\0" . as_ptr () as * const c_char) ; table . is_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "is_node_instance_placeholder\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:946:6738 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:952:6196 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:958:5411 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:76:3637 [INFO] [stdout] | [INFO] [stdout] 76 | ...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] 76 | # [doc = "`core class VisualScriptIndexGet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptindexget.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIndexGet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIndexGet { this : RawObject < Self > , } impl VisualScriptIndexGet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIndexGetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIndexGet { } unsafe impl GodotObject for VisualScriptIndexGet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexGet" } } impl std :: ops :: Deref for VisualScriptIndexGet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptIndexGet { } impl Instanciable for VisualScriptIndexGet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptIndexGet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIndexGetMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIndexGetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIndexGetMethodTable = VisualScriptIndexGetMethodTable { class_constructor : None , } ; &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 (|| { VisualScriptIndexGetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIndexGet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:82:5412 [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 VisualScriptLocalVar` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptlocalvar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVar inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVar { this : RawObject < Self > , } impl VisualScriptLocalVar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVar { } unsafe impl GodotObject for VisualScriptLocalVar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVar" } } impl std :: ops :: Deref for VisualScriptLocalVar { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVar { } impl Instanciable for VisualScriptLocalVar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptLocalVar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarMethodTable = VisualScriptLocalVarMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptLocalVarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:964:4051 [INFO] [stdout] | [INFO] [stdout] 964 | ...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] 964 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:970:6340 [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 Thread` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_thread.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nThread inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Thread { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Priority (pub i64) ; impl Priority { pub const LOW : Priority = Priority (0i64) ; pub const NORMAL : Priority = Priority (1i64) ; pub const HIGH : Priority = Priority (2i64) ; } impl From < i64 > for Priority { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Priority > for i64 { # [inline] fn from (v : Priority) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Thread { pub const PRIORITY_HIGH : i64 = 2i64 ; pub const PRIORITY_LOW : i64 = 0i64 ; pub const PRIORITY_NORMAL : i64 = 1i64 ; } impl Thread { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ThreadMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running this returns an empty string."] # [doc = ""] # [inline] pub fn get_id (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Starts a new [Thread] that runs `method` on object `instance` with `userdata` passed as an argument. Even if no userdata is passed, `method` must accept one argument and it will be null. The `priority` of the [Thread] can be changed by passing a value from the [enum Priority] enum.\nReturns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.\n# Default Arguments\n* `userdata` - `null`\n* `priority` - `1`"] # [doc = ""] # [inline] pub fn start (& self , instance : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant , priority : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallptr_i64_obj_str_var_i64 (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr () , method . into () , userdata . owned_to_variant () , priority) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Joins the [Thread] and waits for it to finish. Returns what the method called returned."] # [doc = ""] # [inline] pub fn wait_to_finish (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . wait_to_finish ; let ret = crate :: icalls :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Thread { } unsafe impl GodotObject for Thread { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Thread" } } impl std :: ops :: Deref for Thread { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Thread { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Thread { } unsafe impl SubClass < crate :: generated :: object :: Object > for Thread { } impl Instanciable for Thread { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Thread :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ThreadMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_id : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub wait_to_finish : * mut sys :: godot_method_bind } impl ThreadMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ThreadMethodTable = ThreadMethodTable { class_constructor : None , get_id : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , wait_to_finish : 0 as * mut sys :: godot_method_bind } ; &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 (|| { ThreadMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Thread\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . wait_to_finish = (gd_api . godot_method_bind_get_method) (class_name , "wait_to_finish\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:88:4707 [INFO] [stdout] | [INFO] [stdout] 88 | ...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] 88 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:976:4656 [INFO] [stdout] | [INFO] [stdout] 976 | ...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] 976 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:94:5952 [INFO] [stdout] | [INFO] [stdout] 94 | ... : 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] 94 | # [doc = "`core class AudioStreamMP3` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreammp3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMP3 inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMP3 { this : RawObject < Self > , } impl AudioStreamMP3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMP3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_loop_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop_offset (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop_offset ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMP3 { } unsafe impl GodotObject for AudioStreamMP3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMP3" } } impl std :: ops :: Deref for AudioStreamMP3 { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMP3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMP3 { } impl Instanciable for AudioStreamMP3 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamMP3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMP3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_loop_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_loop_offset : * mut sys :: godot_method_bind } impl AudioStreamMP3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMP3MethodTable = AudioStreamMP3MethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_loop_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_loop_offset : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AudioStreamMP3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMP3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:100:4015 [INFO] [stdout] | [INFO] [stdout] 100 | ...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] 100 | # [doc = "`core class VisualShaderNodeVectorScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorscalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorScalarSmoothStep { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarSmoothStep { } impl Instanciable for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarSmoothStepMethodTable = VisualShaderNodeVectorScalarSmoothStepMethodTable { class_constructor : None , } ; &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 (|| { VisualShaderNodeVectorScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:106:9748 [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 WebRTCDataChannel` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webrtcdatachannel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCDataChannel inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCDataChannel { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ChannelState (pub i64) ; impl ChannelState { pub const CONNECTING : ChannelState = ChannelState (0i64) ; pub const OPEN : ChannelState = ChannelState (1i64) ; pub const CLOSING : ChannelState = ChannelState (2i64) ; pub const CLOSED : ChannelState = ChannelState (3i64) ; } impl From < i64 > for ChannelState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ChannelState > for i64 { # [inline] fn from (v : ChannelState) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct WriteMode (pub i64) ; impl WriteMode { pub const TEXT : WriteMode = WriteMode (0i64) ; pub const BINARY : WriteMode = WriteMode (1i64) ; } impl From < i64 > for WriteMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < WriteMode > for i64 { # [inline] fn from (v : WriteMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCDataChannel { pub const STATE_CLOSED : i64 = 3i64 ; pub const STATE_CLOSING : i64 = 2i64 ; pub const STATE_CONNECTING : i64 = 0i64 ; pub const STATE_OPEN : i64 = 1i64 ; pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; } impl WebRTCDataChannel { # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_packet_life_time (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_packet_life_time ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_retransmits (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_retransmits ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_protocol (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_protocol ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_ready_state (& self) -> crate :: generated :: web_rtc_data_channel :: ChannelState { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_ready_state ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: ChannelState (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn write_mode (& self) -> crate :: generated :: web_rtc_data_channel :: WriteMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_write_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_rtc_data_channel :: WriteMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_negotiated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_negotiated ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_ordered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_ordered ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_write_mode (& self , write_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . set_write_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , write_mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn was_string_packet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . was_string_packet ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannel { } unsafe impl GodotObject for WebRTCDataChannel { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannel" } } impl std :: ops :: Deref for WebRTCDataChannel { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCDataChannel { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCDataChannelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub get_id : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_max_packet_life_time : * mut sys :: godot_method_bind , pub get_max_retransmits : * mut sys :: godot_method_bind , pub get_protocol : * mut sys :: godot_method_bind , pub get_ready_state : * mut sys :: godot_method_bind , pub get_write_mode : * mut sys :: godot_method_bind , pub is_negotiated : * mut sys :: godot_method_bind , pub is_ordered : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_write_mode : * mut sys :: godot_method_bind , pub was_string_packet : * mut sys :: godot_method_bind } impl WebRTCDataChannelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCDataChannelMethodTable = WebRTCDataChannelMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , get_id : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_max_packet_life_time : 0 as * mut sys :: godot_method_bind , get_max_retransmits : 0 as * mut sys :: godot_method_bind , get_protocol : 0 as * mut sys :: godot_method_bind , get_ready_state : 0 as * mut sys :: godot_method_bind , get_write_mode : 0 as * mut sys :: godot_method_bind , is_negotiated : 0 as * mut sys :: godot_method_bind , is_ordered : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_write_mode : 0 as * mut sys :: godot_method_bind , was_string_packet : 0 as * mut sys :: godot_method_bind } ; &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 (|| { WebRTCDataChannelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCDataChannel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_max_packet_life_time = (gd_api . godot_method_bind_get_method) (class_name , "get_max_packet_life_time\0" . as_ptr () as * const c_char) ; table . get_max_retransmits = (gd_api . godot_method_bind_get_method) (class_name , "get_max_retransmits\0" . as_ptr () as * const c_char) ; table . get_protocol = (gd_api . godot_method_bind_get_method) (class_name , "get_protocol\0" . as_ptr () as * const c_char) ; table . get_ready_state = (gd_api . godot_method_bind_get_method) (class_name , "get_ready_state\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_negotiated = (gd_api . godot_method_bind_get_method) (class_name , "is_negotiated\0" . as_ptr () as * const c_char) ; table . is_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_ordered\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:112:7780 [INFO] [stdout] | [INFO] [stdout] 112 | ... : 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] 112 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:982:30796 [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 LineEdit` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_lineedit.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`LineEdit` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLineEdit inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LineEdit { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MenuItems (pub i64) ; impl MenuItems { pub const CUT : MenuItems = MenuItems (0i64) ; pub const COPY : MenuItems = MenuItems (1i64) ; pub const PASTE : MenuItems = MenuItems (2i64) ; pub const CLEAR : MenuItems = MenuItems (3i64) ; pub const SELECT_ALL : MenuItems = MenuItems (4i64) ; pub const UNDO : MenuItems = MenuItems (5i64) ; pub const REDO : MenuItems = MenuItems (6i64) ; pub const MAX : MenuItems = MenuItems (7i64) ; } impl From < i64 > for MenuItems { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MenuItems > for i64 { # [inline] fn from (v : MenuItems) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LineEdit { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const MENU_CUT : i64 = 0i64 ; pub const MENU_MAX : i64 = 7i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; } impl LineEdit { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LineEditMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `text` after the cursor. If the resulting value is longer than [member max_length], nothing happens."] # [doc = ""] # [inline] pub fn append_at_cursor (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . append_at_cursor ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Erases the [LineEdit]'s [member text]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_get_blink_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_get_blink_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_speed ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_set_blink_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_set_blink_speed (& self , blink_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_speed ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , blink_speed) ; } } # [doc = "Deletes one character at the cursor's current position (equivalent to pressing the `Delete` key)."] # [doc = ""] # [inline] pub fn delete_char_at_cursor (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_char_at_cursor ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes a section of the [member text] going from position `from_column` to `to_column`. Both parameters should be within the text's length."] # [doc = ""] # [inline] pub fn delete_text (& self , from_column : i64 , to_column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_text ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_column , to_column) ; } } # [doc = "Clears the current selection."] # [doc = ""] # [inline] pub fn deselect (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum Align] enum."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: line_edit :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_edit :: Align (ret) } } # [doc = "The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn cursor_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_cursor_position ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member text] is shortened."] # [doc = ""] # [inline] pub fn expand_to_text_length (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_expand_to_text_length ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [doc = ""] # [inline] pub fn max_length (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_max_length ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member text])."] # [doc = ""] # [inline] pub fn placeholder (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Opacity of the [member placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn placeholder_alpha (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder_alpha ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn right_icon (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_right_icon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_scroll_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_scroll_offset ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn secret_character (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_secret_character ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal text_changed] signal."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the [LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn is_clear_button_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_clear_button_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn is_context_menu_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_context_menu_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, every character is replaced with the secret character (see [member secret_character])."] # [doc = ""] # [inline] pub fn is_secret (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_secret ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn is_selecting_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_selecting_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn is_shortcut_keys_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_shortcut_keys_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn is_virtual_keyboard_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Executes a given action as defined in the [enum MenuItems] enum."] # [doc = ""] # [inline] pub fn menu_option (& self , option : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . menu_option ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , option) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSelects characters inside [LineEdit] between `from` and `to`. By default, `from` is at the beginning and `to` at the end.\n```gdscript\ntext = \"Welcome\"\nselect() # Will select \"Welcome\".\nselect(4) # Will select \"ome\".\nselect(2, 5) # Will select \"lco\".\n```\n# Default Arguments\n* `from` - `0`\n* `to` - `-1`"] # [doc = ""] # [inline] pub fn select (& self , from : i64 , to : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; } } # [doc = "Selects the whole [String]."] # [doc = ""] # [inline] pub fn select_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select_all ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum Align] enum."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `true`, the [LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn set_clear_button_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_clear_button_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn set_context_menu_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_context_menu_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn set_cursor_position (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_cursor_position ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn set_editable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member text] is shortened."] # [doc = ""] # [inline] pub fn set_expand_to_text_length (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_expand_to_text_length ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [doc = ""] # [inline] pub fn set_max_length (& self , chars : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_max_length ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , chars) ; } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member text])."] # [doc = ""] # [inline] pub fn set_placeholder (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Opacity of the [member placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn set_placeholder_alpha (& self , alpha : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder_alpha ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , alpha) ; } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn set_right_icon (& self , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_right_icon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "If `true`, every character is replaced with the secret character (see [member secret_character])."] # [doc = ""] # [inline] pub fn set_secret (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn set_secret_character (& self , character : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret_character ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , character . into ()) ; } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn set_selecting_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_selecting_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn set_shortcut_keys_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_shortcut_keys_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal text_changed] signal."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn set_virtual_keyboard_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineEdit { } unsafe impl GodotObject for LineEdit { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LineEdit" } } impl QueueFree for LineEdit { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LineEdit { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for LineEdit { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LineEdit { } unsafe impl SubClass < crate :: generated :: node :: Node > for LineEdit { } unsafe impl SubClass < crate :: generated :: object :: Object > for LineEdit { } impl Instanciable for LineEdit { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { LineEdit :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LineEditMethodTable { pub class_constructor : sys :: godot_class_constructor , pub append_at_cursor : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub cursor_get_blink_enabled : * mut sys :: godot_method_bind , pub cursor_get_blink_speed : * mut sys :: godot_method_bind , pub cursor_set_blink_enabled : * mut sys :: godot_method_bind , pub cursor_set_blink_speed : * mut sys :: godot_method_bind , pub delete_char_at_cursor : * mut sys :: godot_method_bind , pub delete_text : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub get_align : * mut sys :: godot_method_bind , pub get_cursor_position : * mut sys :: godot_method_bind , pub get_expand_to_text_length : * mut sys :: godot_method_bind , pub get_max_length : * mut sys :: godot_method_bind , pub get_menu : * mut sys :: godot_method_bind , pub get_placeholder : * mut sys :: godot_method_bind , pub get_placeholder_alpha : * mut sys :: godot_method_bind , pub get_right_icon : * mut sys :: godot_method_bind , pub get_scroll_offset : * mut sys :: godot_method_bind , pub get_secret_character : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub is_clear_button_enabled : * mut sys :: godot_method_bind , pub is_context_menu_enabled : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_secret : * mut sys :: godot_method_bind , pub is_selecting_enabled : * mut sys :: godot_method_bind , pub is_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub is_virtual_keyboard_enabled : * mut sys :: godot_method_bind , pub menu_option : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub select_all : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_clear_button_enabled : * mut sys :: godot_method_bind , pub set_context_menu_enabled : * mut sys :: godot_method_bind , pub set_cursor_position : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_expand_to_text_length : * mut sys :: godot_method_bind , pub set_max_length : * mut sys :: godot_method_bind , pub set_placeholder : * mut sys :: godot_method_bind , pub set_placeholder_alpha : * mut sys :: godot_method_bind , pub set_right_icon : * mut sys :: godot_method_bind , pub set_secret : * mut sys :: godot_method_bind , pub set_secret_character : * mut sys :: godot_method_bind , pub set_selecting_enabled : * mut sys :: godot_method_bind , pub set_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_virtual_keyboard_enabled : * mut sys :: godot_method_bind } impl LineEditMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LineEditMethodTable = LineEditMethodTable { class_constructor : None , append_at_cursor : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , cursor_get_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_get_blink_speed : 0 as * mut sys :: godot_method_bind , cursor_set_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_set_blink_speed : 0 as * mut sys :: godot_method_bind , delete_char_at_cursor : 0 as * mut sys :: godot_method_bind , delete_text : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , get_align : 0 as * mut sys :: godot_method_bind , get_cursor_position : 0 as * mut sys :: godot_method_bind , get_expand_to_text_length : 0 as * mut sys :: godot_method_bind , get_max_length : 0 as * mut sys :: godot_method_bind , get_menu : 0 as * mut sys :: godot_method_bind , get_placeholder : 0 as * mut sys :: godot_method_bind , get_placeholder_alpha : 0 as * mut sys :: godot_method_bind , get_right_icon : 0 as * mut sys :: godot_method_bind , get_scroll_offset : 0 as * mut sys :: godot_method_bind , get_secret_character : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , is_clear_button_enabled : 0 as * mut sys :: godot_method_bind , is_context_menu_enabled : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_secret : 0 as * mut sys :: godot_method_bind , is_selecting_enabled : 0 as * mut sys :: godot_method_bind , is_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , is_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind , menu_option : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , select_all : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_clear_button_enabled : 0 as * mut sys :: godot_method_bind , set_context_menu_enabled : 0 as * mut sys :: godot_method_bind , set_cursor_position : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_expand_to_text_length : 0 as * mut sys :: godot_method_bind , set_max_length : 0 as * mut sys :: godot_method_bind , set_placeholder : 0 as * mut sys :: godot_method_bind , set_placeholder_alpha : 0 as * mut sys :: godot_method_bind , set_right_icon : 0 as * mut sys :: godot_method_bind , set_secret : 0 as * mut sys :: godot_method_bind , set_secret_character : 0 as * mut sys :: godot_method_bind , set_selecting_enabled : 0 as * mut sys :: godot_method_bind , set_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind } ; &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 (|| { LineEditMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LineEdit\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . append_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "append_at_cursor\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_speed\0" . as_ptr () as * const c_char) ; table . delete_char_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "delete_char_at_cursor\0" . as_ptr () as * const c_char) ; table . delete_text = (gd_api . godot_method_bind_get_method) (class_name , "delete_text\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_position\0" . as_ptr () as * const c_char) ; table . get_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . get_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_max_length\0" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\0" . as_ptr () as * const c_char) ; table . get_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder\0" . as_ptr () as * const c_char) ; table . get_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . get_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_right_icon\0" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\0" . as_ptr () as * const c_char) ; table . get_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "get_secret_character\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . is_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . is_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_secret = (gd_api . godot_method_bind_get_method) (class_name , "is_secret\0" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\0" . as_ptr () as * const c_char) ; table . is_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . is_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . set_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . set_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "set_cursor_position\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . set_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_max_length\0" . as_ptr () as * const c_char) ; table . set_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder\0" . as_ptr () as * const c_char) ; table . set_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . set_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_right_icon\0" . as_ptr () as * const c_char) ; table . set_secret = (gd_api . godot_method_bind_get_method) (class_name , "set_secret\0" . as_ptr () as * const c_char) ; table . set_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "set_secret_character\0" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\0" . as_ptr () as * const c_char) ; table . set_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:118:7922 [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 NoiseTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_noisetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNoiseTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NoiseTexture { this : RawObject < Self > , } impl NoiseTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NoiseTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn bump_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_bump_strength ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn noise (& self) -> Option < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_noise ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: open_simplex_noise :: OpenSimplexNoise , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn seamless (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_seamless ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_normalmap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . is_normalmap ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_as_normalmap (& self , as_normalmap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_as_normalmap ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , as_normalmap) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bump_strength (& self , bump_strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_bump_strength ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bump_strength) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_noise (& self , noise : impl AsArg < crate :: generated :: open_simplex_noise :: OpenSimplexNoise >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_noise ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , noise . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_seamless (& self , seamless : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_seamless ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , seamless) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NoiseTexture { } unsafe impl GodotObject for NoiseTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NoiseTexture" } } impl std :: ops :: Deref for NoiseTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NoiseTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for NoiseTexture { } impl Instanciable for NoiseTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NoiseTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NoiseTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bump_strength : * mut sys :: godot_method_bind , pub get_noise : * mut sys :: godot_method_bind , pub get_seamless : * mut sys :: godot_method_bind , pub is_normalmap : * mut sys :: godot_method_bind , pub set_as_normalmap : * mut sys :: godot_method_bind , pub set_bump_strength : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_noise : * mut sys :: godot_method_bind , pub set_seamless : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl NoiseTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NoiseTextureMethodTable = NoiseTextureMethodTable { class_constructor : None , get_bump_strength : 0 as * mut sys :: godot_method_bind , get_noise : 0 as * mut sys :: godot_method_bind , get_seamless : 0 as * mut sys :: godot_method_bind , is_normalmap : 0 as * mut sys :: godot_method_bind , set_as_normalmap : 0 as * mut sys :: godot_method_bind , set_bump_strength : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_noise : 0 as * mut sys :: godot_method_bind , set_seamless : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; &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 (|| { NoiseTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NoiseTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_bump_strength\0" . as_ptr () as * const c_char) ; table . get_noise = (gd_api . godot_method_bind_get_method) (class_name , "get_noise\0" . as_ptr () as * const c_char) ; table . get_seamless = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless\0" . as_ptr () as * const c_char) ; table . is_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "is_normalmap\0" . as_ptr () as * const c_char) ; table . set_as_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_as_normalmap\0" . as_ptr () as * const c_char) ; table . set_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_bump_strength\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_noise = (gd_api . godot_method_bind_get_method) (class_name , "set_noise\0" . as_ptr () as * const c_char) ; table . set_seamless = (gd_api . godot_method_bind_get_method) (class_name , "set_seamless\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:988:4315 [INFO] [stdout] | [INFO] [stdout] 988 | ...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] 988 | # [doc = "`core class Position2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_position2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Position2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPosition2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Position2D { this : RawObject < Self > , } impl Position2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Position2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Position2D { } unsafe impl GodotObject for Position2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Position2D" } } impl QueueFree for Position2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Position2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Position2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Position2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Position2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Position2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Position2D { } impl Instanciable for Position2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Position2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Position2DMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl Position2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Position2DMethodTable = Position2DMethodTable { class_constructor : None , } ; &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 (|| { Position2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Position2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:994:4152 [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 Semaphore` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_semaphore.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSemaphore inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Semaphore { this : RawObject < Self > , } impl Semaphore { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SemaphoreMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Lowers the [Semaphore], allowing one more thread in. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [doc = ""] # [inline] pub fn post (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SemaphoreMethodTable :: get (get_api ()) . post ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [doc = ""] # [inline] pub fn wait (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SemaphoreMethodTable :: get (get_api ()) . wait ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Semaphore { } unsafe impl GodotObject for Semaphore { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Semaphore" } } impl std :: ops :: Deref for Semaphore { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Semaphore { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Semaphore { } unsafe impl SubClass < crate :: generated :: object :: Object > for Semaphore { } impl Instanciable for Semaphore { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Semaphore :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SemaphoreMethodTable { pub class_constructor : sys :: godot_class_constructor , pub post : * mut sys :: godot_method_bind , pub wait : * mut sys :: godot_method_bind } impl SemaphoreMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SemaphoreMethodTable = SemaphoreMethodTable { class_constructor : None , post : 0 as * mut sys :: godot_method_bind , wait : 0 as * mut sys :: godot_method_bind } ; &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 (|| { SemaphoreMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Semaphore\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . post = (gd_api . godot_method_bind_get_method) (class_name , "post\0" . as_ptr () as * const c_char) ; table . 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-9b9d3e6ddcc0e9b9/out/generated.rs:124:13732 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:130:5633 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:136:13645 [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 = "`core class UndoRedo` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_undoredo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`UndoRedo` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nUndoRedo inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UndoRedo { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MergeMode (pub i64) ; impl MergeMode { pub const DISABLE : MergeMode = MergeMode (0i64) ; pub const ENDS : MergeMode = MergeMode (1i64) ; pub const ALL : MergeMode = MergeMode (2i64) ; } impl From < i64 > for MergeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MergeMode > for i64 { # [inline] fn from (v : MergeMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UndoRedo { pub const MERGE_ALL : i64 = 2i64 ; pub const MERGE_DISABLE : i64 = 0i64 ; pub const MERGE_ENDS : i64 = 1i64 ; } impl UndoRedo { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UndoRedoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Register a method that will be called when the action is committed."] # [doc = ""] # [inline] pub fn add_do_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"do\"."] # [doc = ""] # [inline] pub fn add_do_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"do\" that will be erased if the \"do\" history is lost. This is useful mostly for new nodes created for the \"do\" call. Do not use for resources."] # [doc = ""] # [inline] pub fn add_do_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Register a method that will be called when the action is undone."] # [doc = ""] # [inline] pub fn add_undo_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"undo\"."] # [doc = ""] # [inline] pub fn add_undo_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"undo\" that will be erased if the \"undo\" history is lost. This is useful mostly for nodes removed with the \"do\" call (not the \"undo\" call!)."] # [doc = ""] # [inline] pub fn add_undo_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Clear the undo/redo history and associated references.\nPassing `false` to `increase_version` will prevent the version number to be increased from this.\n# Default Arguments\n* `increase_version` - `true`"] # [doc = ""] # [inline] pub fn clear_history (& self , increase_version : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . clear_history ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , increase_version) ; } } # [doc = "Commit the action. All \"do\" methods/properties are called/set when this function is called."] # [doc = ""] # [inline] pub fn commit_action (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . commit_action ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].\nThe way actions are merged is dictated by the `merge_mode` argument. See [enum MergeMode] for details.\n# Default Arguments\n* `merge_mode` - `0`"] # [doc = ""] # [inline] pub fn create_action (& self , name : impl Into < GodotString > , merge_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . create_action ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , merge_mode) ; } } # [doc = "Gets the name of the current action."] # [doc = ""] # [inline] pub fn get_current_action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_current_action_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically.\nThis is useful mostly to check if something changed from a saved version."] # [doc = ""] # [inline] pub fn get_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_version ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if a \"redo\" action is available."] # [doc = ""] # [inline] pub fn has_redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if an \"undo\" action is available."] # [doc = ""] # [inline] pub fn has_undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [UndoRedo] is currently committing the action, i.e. running its \"do\" method or property change (see [method commit_action])."] # [doc = ""] # [inline] pub fn is_commiting_action (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . is_commiting_action ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Redo the last action."] # [doc = ""] # [inline] pub fn redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Undo the last action."] # [doc = ""] # [inline] pub fn undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for UndoRedo { } unsafe impl GodotObject for UndoRedo { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "UndoRedo" } } impl std :: ops :: Deref for UndoRedo { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UndoRedo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for UndoRedo { } impl Instanciable for UndoRedo { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UndoRedo :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UndoRedoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_do_method : * mut sys :: godot_method_bind , pub add_do_property : * mut sys :: godot_method_bind , pub add_do_reference : * mut sys :: godot_method_bind , pub add_undo_method : * mut sys :: godot_method_bind , pub add_undo_property : * mut sys :: godot_method_bind , pub add_undo_reference : * mut sys :: godot_method_bind , pub clear_history : * mut sys :: godot_method_bind , pub commit_action : * mut sys :: godot_method_bind , pub create_action : * mut sys :: godot_method_bind , pub get_current_action_name : * mut sys :: godot_method_bind , pub get_version : * mut sys :: godot_method_bind , pub has_redo : * mut sys :: godot_method_bind , pub has_undo : * mut sys :: godot_method_bind , pub is_commiting_action : * mut sys :: godot_method_bind , pub redo : * mut sys :: godot_method_bind , pub undo : * mut sys :: godot_method_bind } impl UndoRedoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UndoRedoMethodTable = UndoRedoMethodTable { class_constructor : None , add_do_method : 0 as * mut sys :: godot_method_bind , add_do_property : 0 as * mut sys :: godot_method_bind , add_do_reference : 0 as * mut sys :: godot_method_bind , add_undo_method : 0 as * mut sys :: godot_method_bind , add_undo_property : 0 as * mut sys :: godot_method_bind , add_undo_reference : 0 as * mut sys :: godot_method_bind , clear_history : 0 as * mut sys :: godot_method_bind , commit_action : 0 as * mut sys :: godot_method_bind , create_action : 0 as * mut sys :: godot_method_bind , get_current_action_name : 0 as * mut sys :: godot_method_bind , get_version : 0 as * mut sys :: godot_method_bind , has_redo : 0 as * mut sys :: godot_method_bind , has_undo : 0 as * mut sys :: godot_method_bind , is_commiting_action : 0 as * mut sys :: godot_method_bind , redo : 0 as * mut sys :: godot_method_bind , undo : 0 as * mut sys :: godot_method_bind } ; &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 (|| { UndoRedoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UndoRedo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_do_method = (gd_api . godot_method_bind_get_method) (class_name , "add_do_method\0" . as_ptr () as * const c_char) ; table . add_do_property = (gd_api . godot_method_bind_get_method) (class_name , "add_do_property\0" . as_ptr () as * const c_char) ; table . add_do_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_do_reference\0" . as_ptr () as * const c_char) ; table . add_undo_method = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_method\0" . as_ptr () as * const c_char) ; table . add_undo_property = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_property\0" . as_ptr () as * const c_char) ; table . add_undo_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_reference\0" . as_ptr () as * const c_char) ; table . clear_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_history\0" . as_ptr () as * const c_char) ; table . commit_action = (gd_api . godot_method_bind_get_method) (class_name , "commit_action\0" . as_ptr () as * const c_char) ; table . create_action = (gd_api . godot_method_bind_get_method) (class_name , "create_action\0" . as_ptr () as * const c_char) ; table . get_current_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_current_action_name\0" . as_ptr () as * const c_char) ; table . get_version = (gd_api . godot_method_bind_get_method) (class_name , "get_version\0" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\0" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\0" . as_ptr () as * const c_char) ; table . is_commiting_action = (gd_api . godot_method_bind_get_method) (class_name , "is_commiting_action\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:142:4670 [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 VisualScriptGlobalConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptglobalconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptGlobalConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptGlobalConstant { this : RawObject < Self > , } impl VisualScriptGlobalConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptGlobalConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn global_constant (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . get_global_constant ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_global_constant (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . set_global_constant ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptGlobalConstant { } unsafe impl GodotObject for VisualScriptGlobalConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptGlobalConstant" } } impl std :: ops :: Deref for VisualScriptGlobalConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptGlobalConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptGlobalConstant { } impl Instanciable for VisualScriptGlobalConstant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptGlobalConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptGlobalConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_global_constant : * mut sys :: godot_method_bind , pub set_global_constant : * mut sys :: godot_method_bind } impl VisualScriptGlobalConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptGlobalConstantMethodTable = VisualScriptGlobalConstantMethodTable { class_constructor : None , get_global_constant : 0 as * mut sys :: godot_method_bind , set_global_constant : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptGlobalConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptGlobalConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_global_constant\0" . as_ptr () as * const c_char) ; table . set_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_global_constant\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:148:9259 [INFO] [stdout] | [INFO] [stdout] 148 | ... : 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] 148 | # [doc = "`core class CSGSphere` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgsphere.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGSphere` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGSphere inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGSphere { this : RawObject < Self > , } impl CSGSphere { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGSphereMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radial_segments (& self , radial_segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radial_segments) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGSphere { } unsafe impl GodotObject for CSGSphere { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGSphere" } } impl QueueFree for CSGSphere { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGSphere { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGSphere { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGSphere { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGSphere { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGSphere { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGSphere { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGSphere { } impl Instanciable for CSGSphere { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGSphere :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGSphereMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_material : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGSphereMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGSphereMethodTable = CSGSphereMethodTable { class_constructor : None , get_material : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; &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 (|| { CSGSphereMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGSphere\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:154:4705 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:160:4189 [INFO] [stdout] | [INFO] [stdout] 160 | ...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] 160 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:166:6546 [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 NavigationMeshInstance` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_navigationmeshinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`NavigationMeshInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationMeshInstance inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMeshInstance { this : RawObject < Self > , } impl NavigationMeshInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMeshInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn navigation_mesh (& self) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_navigation_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_navigation_mesh (& self , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_navigation_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , navmesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMeshInstance { } unsafe impl GodotObject for NavigationMeshInstance { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationMeshInstance" } } impl QueueFree for NavigationMeshInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NavigationMeshInstance { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationMeshInstance { } impl Instanciable for NavigationMeshInstance { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NavigationMeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_navigation_mesh : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_navigation_mesh : * mut sys :: godot_method_bind } impl NavigationMeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshInstanceMethodTable = NavigationMeshInstanceMethodTable { class_constructor : None , get_navigation_mesh : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_navigation_mesh : 0 as * mut sys :: godot_method_bind } ; &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 (|| { NavigationMeshInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMeshInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_mesh\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_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_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-9b9d3e6ddcc0e9b9/out/generated.rs:172:4580 [INFO] [stdout] | [INFO] [stdout] 172 | ...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] 172 | # [doc = "`core class VScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { this : RawObject < Self > , } impl VScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VScrollBar { } unsafe impl GodotObject for VScrollBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VScrollBar" } } impl QueueFree for VScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for VScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for VScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for VScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for VScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VScrollBar { } impl Instanciable for VScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VScrollBarMethodTable = VScrollBarMethodTable { class_constructor : None , } ; &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 (|| { VScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:178:5999 [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 AudioStreamGeneratorPlayback` inherits `AudioStreamPlaybackResampled` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamgeneratorplayback.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamGeneratorPlayback inherits methods from:\n - [AudioStreamPlaybackResampled](struct.AudioStreamPlaybackResampled.html)\n - [AudioStreamPlayback](struct.AudioStreamPlayback.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamGeneratorPlayback { this : RawObject < Self > , } impl AudioStreamGeneratorPlayback { # [doc = ""] # [doc = ""] # [inline] pub fn can_push_buffer (& self , amount : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . can_push_buffer ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_buffer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . clear_buffer ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_frames_available (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_frames_available ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skips (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_skips ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn push_buffer (& self , frames : Vector2Array) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_buffer ; let ret = crate :: icalls :: icallptr_bool_vec2arr (method_bind , self . this . sys () . as_ptr () , frames) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn push_frame (& self , frame : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_frame ; let ret = crate :: icalls :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , frame) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGeneratorPlayback { } unsafe impl GodotObject for AudioStreamGeneratorPlayback { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGeneratorPlayback" } } impl std :: ops :: Deref for AudioStreamGeneratorPlayback { type Target = crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGeneratorPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream_playback_resampled :: AudioStreamPlaybackResampled > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: audio_stream_playback :: AudioStreamPlayback > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamGeneratorPlayback { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamGeneratorPlaybackMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_push_buffer : * mut sys :: godot_method_bind , pub clear_buffer : * mut sys :: godot_method_bind , pub get_frames_available : * mut sys :: godot_method_bind , pub get_skips : * mut sys :: godot_method_bind , pub push_buffer : * mut sys :: godot_method_bind , pub push_frame : * mut sys :: godot_method_bind } impl AudioStreamGeneratorPlaybackMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamGeneratorPlaybackMethodTable = AudioStreamGeneratorPlaybackMethodTable { class_constructor : None , can_push_buffer : 0 as * mut sys :: godot_method_bind , clear_buffer : 0 as * mut sys :: godot_method_bind , get_frames_available : 0 as * mut sys :: godot_method_bind , get_skips : 0 as * mut sys :: godot_method_bind , push_buffer : 0 as * mut sys :: godot_method_bind , push_frame : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AudioStreamGeneratorPlaybackMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamGeneratorPlayback\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "can_push_buffer\0" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\0" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\0" . as_ptr () as * const c_char) ; table . get_skips = (gd_api . godot_method_bind_get_method) (class_name , "get_skips\0" . as_ptr () as * const c_char) ; table . push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "push_buffer\0" . as_ptr () as * const c_char) ; table . push_frame = (gd_api . godot_method_bind_get_method) (class_name , "push_frame\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:184:9260 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:1000:74530 [INFO] [stdout] | [INFO] [stdout] 1000 | ... : 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] 1000 | # [doc = "`core singleton class Physics2DServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaBodyStatus (pub i64) ; impl AreaBodyStatus { pub const ADDED : AreaBodyStatus = AreaBodyStatus (0i64) ; pub const REMOVED : AreaBodyStatus = AreaBodyStatus (1i64) ; } impl From < i64 > for AreaBodyStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaBodyStatus > for i64 { # [inline] fn from (v : AreaBodyStatus) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaParameter (pub i64) ; impl AreaParameter { pub const GRAVITY : AreaParameter = AreaParameter (0i64) ; pub const GRAVITY_VECTOR : AreaParameter = AreaParameter (1i64) ; pub const GRAVITY_IS_POINT : AreaParameter = AreaParameter (2i64) ; pub const GRAVITY_DISTANCE_SCALE : AreaParameter = AreaParameter (3i64) ; pub const GRAVITY_POINT_ATTENUATION : AreaParameter = AreaParameter (4i64) ; pub const LINEAR_DAMP : AreaParameter = AreaParameter (5i64) ; pub const ANGULAR_DAMP : AreaParameter = AreaParameter (6i64) ; pub const PRIORITY : AreaParameter = AreaParameter (7i64) ; } impl From < i64 > for AreaParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaParameter > for i64 { # [inline] fn from (v : AreaParameter) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaSpaceOverrideMode (pub i64) ; impl AreaSpaceOverrideMode { pub const DISABLED : AreaSpaceOverrideMode = AreaSpaceOverrideMode (0i64) ; pub const COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (1i64) ; pub const COMBINE_REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (2i64) ; pub const REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (3i64) ; pub const REPLACE_COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (4i64) ; } impl From < i64 > for AreaSpaceOverrideMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaSpaceOverrideMode > for i64 { # [inline] fn from (v : AreaSpaceOverrideMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyMode (pub i64) ; impl BodyMode { pub const STATIC : BodyMode = BodyMode (0i64) ; pub const KINEMATIC : BodyMode = BodyMode (1i64) ; pub const RIGID : BodyMode = BodyMode (2i64) ; pub const CHARACTER : BodyMode = BodyMode (3i64) ; } impl From < i64 > for BodyMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyMode > for i64 { # [inline] fn from (v : BodyMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyParameter (pub i64) ; impl BodyParameter { pub const BOUNCE : BodyParameter = BodyParameter (0i64) ; pub const FRICTION : BodyParameter = BodyParameter (1i64) ; pub const MASS : BodyParameter = BodyParameter (2i64) ; pub const INERTIA : BodyParameter = BodyParameter (3i64) ; pub const GRAVITY_SCALE : BodyParameter = BodyParameter (4i64) ; pub const LINEAR_DAMP : BodyParameter = BodyParameter (5i64) ; pub const ANGULAR_DAMP : BodyParameter = BodyParameter (6i64) ; pub const MAX : BodyParameter = BodyParameter (7i64) ; } impl From < i64 > for BodyParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyParameter > for i64 { # [inline] fn from (v : BodyParameter) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyState (pub i64) ; impl BodyState { pub const TRANSFORM : BodyState = BodyState (0i64) ; pub const LINEAR_VELOCITY : BodyState = BodyState (1i64) ; pub const ANGULAR_VELOCITY : BodyState = BodyState (2i64) ; pub const SLEEPING : BodyState = BodyState (3i64) ; pub const CAN_SLEEP : BodyState = BodyState (4i64) ; } impl From < i64 > for BodyState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyState > for i64 { # [inline] fn from (v : BodyState) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CcdMode (pub i64) ; impl CcdMode { pub const DISABLED : CcdMode = CcdMode (0i64) ; pub const CAST_RAY : CcdMode = CcdMode (1i64) ; pub const CAST_SHAPE : CcdMode = CcdMode (2i64) ; } impl From < i64 > for CcdMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CcdMode > for i64 { # [inline] fn from (v : CcdMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DampedStringParam (pub i64) ; impl DampedStringParam { pub const REST_LENGTH : DampedStringParam = DampedStringParam (0i64) ; pub const STIFFNESS : DampedStringParam = DampedStringParam (1i64) ; pub const DAMPING : DampedStringParam = DampedStringParam (2i64) ; } impl From < i64 > for DampedStringParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DampedStringParam > for i64 { # [inline] fn from (v : DampedStringParam) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointParam (pub i64) ; impl JointParam { pub const BIAS : JointParam = JointParam (0i64) ; pub const MAX_BIAS : JointParam = JointParam (1i64) ; pub const MAX_FORCE : JointParam = JointParam (2i64) ; } impl From < i64 > for JointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointParam > for i64 { # [inline] fn from (v : JointParam) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const PIN : JointType = JointType (0i64) ; pub const GROOVE : JointType = JointType (1i64) ; pub const DAMPED_SPRING : JointType = JointType (2i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessInfo (pub i64) ; impl ProcessInfo { pub const ACTIVE_OBJECTS : ProcessInfo = ProcessInfo (0i64) ; pub const COLLISION_PAIRS : ProcessInfo = ProcessInfo (1i64) ; pub const ISLAND_COUNT : ProcessInfo = ProcessInfo (2i64) ; } impl From < i64 > for ProcessInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessInfo > for i64 { # [inline] fn from (v : ProcessInfo) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShapeType (pub i64) ; impl ShapeType { pub const LINE : ShapeType = ShapeType (0i64) ; pub const RAY : ShapeType = ShapeType (1i64) ; pub const SEGMENT : ShapeType = ShapeType (2i64) ; pub const CIRCLE : ShapeType = ShapeType (3i64) ; pub const RECTANGLE : ShapeType = ShapeType (4i64) ; pub const CAPSULE : ShapeType = ShapeType (5i64) ; pub const CONVEX_POLYGON : ShapeType = ShapeType (6i64) ; pub const CONCAVE_POLYGON : ShapeType = ShapeType (7i64) ; pub const CUSTOM : ShapeType = ShapeType (8i64) ; } impl From < i64 > for ShapeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShapeType > for i64 { # [inline] fn from (v : ShapeType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceParameter (pub i64) ; impl SpaceParameter { pub const CONTACT_RECYCLE_RADIUS : SpaceParameter = SpaceParameter (0i64) ; pub const CONTACT_MAX_SEPARATION : SpaceParameter = SpaceParameter (1i64) ; pub const BODY_MAX_ALLOWED_PENETRATION : SpaceParameter = SpaceParameter (2i64) ; pub const BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (3i64) ; pub const BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (4i64) ; pub const BODY_TIME_TO_SLEEP : SpaceParameter = SpaceParameter (5i64) ; pub const CONSTRAINT_DEFAULT_BIAS : SpaceParameter = SpaceParameter (6i64) ; pub const TEST_MOTION_MIN_CONTACT_DEPTH : SpaceParameter = SpaceParameter (7i64) ; } impl From < i64 > for SpaceParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceParameter > for i64 { # [inline] fn from (v : SpaceParameter) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Physics2DServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 4i64 ; pub const BODY_PARAM_INERTIA : i64 = 3i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_PARAM_MAX : i64 = 7i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const DAMPED_STRING_DAMPING : i64 = 2i64 ; pub const DAMPED_STRING_REST_LENGTH : i64 = 0i64 ; pub const DAMPED_STRING_STIFFNESS : i64 = 1i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_DAMPED_SPRING : i64 = 2i64 ; pub const JOINT_GROOVE : i64 = 1i64 ; pub const JOINT_PARAM_BIAS : i64 = 0i64 ; pub const JOINT_PARAM_MAX_BIAS : i64 = 1i64 ; pub const JOINT_PARAM_MAX_FORCE : i64 = 2i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const SHAPE_CAPSULE : i64 = 5i64 ; pub const SHAPE_CIRCLE : i64 = 3i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SHAPE_CUSTOM : i64 = 8i64 ; pub const SHAPE_LINE : i64 = 0i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SHAPE_RECTANGLE : i64 = 4i64 ; pub const SHAPE_SEGMENT : i64 = 2i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 6i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH : i64 = 7i64 ; } impl Physics2DServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Physics2DServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = ""] # [inline] pub fn area_add_shape (& self , area : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_add_shape ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_attach_canvas_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_canvas_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub fn area_attach_object_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_object_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = ""] # [inline] pub fn area_clear_shapes (& self , area : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_clear_shapes ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [Area2D]."] # [doc = ""] # [inline] pub fn area_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn area_get_canvas_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_canvas_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub fn area_get_object_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_object_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns an area parameter value. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn area_get_param (& self , area : Rid , param : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_param ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param) ; Variant :: from_sys (ret) } } # [doc = "Returns the [RID] of the nth shape of an area."] # [doc = ""] # [inline] pub fn area_get_shape (& self , area : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape ; let ret = crate :: icalls :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = ""] # [inline] pub fn area_get_shape_count (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = ""] # [inline] pub fn area_get_shape_transform (& self , area : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the space assigned to the area."] # [doc = ""] # [inline] pub fn area_get_space (& self , area : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , area) ; Rid :: from_sys (ret) } } # [doc = "Returns the space override mode for the area."] # [doc = ""] # [inline] pub fn area_get_space_override_mode (& self , area : Rid) -> crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space_override_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode (ret) } } # [doc = "Returns the transform matrix for an area."] # [doc = ""] # [inline] pub fn area_get_transform (& self , area : Rid) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid (method_bind , self . this . sys () . as_ptr () , area) ; mem :: transmute (ret) } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = ""] # [inline] pub fn area_remove_shape (& self , area : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_remove_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_area_monitor_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = "Assigns the area to one or many physics layers."] # [doc = ""] # [inline] pub fn area_set_collision_layer (& self , area : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_layer ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = ""] # [inline] pub fn area_set_collision_mask (& self , area : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask) ; } } # [doc = "Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:\n1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [RID] of the object that entered/exited the area.\n3: Instance ID of the object that entered/exited the area.\n4: The shape index of the object that entered/exited the area.\n5: The shape index of the area where the object entered/exited."] # [doc = ""] # [inline] pub fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitor_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_monitorable (& self , area : Rid , monitorable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitorable ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable) ; } } # [doc = "Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn area_set_param (& self , area : Rid , param : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param , value . owned_to_variant ()) ; } } # [doc = "Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub fn area_set_shape (& self , area : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx , shape) ; } } # [doc = "Disables a given shape in an area."] # [doc = ""] # [inline] pub fn area_set_shape_disabled (& self , area : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_disabled ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx , disabled) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = ""] # [inline] pub fn area_set_shape_transform (& self , area : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , area , shape_idx , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = ""] # [inline] pub fn area_set_space (& self , area : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , area , space) ; } } # [doc = "Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes."] # [doc = ""] # [inline] pub fn area_set_space_override_mode (& self , area : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space_override_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = ""] # [inline] pub fn area_set_transform (& self , area : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_add_central_force (& self , body : Rid , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_central_force ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub fn body_add_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied."] # [doc = ""] # [inline] pub fn body_add_force (& self , body : Rid , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_force ; let ret = crate :: icalls :: icallptr_void_rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , offset , force) ; } } # [doc = "Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = ""] # [inline] pub fn body_add_shape (& self , body : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_shape ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_add_torque (& self , body : Rid , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_torque ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , torque) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_apply_central_impulse (& self , body : Rid , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_central_impulse ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn body_apply_impulse (& self , body : Rid , position : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_impulse ; let ret = crate :: icalls :: icallptr_void_rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_apply_torque_impulse (& self , body : Rid , impulse : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_torque_impulse ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_attach_canvas_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_canvas_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub fn body_attach_object_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_object_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Removes all shapes from a body."] # [doc = ""] # [inline] pub fn body_clear_shapes (& self , body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_clear_shapes ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , body) ; } } # [doc = "Creates a physics body."] # [doc = ""] # [inline] pub fn body_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn body_get_canvas_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_canvas_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub fn body_get_collision_layer (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_layer ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub fn body_get_collision_mask (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_mask ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the continuous collision detection mode."] # [doc = ""] # [inline] pub fn body_get_continuous_collision_detection_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: CcdMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: CcdMode (ret) } } # [doc = "Returns the [Physics2DDirectBodyState] of the body."] # [doc = ""] # [inline] pub fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , body) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]."] # [doc = ""] # [inline] pub fn body_get_max_contacts_reported (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_max_contacts_reported ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the body mode."] # [doc = ""] # [inline] pub fn body_get_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: BodyMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: BodyMode (ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub fn body_get_object_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_object_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn body_get_param (& self , body : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param) ; ret as _ } } # [doc = "Returns the [RID] of the nth shape of a body."] # [doc = ""] # [inline] pub fn body_get_shape (& self , body : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape ; let ret = crate :: icalls :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = ""] # [inline] pub fn body_get_shape_count (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the metadata of a shape of a body."] # [doc = ""] # [inline] pub fn body_get_shape_metadata (& self , body : Rid , shape_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_metadata ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the transform matrix of a body shape."] # [doc = ""] # [inline] pub fn body_get_shape_transform (& self , body : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the [RID] of the space assigned to a body."] # [doc = ""] # [inline] pub fn body_get_space (& self , body : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_space ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , body) ; Rid :: from_sys (ret) } } # [doc = "Returns a body state."] # [doc = ""] # [inline] pub fn body_get_state (& self , body : Rid , state : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_state ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state) ; Variant :: from_sys (ret) } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub fn body_is_omitting_force_integration (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_is_omitting_force_integration ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Removes a body from the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub fn body_remove_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Removes a shape from a body. The shape is not deleted, so it can be reused afterwards."] # [doc = ""] # [inline] pub fn body_remove_shape (& self , body : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; } } # [doc = "Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = ""] # [inline] pub fn body_set_axis_velocity (& self , body : Rid , axis_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_axis_velocity ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub fn body_set_collision_layer (& self , body : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_layer ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub fn body_set_collision_mask (& self , body : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask) ; } } # [doc = "Sets the continuous collision detection mode using one of the [enum CCDMode] constants.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided."] # [doc = ""] # [inline] pub fn body_set_continuous_collision_detection_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = ""] # [inline] pub fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_force_integration_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , body , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0."] # [doc = ""] # [inline] pub fn body_set_max_contacts_reported (& self , body : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_max_contacts_reported ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount) ; } } # [doc = "Sets the body mode using one of the [enum BodyMode] constants."] # [doc = ""] # [inline] pub fn body_set_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub fn body_set_omit_force_integration (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_omit_force_integration ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Sets a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn body_set_param (& self , body : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param , value) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub fn body_set_shape (& self , body : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx , shape) ; } } # [doc = "Enables one way collision on body if `enable` is `true`."] # [doc = ""] # [inline] pub fn body_set_shape_as_one_way_collision (& self , body : Rid , shape_idx : i64 , enable : bool , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_as_one_way_collision ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool_f64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx , enable , margin) ; } } # [doc = "Disables shape in body if `disable` is `true`."] # [doc = ""] # [inline] pub fn body_set_shape_disabled (& self , body : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_disabled ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx , disabled) ; } } # [doc = "Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries."] # [doc = ""] # [inline] pub fn body_set_shape_metadata (& self , body : Rid , shape_idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_metadata ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , shape_idx , metadata . owned_to_variant ()) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = ""] # [inline] pub fn body_set_shape_transform (& self , body : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , body , shape_idx , transform) ; } } # [doc = "Assigns a space to the body (see [method space_create])."] # [doc = ""] # [inline] pub fn body_set_space (& self , body : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_space ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state using one of the [enum BodyState] constants.\nNote that the method doesn't take effect immediately. The state will change on the next physics frame."] # [doc = ""] # [inline] pub fn body_set_state (& self , body : Rid , state : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_state ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state , value . owned_to_variant ()) ; } } # [doc = "Returns `true` if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [Physics2DTestMotionResult] can be passed to return additional information in.\n# Default Arguments\n* `margin` - `0.08`\n* `result` - `null`"] # [doc = ""] # [inline] pub fn body_test_motion (& self , body : Rid , from : Transform2D , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: physics_2d_test_motion_result :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_test_motion ; let ret = crate :: icalls :: icallptr_bool_rid_trans2D_vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , body , from , motion , infinite_inertia , margin , result . as_arg_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn capsule_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . capsule_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn circle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . circle_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn concave_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . concave_polygon_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn convex_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . convex_polygon_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub fn damped_spring_joint_create (& self , anchor_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_spring_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a damped spring joint parameter."] # [doc = ""] # [inline] pub fn damped_string_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets a damped spring joint parameter. See [enum DampedStringParam] for a list of available parameters."] # [doc = ""] # [inline] pub fn damped_string_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = "Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console."] # [doc = ""] # [inline] pub fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states."] # [doc = ""] # [inline] pub fn get_process_info (& self , process_info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . get_process_info ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , process_info) ; ret as _ } } # [doc = "Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself."] # [doc = ""] # [inline] pub fn groove_joint_create (& self , groove1_a : Vector2 , groove2_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . groove_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , groove1_a , groove2_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a joint parameter."] # [doc = ""] # [inline] pub fn joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Returns a joint's type (see [enum JointType])."] # [doc = ""] # [inline] pub fn joint_get_type (& self , joint : Rid) -> crate :: generated :: physics_2d_server :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_type ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , joint) ; crate :: generated :: physics_2d_server :: JointType (ret) } } # [doc = "Sets a joint parameter. See [enum JointParam] for a list of available parameters."] # [doc = ""] # [inline] pub fn joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn line_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . line_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub fn pin_joint_create (& self , anchor : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . pin_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ray_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . ray_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rectangle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . rectangle_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn segment_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . segment_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Activates or deactivates the 2D physics engine."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "Returns the shape data."] # [doc = ""] # [inline] pub fn shape_get_data (& self , shape : Rid) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_data ; let ret = crate :: icalls :: icallptr_var_rid (method_bind , self . this . sys () . as_ptr () , shape) ; Variant :: from_sys (ret) } } # [doc = "Returns a shape's type (see [enum ShapeType])."] # [doc = ""] # [inline] pub fn shape_get_type (& self , shape : Rid) -> crate :: generated :: physics_2d_server :: ShapeType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_type ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , shape) ; crate :: generated :: physics_2d_server :: ShapeType (ret) } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]."] # [doc = ""] # [inline] pub fn shape_set_data (& self , shape : Rid , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_set_data ; let ret = crate :: icalls :: icallptr_void_rid_var (method_bind , self . this . sys () . as_ptr () , shape , data . owned_to_variant ()) ; } } # [doc = "Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]."] # [doc = ""] # [inline] pub fn space_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = ""] # [inline] pub fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , space) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the value of a space parameter."] # [doc = ""] # [inline] pub fn space_get_param (& self , space : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param) ; ret as _ } } # [doc = "Returns whether the space is active."] # [doc = ""] # [inline] pub fn space_is_active (& self , space : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_is_active ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , space) ; ret as _ } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = ""] # [inline] pub fn space_set_active (& self , space : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_active ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , space , active) ; } } # [doc = "Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn space_set_param (& self , space : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServer { } unsafe impl GodotObject for Physics2DServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServer" } } impl std :: ops :: Deref for Physics2DServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub area_add_shape : * mut sys :: godot_method_bind , pub area_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub area_attach_object_instance_id : * mut sys :: godot_method_bind , pub area_clear_shapes : * mut sys :: godot_method_bind , pub area_create : * mut sys :: godot_method_bind , pub area_get_canvas_instance_id : * mut sys :: godot_method_bind , pub area_get_object_instance_id : * mut sys :: godot_method_bind , pub area_get_param : * mut sys :: godot_method_bind , pub area_get_shape : * mut sys :: godot_method_bind , pub area_get_shape_count : * mut sys :: godot_method_bind , pub area_get_shape_transform : * mut sys :: godot_method_bind , pub area_get_space : * mut sys :: godot_method_bind , pub area_get_space_override_mode : * mut sys :: godot_method_bind , pub area_get_transform : * mut sys :: godot_method_bind , pub area_remove_shape : * mut sys :: godot_method_bind , pub area_set_area_monitor_callback : * mut sys :: godot_method_bind , pub area_set_collision_layer : * mut sys :: godot_method_bind , pub area_set_collision_mask : * mut sys :: godot_method_bind , pub area_set_monitor_callback : * mut sys :: godot_method_bind , pub area_set_monitorable : * mut sys :: godot_method_bind , pub area_set_param : * mut sys :: godot_method_bind , pub area_set_shape : * mut sys :: godot_method_bind , pub area_set_shape_disabled : * mut sys :: godot_method_bind , pub area_set_shape_transform : * mut sys :: godot_method_bind , pub area_set_space : * mut sys :: godot_method_bind , pub area_set_space_override_mode : * mut sys :: godot_method_bind , pub area_set_transform : * mut sys :: godot_method_bind , pub body_add_central_force : * mut sys :: godot_method_bind , pub body_add_collision_exception : * mut sys :: godot_method_bind , pub body_add_force : * mut sys :: godot_method_bind , pub body_add_shape : * mut sys :: godot_method_bind , pub body_add_torque : * mut sys :: godot_method_bind , pub body_apply_central_impulse : * mut sys :: godot_method_bind , pub body_apply_impulse : * mut sys :: godot_method_bind , pub body_apply_torque_impulse : * mut sys :: godot_method_bind , pub body_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub body_attach_object_instance_id : * mut sys :: godot_method_bind , pub body_clear_shapes : * mut sys :: godot_method_bind , pub body_create : * mut sys :: godot_method_bind , pub body_get_canvas_instance_id : * mut sys :: godot_method_bind , pub body_get_collision_layer : * mut sys :: godot_method_bind , pub body_get_collision_mask : * mut sys :: godot_method_bind , pub body_get_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_get_direct_state : * mut sys :: godot_method_bind , pub body_get_max_contacts_reported : * mut sys :: godot_method_bind , pub body_get_mode : * mut sys :: godot_method_bind , pub body_get_object_instance_id : * mut sys :: godot_method_bind , pub body_get_param : * mut sys :: godot_method_bind , pub body_get_shape : * mut sys :: godot_method_bind , pub body_get_shape_count : * mut sys :: godot_method_bind , pub body_get_shape_metadata : * mut sys :: godot_method_bind , pub body_get_shape_transform : * mut sys :: godot_method_bind , pub body_get_space : * mut sys :: godot_method_bind , pub body_get_state : * mut sys :: godot_method_bind , pub body_is_omitting_force_integration : * mut sys :: godot_method_bind , pub body_remove_collision_exception : * mut sys :: godot_method_bind , pub body_remove_shape : * mut sys :: godot_method_bind , pub body_set_axis_velocity : * mut sys :: godot_method_bind , pub body_set_collision_layer : * mut sys :: godot_method_bind , pub body_set_collision_mask : * mut sys :: godot_method_bind , pub body_set_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_set_force_integration_callback : * mut sys :: godot_method_bind , pub body_set_max_contacts_reported : * mut sys :: godot_method_bind , pub body_set_mode : * mut sys :: godot_method_bind , pub body_set_omit_force_integration : * mut sys :: godot_method_bind , pub body_set_param : * mut sys :: godot_method_bind , pub body_set_shape : * mut sys :: godot_method_bind , pub body_set_shape_as_one_way_collision : * mut sys :: godot_method_bind , pub body_set_shape_disabled : * mut sys :: godot_method_bind , pub body_set_shape_metadata : * mut sys :: godot_method_bind , pub body_set_shape_transform : * mut sys :: godot_method_bind , pub body_set_space : * mut sys :: godot_method_bind , pub body_set_state : * mut sys :: godot_method_bind , pub body_test_motion : * mut sys :: godot_method_bind , pub capsule_shape_create : * mut sys :: godot_method_bind , pub circle_shape_create : * mut sys :: godot_method_bind , pub concave_polygon_shape_create : * mut sys :: godot_method_bind , pub convex_polygon_shape_create : * mut sys :: godot_method_bind , pub damped_spring_joint_create : * mut sys :: godot_method_bind , pub damped_string_joint_get_param : * mut sys :: godot_method_bind , pub damped_string_joint_set_param : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_process_info : * mut sys :: godot_method_bind , pub groove_joint_create : * mut sys :: godot_method_bind , pub joint_get_param : * mut sys :: godot_method_bind , pub joint_get_type : * mut sys :: godot_method_bind , pub joint_set_param : * mut sys :: godot_method_bind , pub line_shape_create : * mut sys :: godot_method_bind , pub pin_joint_create : * mut sys :: godot_method_bind , pub ray_shape_create : * mut sys :: godot_method_bind , pub rectangle_shape_create : * mut sys :: godot_method_bind , pub segment_shape_create : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub shape_get_data : * mut sys :: godot_method_bind , pub shape_get_type : * mut sys :: godot_method_bind , pub shape_set_data : * mut sys :: godot_method_bind , pub space_create : * mut sys :: godot_method_bind , pub space_get_direct_state : * mut sys :: godot_method_bind , pub space_get_param : * mut sys :: godot_method_bind , pub space_is_active : * mut sys :: godot_method_bind , pub space_set_active : * mut sys :: godot_method_bind , pub space_set_param : * mut sys :: godot_method_bind } impl Physics2DServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DServerMethodTable = Physics2DServerMethodTable { class_constructor : None , area_add_shape : 0 as * mut sys :: godot_method_bind , area_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , area_clear_shapes : 0 as * mut sys :: godot_method_bind , area_create : 0 as * mut sys :: godot_method_bind , area_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_get_object_instance_id : 0 as * mut sys :: godot_method_bind , area_get_param : 0 as * mut sys :: godot_method_bind , area_get_shape : 0 as * mut sys :: godot_method_bind , area_get_shape_count : 0 as * mut sys :: godot_method_bind , area_get_shape_transform : 0 as * mut sys :: godot_method_bind , area_get_space : 0 as * mut sys :: godot_method_bind , area_get_space_override_mode : 0 as * mut sys :: godot_method_bind , area_get_transform : 0 as * mut sys :: godot_method_bind , area_remove_shape : 0 as * mut sys :: godot_method_bind , area_set_area_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_collision_layer : 0 as * mut sys :: godot_method_bind , area_set_collision_mask : 0 as * mut sys :: godot_method_bind , area_set_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_monitorable : 0 as * mut sys :: godot_method_bind , area_set_param : 0 as * mut sys :: godot_method_bind , area_set_shape : 0 as * mut sys :: godot_method_bind , area_set_shape_disabled : 0 as * mut sys :: godot_method_bind , area_set_shape_transform : 0 as * mut sys :: godot_method_bind , area_set_space : 0 as * mut sys :: godot_method_bind , area_set_space_override_mode : 0 as * mut sys :: godot_method_bind , area_set_transform : 0 as * mut sys :: godot_method_bind , body_add_central_force : 0 as * mut sys :: godot_method_bind , body_add_collision_exception : 0 as * mut sys :: godot_method_bind , body_add_force : 0 as * mut sys :: godot_method_bind , body_add_shape : 0 as * mut sys :: godot_method_bind , body_add_torque : 0 as * mut sys :: godot_method_bind , body_apply_central_impulse : 0 as * mut sys :: godot_method_bind , body_apply_impulse : 0 as * mut sys :: godot_method_bind , body_apply_torque_impulse : 0 as * mut sys :: godot_method_bind , body_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , body_clear_shapes : 0 as * mut sys :: godot_method_bind , body_create : 0 as * mut sys :: godot_method_bind , body_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_get_collision_layer : 0 as * mut sys :: godot_method_bind , body_get_collision_mask : 0 as * mut sys :: godot_method_bind , body_get_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_get_direct_state : 0 as * mut sys :: godot_method_bind , body_get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_get_mode : 0 as * mut sys :: godot_method_bind , body_get_object_instance_id : 0 as * mut sys :: godot_method_bind , body_get_param : 0 as * mut sys :: godot_method_bind , body_get_shape : 0 as * mut sys :: godot_method_bind , body_get_shape_count : 0 as * mut sys :: godot_method_bind , body_get_shape_metadata : 0 as * mut sys :: godot_method_bind , body_get_shape_transform : 0 as * mut sys :: godot_method_bind , body_get_space : 0 as * mut sys :: godot_method_bind , body_get_state : 0 as * mut sys :: godot_method_bind , body_is_omitting_force_integration : 0 as * mut sys :: godot_method_bind , body_remove_collision_exception : 0 as * mut sys :: godot_method_bind , body_remove_shape : 0 as * mut sys :: godot_method_bind , body_set_axis_velocity : 0 as * mut sys :: godot_method_bind , body_set_collision_layer : 0 as * mut sys :: godot_method_bind , body_set_collision_mask : 0 as * mut sys :: godot_method_bind , body_set_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_set_force_integration_callback : 0 as * mut sys :: godot_method_bind , body_set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_set_mode : 0 as * mut sys :: godot_method_bind , body_set_omit_force_integration : 0 as * mut sys :: godot_method_bind , body_set_param : 0 as * mut sys :: godot_method_bind , body_set_shape : 0 as * mut sys :: godot_method_bind , body_set_shape_as_one_way_collision : 0 as * mut sys :: godot_method_bind , body_set_shape_disabled : 0 as * mut sys :: godot_method_bind , body_set_shape_metadata : 0 as * mut sys :: godot_method_bind , body_set_shape_transform : 0 as * mut sys :: godot_method_bind , body_set_space : 0 as * mut sys :: godot_method_bind , body_set_state : 0 as * mut sys :: godot_method_bind , body_test_motion : 0 as * mut sys :: godot_method_bind , capsule_shape_create : 0 as * mut sys :: godot_method_bind , circle_shape_create : 0 as * mut sys :: godot_method_bind , concave_polygon_shape_create : 0 as * mut sys :: godot_method_bind , convex_polygon_shape_create : 0 as * mut sys :: godot_method_bind , damped_spring_joint_create : 0 as * mut sys :: godot_method_bind , damped_string_joint_get_param : 0 as * mut sys :: godot_method_bind , damped_string_joint_set_param : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_process_info : 0 as * mut sys :: godot_method_bind , groove_joint_create : 0 as * mut sys :: godot_method_bind , joint_get_param : 0 as * mut sys :: godot_method_bind , joint_get_type : 0 as * mut sys :: godot_method_bind , joint_set_param : 0 as * mut sys :: godot_method_bind , line_shape_create : 0 as * mut sys :: godot_method_bind , pin_joint_create : 0 as * mut sys :: godot_method_bind , ray_shape_create : 0 as * mut sys :: godot_method_bind , rectangle_shape_create : 0 as * mut sys :: godot_method_bind , segment_shape_create : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , shape_get_data : 0 as * mut sys :: godot_method_bind , shape_get_type : 0 as * mut sys :: godot_method_bind , shape_set_data : 0 as * mut sys :: godot_method_bind , space_create : 0 as * mut sys :: godot_method_bind , space_get_direct_state : 0 as * mut sys :: godot_method_bind , space_get_param : 0 as * mut sys :: godot_method_bind , space_is_active : 0 as * mut sys :: godot_method_bind , space_set_active : 0 as * mut sys :: godot_method_bind , space_set_param : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Physics2DServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . area_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_add_shape\0" . as_ptr () as * const c_char) ; table . area_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\0" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\0" . as_ptr () as * const c_char) ; table . area_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\0" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\0" . as_ptr () as * const c_char) ; table . area_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_count\0" . as_ptr () as * const c_char) ; table . area_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_transform\0" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\0" . as_ptr () as * const c_char) ; table . area_get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\0" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\0" . as_ptr () as * const c_char) ; table . area_set_area_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_area_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_layer\0" . as_ptr () as * const c_char) ; table . area_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_mask\0" . as_ptr () as * const c_char) ; table . area_set_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\0" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\0" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\0" . as_ptr () as * const c_char) ; table . area_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . area_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_transform\0" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\0" . as_ptr () as * const c_char) ; table . area_set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\0" . as_ptr () as * const c_char) ; table . body_add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_central_force\0" . as_ptr () as * const c_char) ; table . body_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_add_collision_exception\0" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\0" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\0" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\0" . as_ptr () as * const c_char) ; table . body_apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_central_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . body_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\0" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\0" . as_ptr () as * const c_char) ; table . body_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_layer\0" . as_ptr () as * const c_char) ; table . body_get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_mask\0" . as_ptr () as * const c_char) ; table . body_get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_direct_state\0" . as_ptr () as * const c_char) ; table . body_get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\0" . as_ptr () as * const c_char) ; table . body_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\0" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\0" . as_ptr () as * const c_char) ; table . body_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_count\0" . as_ptr () as * const c_char) ; table . body_get_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_transform\0" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\0" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\0" . as_ptr () as * const c_char) ; table . body_is_omitting_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_is_omitting_force_integration\0" . as_ptr () as * const c_char) ; table . body_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\0" . as_ptr () as * const c_char) ; table . body_set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_velocity\0" . as_ptr () as * const c_char) ; table . body_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_layer\0" . as_ptr () as * const c_char) ; table . body_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_mask\0" . as_ptr () as * const c_char) ; table . body_set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_set_force_integration_callback = (gd_api . godot_method_bind_get_method) (class_name , "body_set_force_integration_callback\0" . as_ptr () as * const c_char) ; table . body_set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\0" . as_ptr () as * const c_char) ; table . body_set_omit_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_set_omit_force_integration\0" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\0" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\0" . as_ptr () as * const c_char) ; table . body_set_shape_as_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_as_one_way_collision\0" . as_ptr () as * const c_char) ; table . body_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . body_set_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_transform\0" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\0" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\0" . as_ptr () as * const c_char) ; table . body_test_motion = (gd_api . godot_method_bind_get_method) (class_name , "body_test_motion\0" . as_ptr () as * const c_char) ; table . capsule_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "capsule_shape_create\0" . as_ptr () as * const c_char) ; table . circle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "circle_shape_create\0" . as_ptr () as * const c_char) ; table . concave_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "concave_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . convex_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "convex_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . damped_spring_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "damped_spring_joint_create\0" . as_ptr () as * const c_char) ; table . damped_string_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_get_param\0" . as_ptr () as * const c_char) ; table . damped_string_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_set_param\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\0" . as_ptr () as * const c_char) ; table . groove_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "groove_joint_create\0" . as_ptr () as * const c_char) ; table . joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_param\0" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\0" . as_ptr () as * const c_char) ; table . joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_param\0" . as_ptr () as * const c_char) ; table . line_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "line_shape_create\0" . as_ptr () as * const c_char) ; table . pin_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_create\0" . as_ptr () as * const c_char) ; table . ray_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "ray_shape_create\0" . as_ptr () as * const c_char) ; table . rectangle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "rectangle_shape_create\0" . as_ptr () as * const c_char) ; table . segment_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "segment_shape_create\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\0" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\0" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\0" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\0" . as_ptr () as * const c_char) ; table . space_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "space_get_direct_state\0" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\0" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\0" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\0" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:1006:6726 [INFO] [stdout] | [INFO] [stdout] 1006 | ... : 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] 1006 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:196:7950 [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 InputEventMouseButton` inherits `InputEventMouse` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventmousebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouseButton inherits methods from:\n - [InputEventMouse](struct.InputEventMouse.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouseButton { this : RawObject < Self > , } impl InputEventMouseButton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMouseButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn button_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_button_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn is_doubleclick (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . is_doubleclick ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn set_button_index (& self , button_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_button_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn set_doubleclick (& self , doubleclick : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_doubleclick ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , doubleclick) ; } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn set_factor (& self , factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_factor ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , factor) ; } } # [doc = "If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseButton { } unsafe impl GodotObject for InputEventMouseButton { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseButton" } } impl std :: ops :: Deref for InputEventMouseButton { type Target = crate :: generated :: input_event_mouse :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_mouse :: InputEventMouse > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouseButton { } impl Instanciable for InputEventMouseButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventMouseButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_index : * mut sys :: godot_method_bind , pub get_factor : * mut sys :: godot_method_bind , pub is_doubleclick : * mut sys :: godot_method_bind , pub set_button_index : * mut sys :: godot_method_bind , pub set_doubleclick : * mut sys :: godot_method_bind , pub set_factor : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventMouseButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseButtonMethodTable = InputEventMouseButtonMethodTable { class_constructor : None , get_button_index : 0 as * mut sys :: godot_method_bind , get_factor : 0 as * mut sys :: godot_method_bind , is_doubleclick : 0 as * mut sys :: godot_method_bind , set_button_index : 0 as * mut sys :: godot_method_bind , set_doubleclick : 0 as * mut sys :: godot_method_bind , set_factor : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputEventMouseButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouseButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\0" . as_ptr () as * const c_char) ; table . is_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "is_doubleclick\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "set_doubleclick\0" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:202:8021 [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 InputEventKey` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventkey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventKey inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventKey { this : RawObject < Self > , } impl InputEventKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn scancode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the scancode combined with modifier keys such as `Shift` or `Alt`. See also [InputEventWithModifiers].\nTo get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_scancode_with_modifiers())` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn get_scancode_with_modifiers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode_with_modifiers ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn unicode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_unicode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the key was already pressed before this event. It means the user is holding the key down."] # [doc = ""] # [inline] pub fn set_echo (& self , echo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_echo ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , echo) ; } } # [doc = "If `true`, the key's state is pressed. If `false`, the key's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn set_scancode (& self , scancode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_scancode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn set_unicode (& self , unicode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_unicode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , unicode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventKey { } unsafe impl GodotObject for InputEventKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventKey" } } impl std :: ops :: Deref for InputEventKey { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventKey { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventKey { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventKey { } impl Instanciable for InputEventKey { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_scancode : * mut sys :: godot_method_bind , pub get_scancode_with_modifiers : * mut sys :: godot_method_bind , pub get_unicode : * mut sys :: godot_method_bind , pub set_echo : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_scancode : * mut sys :: godot_method_bind , pub set_unicode : * mut sys :: godot_method_bind } impl InputEventKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventKeyMethodTable = InputEventKeyMethodTable { class_constructor : None , get_scancode : 0 as * mut sys :: godot_method_bind , get_scancode_with_modifiers : 0 as * mut sys :: godot_method_bind , get_unicode : 0 as * mut sys :: godot_method_bind , set_echo : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_scancode : 0 as * mut sys :: godot_method_bind , set_unicode : 0 as * mut sys :: godot_method_bind } ; &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 (|| { InputEventKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode\0" . as_ptr () as * const c_char) ; table . get_scancode_with_modifiers = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_with_modifiers\0" . as_ptr () as * const c_char) ; table . get_unicode = (gd_api . godot_method_bind_get_method) (class_name , "get_unicode\0" . as_ptr () as * const c_char) ; table . set_echo = (gd_api . godot_method_bind_get_method) (class_name , "set_echo\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_scancode\0" . as_ptr () as * const c_char) ; table . set_unicode = (gd_api . godot_method_bind_get_method) (class_name , "set_unicode\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:214:3398 [INFO] [stdout] | [INFO] [stdout] 214 | ...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] 214 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:1012:18168 [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 AStar2D` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_astar2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAStar2D inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AStar2D { this : RawObject < Self > , } impl AStar2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AStar2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a new point at the given position with the given identifier. The algorithm prefers points with lower `weight_scale` to form a path. The `id` must be 0 or larger, and the `weight_scale` must be 1 or larger.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1\n```\nIf there already exists a point for the given `id`, its position and weight scale are updated to the given values.\n# Default Arguments\n* `weight_scale` - `1.0`"] # [doc = ""] # [inline] pub fn add_point (& self , id : i64 , position : Vector2 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallptr_void_i64_vec2_f64 (method_bind , self . this . sys () . as_ptr () , id , position , weight_scale) ; } } # [doc = "Returns whether there is a connection/segment between the given points."] # [doc = ""] # [inline] pub fn are_points_connected (& self , id : i64 , to_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . are_points_connected ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , to_id) ; ret as _ } } # [doc = "Clears all the points and segments."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a segment between the given points. If `bidirectional` is `false`, only movement from `id` to `to_id` is allowed, not the reverse direction.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 1))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2, false)\n```\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn connect_points (& self , id : i64 , to_id : i64 , bidirectional : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . connect_points ; let ret = crate :: icalls :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id , to_id , bidirectional) ; } } # [doc = "Deletes the segment between the given points."] # [doc = ""] # [inline] pub fn disconnect_points (& self , id : i64 , to_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . disconnect_points ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , id , to_id) ; } } # [doc = "Returns the next available point ID with no point associated to it."] # [doc = ""] # [inline] pub fn get_available_point_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_available_point_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the ID of the closest point to `to_position`, optionally taking disabled points into account. Returns `-1` if there are no points in the points pool.\n**Note:** If several points are the closest to `to_position`, the one with the smallest ID will be returned, ensuring a deterministic result.\n# Default Arguments\n* `include_disabled` - `false`"] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_position : Vector2 , include_disabled : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallptr_i64_vec2_bool (method_bind , self . this . sys () . as_ptr () , to_position , include_disabled) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the closest position to `to_position` that resides inside a segment between two connected points.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2)\nvar res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)\n```\nThe result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point."] # [doc = ""] # [inline] pub fn get_closest_position_in_segment (& self , to_position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_closest_position_in_segment ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1), 1) # Default weight is 1\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, false)\nastar.connect_points(2, 3, false)\nastar.connect_points(4, 3, false)\nastar.connect_points(1, 4, false)\n\nvar res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n```\nIf you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's \"easier\" to get through point 4 than through point 2."] # [doc = ""] # [inline] pub fn get_id_path (& self , from_id : i64 , to_id : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_id_path ; let ret = crate :: icalls :: icallptr_i32arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the capacity of the structure backing the points, useful in conjunction with `reserve_space`."] # [doc = ""] # [inline] pub fn get_point_capacity (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_capacity ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the connection with the given point.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1))\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, true)\nastar.connect_points(1, 3, true)\n\nvar neighbors = astar.get_point_connections(1) # Returns [2, 3]\n```"] # [doc = ""] # [inline] pub fn get_point_connections (& self , id : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_connections ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , id) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the number of points currently in the points pool."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path."] # [doc = ""] # [inline] pub fn get_point_path (& self , from_id : i64 , to_id : i64) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_path ; let ret = crate :: icalls :: icallptr_vec2arr_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id , to_id) ; Vector2Array :: from_sys (ret) } } # [doc = "Returns the position of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_position (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "Returns the weight scale of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_weight_scale (& self , id : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_weight_scale ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = "Returns an array of all points."] # [doc = ""] # [inline] pub fn get_points (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether a point associated with the given `id` exists."] # [doc = ""] # [inline] pub fn has_point (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . has_point ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = "Returns whether a point is disabled or not for pathfinding. By default, all points are enabled."] # [doc = ""] # [inline] pub fn is_point_disabled (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . is_point_disabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = "Removes the point associated with the given `id` from the points pool."] # [doc = ""] # [inline] pub fn remove_point (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Reserves space internally for `num_nodes` points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity."] # [doc = ""] # [inline] pub fn reserve_space (& self , num_nodes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . reserve_space ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , num_nodes) ; } } # [doc = "Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.\n# Default Arguments\n* `disabled` - `true`"] # [doc = ""] # [inline] pub fn set_point_disabled (& self , id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_disabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , id , disabled) ; } } # [doc = "Sets the `position` for the point with the given `id`."] # [doc = ""] # [inline] pub fn set_point_position (& self , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id , position) ; } } # [doc = "Sets the `weight_scale` for the point with the given `id`."] # [doc = ""] # [inline] pub fn set_point_weight_scale (& self , id : i64 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_weight_scale ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , id , weight_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AStar2D { } unsafe impl GodotObject for AStar2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AStar2D" } } impl std :: ops :: Deref for AStar2D { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AStar2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AStar2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AStar2D { } impl Instanciable for AStar2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AStar2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AStar2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub are_points_connected : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub connect_points : * mut sys :: godot_method_bind , pub disconnect_points : * mut sys :: godot_method_bind , pub get_available_point_id : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_position_in_segment : * mut sys :: godot_method_bind , pub get_id_path : * mut sys :: godot_method_bind , pub get_point_capacity : * mut sys :: godot_method_bind , pub get_point_connections : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_path : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_weight_scale : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub has_point : * mut sys :: godot_method_bind , pub is_point_disabled : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub reserve_space : * mut sys :: godot_method_bind , pub set_point_disabled : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_point_weight_scale : * mut sys :: godot_method_bind } impl AStar2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AStar2DMethodTable = AStar2DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , are_points_connected : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , connect_points : 0 as * mut sys :: godot_method_bind , disconnect_points : 0 as * mut sys :: godot_method_bind , get_available_point_id : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_position_in_segment : 0 as * mut sys :: godot_method_bind , get_id_path : 0 as * mut sys :: godot_method_bind , get_point_capacity : 0 as * mut sys :: godot_method_bind , get_point_connections : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_path : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_weight_scale : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , has_point : 0 as * mut sys :: godot_method_bind , is_point_disabled : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , reserve_space : 0 as * mut sys :: godot_method_bind , set_point_disabled : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_point_weight_scale : 0 as * mut sys :: godot_method_bind } ; &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 (|| { AStar2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AStar2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\0" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\0" . as_ptr () as * const c_char) ; table . get_available_point_id = (gd_api . godot_method_bind_get_method) (class_name , "get_available_point_id\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_position_in_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_position_in_segment\0" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\0" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\0" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_point_weight_scale\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\0" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\0" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_point_weight_scale\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:1018:3078 [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 PackedDataContainerRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packeddatacontainerref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedDataContainerRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedDataContainerRef { this : RawObject < Self > , } impl PackedDataContainerRef { # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedDataContainerRefMethodTable :: get (get_api ()) . size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainerRef { } unsafe impl GodotObject for PackedDataContainerRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainerRef" } } impl std :: ops :: Deref for PackedDataContainerRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainerRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PackedDataContainerRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for PackedDataContainerRef { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedDataContainerRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub size : * mut sys :: godot_method_bind } impl PackedDataContainerRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedDataContainerRefMethodTable = PackedDataContainerRefMethodTable { class_constructor : None , size : 0 as * mut sys :: godot_method_bind } ; &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 (|| { PackedDataContainerRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedDataContainerRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . size = (gd_api . godot_method_bind_get_method) (class_name , "size\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:1024:10577 [INFO] [stdout] | [INFO] [stdout] 1024 | ... : 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] 1024 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:220:12102 [INFO] [stdout] | [INFO] [stdout] 220 | ... : 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] 220 | # [doc = "`core class UPNPDevice` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_upnpdevice.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNPDevice inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNPDevice { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IgdStatus (pub i64) ; impl IgdStatus { pub const OK : IgdStatus = IgdStatus (0i64) ; pub const HTTP_ERROR : IgdStatus = IgdStatus (1i64) ; pub const HTTP_EMPTY : IgdStatus = IgdStatus (2i64) ; pub const NO_URLS : IgdStatus = IgdStatus (3i64) ; pub const NO_IGD : IgdStatus = IgdStatus (4i64) ; pub const DISCONNECTED : IgdStatus = IgdStatus (5i64) ; pub const UNKNOWN_DEVICE : IgdStatus = IgdStatus (6i64) ; pub const INVALID_CONTROL : IgdStatus = IgdStatus (7i64) ; pub const MALLOC_ERROR : IgdStatus = IgdStatus (8i64) ; pub const UNKNOWN_ERROR : IgdStatus = IgdStatus (9i64) ; } impl From < i64 > for IgdStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IgdStatus > for i64 { # [inline] fn from (v : IgdStatus) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNPDevice { pub const IGD_STATUS_DISCONNECTED : i64 = 5i64 ; pub const IGD_STATUS_HTTP_EMPTY : i64 = 2i64 ; pub const IGD_STATUS_HTTP_ERROR : i64 = 1i64 ; pub const IGD_STATUS_INVALID_CONTROL : i64 = 7i64 ; pub const IGD_STATUS_MALLOC_ERROR : i64 = 8i64 ; pub const IGD_STATUS_NO_IGD : i64 = 4i64 ; pub const IGD_STATUS_NO_URLS : i64 = 3i64 ; pub const IGD_STATUS_OK : i64 = 0i64 ; pub const IGD_STATUS_UNKNOWN_DEVICE : i64 = 6i64 ; pub const IGD_STATUS_UNKNOWN_ERROR : i64 = 9i64 ; } impl UPNPDevice { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPDeviceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn description_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_description_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_control_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_control_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_our_addr (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_our_addr ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_status (& self) -> crate :: generated :: upnp_device :: IgdStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: upnp_device :: IgdStatus (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid_gateway (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . is_valid_gateway ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_description_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_control_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_control_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_our_addr (& self , addr : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_our_addr ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , addr . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_status (& self , status : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_status ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , status) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNPDevice { } unsafe impl GodotObject for UPNPDevice { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNPDevice" } } impl std :: ops :: Deref for UPNPDevice { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNPDevice { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNPDevice { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNPDevice { } impl Instanciable for UPNPDevice { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UPNPDevice :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPDeviceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_port_mapping : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub get_description_url : * mut sys :: godot_method_bind , pub get_igd_control_url : * mut sys :: godot_method_bind , pub get_igd_our_addr : * mut sys :: godot_method_bind , pub get_igd_service_type : * mut sys :: godot_method_bind , pub get_igd_status : * mut sys :: godot_method_bind , pub get_service_type : * mut sys :: godot_method_bind , pub is_valid_gateway : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub set_description_url : * mut sys :: godot_method_bind , pub set_igd_control_url : * mut sys :: godot_method_bind , pub set_igd_our_addr : * mut sys :: godot_method_bind , pub set_igd_service_type : * mut sys :: godot_method_bind , pub set_igd_status : * mut sys :: godot_method_bind , pub set_service_type : * mut sys :: godot_method_bind } impl UPNPDeviceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPDeviceMethodTable = UPNPDeviceMethodTable { class_constructor : None , add_port_mapping : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , get_description_url : 0 as * mut sys :: godot_method_bind , get_igd_control_url : 0 as * mut sys :: godot_method_bind , get_igd_our_addr : 0 as * mut sys :: godot_method_bind , get_igd_service_type : 0 as * mut sys :: godot_method_bind , get_igd_status : 0 as * mut sys :: godot_method_bind , get_service_type : 0 as * mut sys :: godot_method_bind , is_valid_gateway : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , set_description_url : 0 as * mut sys :: godot_method_bind , set_igd_control_url : 0 as * mut sys :: godot_method_bind , set_igd_our_addr : 0 as * mut sys :: godot_method_bind , set_igd_service_type : 0 as * mut sys :: godot_method_bind , set_igd_status : 0 as * mut sys :: godot_method_bind , set_service_type : 0 as * mut sys :: godot_method_bind } ; &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 (|| { UPNPDeviceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNPDevice\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . get_description_url = (gd_api . godot_method_bind_get_method) (class_name , "get_description_url\0" . as_ptr () as * const c_char) ; table . get_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_control_url\0" . as_ptr () as * const c_char) ; table . get_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_our_addr\0" . as_ptr () as * const c_char) ; table . get_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_service_type\0" . as_ptr () as * const c_char) ; table . get_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_status\0" . as_ptr () as * const c_char) ; table . get_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_service_type\0" . as_ptr () as * const c_char) ; table . is_valid_gateway = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_gateway\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . set_description_url = (gd_api . godot_method_bind_get_method) (class_name , "set_description_url\0" . as_ptr () as * const c_char) ; table . set_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_control_url\0" . as_ptr () as * const c_char) ; table . set_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_our_addr\0" . as_ptr () as * const c_char) ; table . set_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_service_type\0" . as_ptr () as * const c_char) ; table . set_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_status\0" . as_ptr () as * const c_char) ; table . set_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_service_type\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:1030:15421 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:226:4589 [INFO] [stdout] | [INFO] [stdout] 226 | ...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] 226 | # [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-9b9d3e6ddcc0e9b9/out/generated.rs:1036:7382 [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 = "`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-9b9d3e6ddcc0e9b9/out/generated.rs:232:11175 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:238:9433 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:244:4114 [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 = "`tools singleton class VisualScriptEditor` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualScriptEditor inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEditor { this : RawObject < Self > , } impl VisualScriptEditor { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualScriptEditor\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString > , script : impl AsArg < crate :: generated :: script :: Script >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . add_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , category . into () , script . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . remove_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , category . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEditor { } unsafe impl GodotObject for VisualScriptEditor { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualScriptEditor" } } impl std :: ops :: Deref for VisualScriptEditor { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEditor { } unsafe impl Send for VisualScriptEditor { } unsafe impl Sync for VisualScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_node : * mut sys :: godot_method_bind , pub remove_custom_node : * mut sys :: godot_method_bind } impl VisualScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEditorMethodTable = VisualScriptEditorMethodTable { class_constructor : None , add_custom_node : 0 as * mut sys :: godot_method_bind , remove_custom_node : 0 as * mut sys :: godot_method_bind } ; &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 (|| { VisualScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_VisualScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_node\0" . as_ptr () as * const c_char) ; table . remove_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_node\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:1042:22273 [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 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-9b9d3e6ddcc0e9b9/out/generated.rs:1048:6160 [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 Skeleton2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_skeleton2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Skeleton2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeleton2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Skeleton2D { this : RawObject < Self > , } impl Skeleton2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Skeleton2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter `idx`. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling."] # [doc = ""] # [inline] pub fn get_bone (& self , idx : i64) -> Option < Ref < crate :: generated :: bone_2d :: Bone2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_bone ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bone_2d :: Bone2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [RID] of a Skeleton2D instance."] # [doc = ""] # [inline] pub fn get_skeleton (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton2D { } unsafe impl GodotObject for Skeleton2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Skeleton2D" } } impl QueueFree for Skeleton2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Skeleton2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Skeleton2D { } impl Instanciable for Skeleton2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Skeleton2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Skeleton2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bone : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind } impl Skeleton2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Skeleton2DMethodTable = Skeleton2DMethodTable { class_constructor : None , get_bone : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind } ; &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 (|| { Skeleton2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Skeleton2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bone\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; } } } [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-9b9d3e6ddcc0e9b9/out/generated.rs:250:21646 [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 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) ; } } } [WARN] too much data in the log, truncating it