[INFO] fetching crate gdnative-bindings-lily 0.9.3... [INFO] testing gdnative-bindings-lily-0.9.3 against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [INFO] extracting crate gdnative-bindings-lily 0.9.3 into /workspace/builds/worker-3-tc1/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-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate gdnative-bindings-lily 0.9.3 on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded gdnative-impl-proc-macros v0.9.3 [INFO] [stderr] Downloaded mini-internal v0.1.13 [INFO] [stderr] Downloaded gdnative_bindings_generator v0.9.3 [INFO] [stderr] Downloaded miniserde v0.1.13 [INFO] [stderr] Downloaded gdnative-core v0.9.3 [INFO] [stderr] Downloaded bindgen v0.56.0 [INFO] [stderr] Downloaded gdnative-sys v0.9.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 20d54ebbb50609320d1c281a592f4af15341b137ce4037a0d38b6168d0bbed5d [INFO] running `Command { std: "docker" "start" "-a" "20d54ebbb50609320d1c281a592f4af15341b137ce4037a0d38b6168d0bbed5d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "20d54ebbb50609320d1c281a592f4af15341b137ce4037a0d38b6168d0bbed5d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "20d54ebbb50609320d1c281a592f4af15341b137ce4037a0d38b6168d0bbed5d", kill_on_drop: false }` [INFO] [stdout] 20d54ebbb50609320d1c281a592f4af15341b137ce4037a0d38b6168d0bbed5d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] bff1654cb58b55e57c3c5abd8a245d8ea95debd37f2156c9cf7cacb8c561714c [INFO] running `Command { std: "docker" "start" "-a" "bff1654cb58b55e57c3c5abd8a245d8ea95debd37f2156c9cf7cacb8c561714c", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling version_check v0.9.5 [INFO] [stderr] Compiling glob v0.3.2 [INFO] [stderr] Compiling ryu v1.0.20 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling nom v5.1.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling libloading v0.8.8 [INFO] [stderr] Compiling bindgen v0.56.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling bitflags v1.3.2 [INFO] [stderr] Compiling lazycell v1.3.0 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling peeking_take_while v0.1.2 [INFO] [stderr] Compiling lazy_static v1.5.0 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling xmlparser v0.13.6 [INFO] [stderr] Compiling instant v0.1.13 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling ahash v0.7.8 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Compiling roxmltree v0.14.1 [INFO] [stderr] Compiling unindent v0.1.11 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling scopeguard v1.2.0 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling hashbrown v0.12.3 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling parking_lot v0.11.2 [INFO] [stderr] Compiling euclid v0.22.11 [INFO] [stderr] Compiling approx 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] Compiling gdnative-core v0.9.3 [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:16:1872 [INFO] [stdout] | [INFO] [stdout] 16 | ...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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:22:1478 [INFO] [stdout] | [INFO] [stdout] 22 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:28:1846 [INFO] [stdout] | [INFO] [stdout] 28 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:76:1498 [INFO] [stdout] | [INFO] [stdout] 76 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:130:1400 [INFO] [stdout] | [INFO] [stdout] 130 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:154:1880 [INFO] [stdout] | [INFO] [stdout] 154 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:172:1464 [INFO] [stdout] | [INFO] [stdout] 172 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:178:1477 [INFO] [stdout] | [INFO] [stdout] 178 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:244:1495 [INFO] [stdout] | [INFO] [stdout] 244 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:256:1478 [INFO] [stdout] | [INFO] [stdout] 256 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:262:1442 [INFO] [stdout] | [INFO] [stdout] 262 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:274:1387 [INFO] [stdout] | [INFO] [stdout] 274 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:280:1458 [INFO] [stdout] | [INFO] [stdout] 280 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:286:1926 [INFO] [stdout] | [INFO] [stdout] 286 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:310:1874 [INFO] [stdout] | [INFO] [stdout] 310 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:316:1498 [INFO] [stdout] | [INFO] [stdout] 316 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:376:1438 [INFO] [stdout] | [INFO] [stdout] 376 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:388:1478 [INFO] [stdout] | [INFO] [stdout] 388 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:412:1462 [INFO] [stdout] | [INFO] [stdout] 412 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:460:1349 [INFO] [stdout] | [INFO] [stdout] 460 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:556:1398 [INFO] [stdout] | [INFO] [stdout] 556 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:586:1792 [INFO] [stdout] | [INFO] [stdout] 586 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:634:1387 [INFO] [stdout] | [INFO] [stdout] 634 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:658:1908 [INFO] [stdout] | [INFO] [stdout] 658 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:760:1439 [INFO] [stdout] | [INFO] [stdout] 760 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:784:1194 [INFO] [stdout] | [INFO] [stdout] 784 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:868:1873 [INFO] [stdout] | [INFO] [stdout] 868 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:886:1482 [INFO] [stdout] | [INFO] [stdout] 886 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:940:1365 [INFO] [stdout] | [INFO] [stdout] 940 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:946:1478 [INFO] [stdout] | [INFO] [stdout] 946 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:958:1457 [INFO] [stdout] | [INFO] [stdout] 958 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:964:1560 [INFO] [stdout] | [INFO] [stdout] 964 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1000:1321 [INFO] [stdout] | [INFO] [stdout] 1000 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1024:1458 [INFO] [stdout] | [INFO] [stdout] 1024 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1042:1494 [INFO] [stdout] | [INFO] [stdout] 1042 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1060:1771 [INFO] [stdout] | [INFO] [stdout] 1060 | ...(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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1078:1445 [INFO] [stdout] | [INFO] [stdout] 1078 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1090:1429 [INFO] [stdout] | [INFO] [stdout] 1090 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1096:1836 [INFO] [stdout] | [INFO] [stdout] 1096 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1126:1434 [INFO] [stdout] | [INFO] [stdout] 1126 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1144:1556 [INFO] [stdout] | [INFO] [stdout] 1144 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1150:1572 [INFO] [stdout] | [INFO] [stdout] 1150 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1156:1490 [INFO] [stdout] | [INFO] [stdout] 1156 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1168:1434 [INFO] [stdout] | [INFO] [stdout] 1168 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1192:1353 [INFO] [stdout] | [INFO] [stdout] 1192 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1234:1842 [INFO] [stdout] | [INFO] [stdout] 1234 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1270:1506 [INFO] [stdout] | [INFO] [stdout] 1270 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1306:1246 [INFO] [stdout] | [INFO] [stdout] 1306 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1336:1458 [INFO] [stdout] | [INFO] [stdout] 1336 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1426:1486 [INFO] [stdout] | [INFO] [stdout] 1426 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1432:1307 [INFO] [stdout] | [INFO] [stdout] 1432 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1444:1446 [INFO] [stdout] | [INFO] [stdout] 1444 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1462:1464 [INFO] [stdout] | [INFO] [stdout] 1462 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1474:1504 [INFO] [stdout] | [INFO] [stdout] 1474 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1498:1512 [INFO] [stdout] | [INFO] [stdout] 1498 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1534:1321 [INFO] [stdout] | [INFO] [stdout] 1534 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1552:1454 [INFO] [stdout] | [INFO] [stdout] 1552 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1570:1458 [INFO] [stdout] | [INFO] [stdout] 1570 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1576:1846 [INFO] [stdout] | [INFO] [stdout] 1576 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1648:1426 [INFO] [stdout] | [INFO] [stdout] 1648 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1666:1165 [INFO] [stdout] | [INFO] [stdout] 1666 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1702:1482 [INFO] [stdout] | [INFO] [stdout] 1702 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1720:1474 [INFO] [stdout] | [INFO] [stdout] 1720 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1774:1337 [INFO] [stdout] | [INFO] [stdout] 1774 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1816:1460 [INFO] [stdout] | [INFO] [stdout] 1816 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1834:1707 [INFO] [stdout] | [INFO] [stdout] 1834 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1912:1516 [INFO] [stdout] | [INFO] [stdout] 1912 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1918:1516 [INFO] [stdout] | [INFO] [stdout] 1918 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1942:1365 [INFO] [stdout] | [INFO] [stdout] 1942 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1990:1449 [INFO] [stdout] | [INFO] [stdout] 1990 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2002:1353 [INFO] [stdout] | [INFO] [stdout] 2002 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2044:1341 [INFO] [stdout] | [INFO] [stdout] 2044 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2152:1926 [INFO] [stdout] | [INFO] [stdout] 2152 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2176:1652 [INFO] [stdout] | [INFO] [stdout] 2176 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2182:1873 [INFO] [stdout] | [INFO] [stdout] 2182 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2194:1244 [INFO] [stdout] | [INFO] [stdout] 2194 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2224:1450 [INFO] [stdout] | [INFO] [stdout] 2224 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2230:1862 [INFO] [stdout] | [INFO] [stdout] 2230 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2236:1450 [INFO] [stdout] | [INFO] [stdout] 2236 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2254:1908 [INFO] [stdout] | [INFO] [stdout] 2254 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2266:1498 [INFO] [stdout] | [INFO] [stdout] 2266 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2296:1520 [INFO] [stdout] | [INFO] [stdout] 2296 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2302:1522 [INFO] [stdout] | [INFO] [stdout] 2302 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2314:1564 [INFO] [stdout] | [INFO] [stdout] 2314 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2320:1437 [INFO] [stdout] | [INFO] [stdout] 2320 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2332:1842 [INFO] [stdout] | [INFO] [stdout] 2332 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2380:1553 [INFO] [stdout] | [INFO] [stdout] 2380 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2392:1520 [INFO] [stdout] | [INFO] [stdout] 2392 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2398:1353 [INFO] [stdout] | [INFO] [stdout] 2398 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2524:1454 [INFO] [stdout] | [INFO] [stdout] 2524 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2536:1412 [INFO] [stdout] | [INFO] [stdout] 2536 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2548:1458 [INFO] [stdout] | [INFO] [stdout] 2548 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2656:1798 [INFO] [stdout] | [INFO] [stdout] 2656 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2686:1494 [INFO] [stdout] | [INFO] [stdout] 2686 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2698:1522 [INFO] [stdout] | [INFO] [stdout] 2698 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2734:1830 [INFO] [stdout] | [INFO] [stdout] 2734 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2788:1309 [INFO] [stdout] | [INFO] [stdout] 2788 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2818:1458 [INFO] [stdout] | [INFO] [stdout] 2818 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2824:1309 [INFO] [stdout] | [INFO] [stdout] 2824 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2836:1906 [INFO] [stdout] | [INFO] [stdout] 2836 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2902:1482 [INFO] [stdout] | [INFO] [stdout] 2902 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2962:1490 [INFO] [stdout] | [INFO] [stdout] 2962 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:2974:1450 [INFO] [stdout] | [INFO] [stdout] 2974 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3004:1450 [INFO] [stdout] | [INFO] [stdout] 3004 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3112:1832 [INFO] [stdout] | [INFO] [stdout] 3112 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3136:1258 [INFO] [stdout] | [INFO] [stdout] 3136 | ...on_camel_case_types)] # [derive (Debug)] pub struct Separator { this : RawObject < Self > , } impl Separator { } impl gdnative_core ::... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Separator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3142:1454 [INFO] [stdout] | [INFO] [stdout] 3142 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3172:1349 [INFO] [stdout] | [INFO] [stdout] 3172 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3220:1349 [INFO] [stdout] | [INFO] [stdout] 3220 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3322:1442 [INFO] [stdout] | [INFO] [stdout] 3322 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3334:1408 [INFO] [stdout] | [INFO] [stdout] 3334 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3370:1688 [INFO] [stdout] | [INFO] [stdout] 3370 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3394:1552 [INFO] [stdout] | [INFO] [stdout] 3394 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3418:1866 [INFO] [stdout] | [INFO] [stdout] 3418 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3448:1470 [INFO] [stdout] | [INFO] [stdout] 3448 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3454:1458 [INFO] [stdout] | [INFO] [stdout] 3454 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3460:1470 [INFO] [stdout] | [INFO] [stdout] 3460 | ..._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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3466:1760 [INFO] [stdout] | [INFO] [stdout] 3466 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3472:1652 [INFO] [stdout] | [INFO] [stdout] 3472 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalEx... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeGlobalExpression` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3478:1186 [INFO] [stdout] | [INFO] [stdout] 3478 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3502:1498 [INFO] [stdout] | [INFO] [stdout] 3502 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3748:1486 [INFO] [stdout] | [INFO] [stdout] 3748 | ...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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:3778:1293 [INFO] [stdout] | [INFO] [stdout] 3778 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:4:5213 [INFO] [stdout] | [INFO] [stdout] 4 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 4 | # [doc = "`core class DTLSServer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_dtlsserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDTLSServer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DTLSServer { this : RawObject < Self > , } impl DTLSServer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DTLSServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Setup the DTLS server to use the given `private_key` and provide the given `certificate` to clients. You can pass the optional `chain` parameter to provide additional CA chain information along with the certificate.\n# Default Arguments\n* `chain` - `null`"] # [doc = ""] # [inline] pub fn setup (& self , key : impl AsArg < crate :: generated :: crypto_key :: CryptoKey > , certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate > , chain : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallptr_i64_obj_obj_obj (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , certificate . as_arg_ptr () , chain . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Try to initiate the DTLS handshake with the given `udp_peer` which must be already connected (see [method PacketPeerUDP.connect_to_host]).\n**Note**: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange."] # [doc = ""] # [inline] pub fn take_connection (& self , udp_peer : impl AsArg < crate :: generated :: packet_peer_udp :: PacketPeerUDP >) -> Option < Ref < crate :: generated :: packet_peer_dtls :: PacketPeerDTLS , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , udp_peer . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: packet_peer_dtls :: PacketPeerDTLS , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for DTLSServer { } unsafe impl GodotObject for DTLSServer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DTLSServer" } } impl std :: ops :: Deref for DTLSServer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DTLSServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for DTLSServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for DTLSServer { } impl Instanciable for DTLSServer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { DTLSServer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DTLSServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub setup : * mut sys :: godot_method_bind , pub take_connection : * mut sys :: godot_method_bind } impl DTLSServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DTLSServerMethodTable = DTLSServerMethodTable { class_constructor : None , setup : 0 as * mut sys :: godot_method_bind , take_connection : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { DTLSServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DTLSServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . setup = (gd_api . godot_method_bind_get_method) (class_name , "setup\0" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:10:6196 [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 singleton class CameraServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cameraserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCameraServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedImage (pub i64) ; impl FeedImage { pub const RGBA_IMAGE : FeedImage = FeedImage (0i64) ; pub const Y_IMAGE : FeedImage = FeedImage (0i64) ; pub const YCBCR_IMAGE : FeedImage = FeedImage (0i64) ; pub const CBCR_IMAGE : FeedImage = FeedImage (1i64) ; } impl From < i64 > for FeedImage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedImage > for i64 { # [inline] fn from (v : FeedImage) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraServer { pub const FEED_CBCR_IMAGE : i64 = 1i64 ; pub const FEED_RGBA_IMAGE : i64 = 0i64 ; pub const FEED_YCBCR_IMAGE : i64 = 0i64 ; pub const FEED_Y_IMAGE : i64 = 0i64 ; } impl CameraServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("CameraServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a camera feed to the camera server."] # [doc = ""] # [inline] pub fn add_feed (& self , feed : impl AsArg < crate :: generated :: camera_feed :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . add_feed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , feed . as_arg_ptr ()) ; } } # [doc = "Returns an array of [CameraFeed]s."] # [doc = ""] # [inline] pub fn feeds (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . feeds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [CameraFeed] with this id."] # [doc = ""] # [inline] pub fn get_feed (& self , index : i64) -> Option < Ref < crate :: generated :: camera_feed :: CameraFeed , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . get_feed ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: camera_feed :: CameraFeed , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of [CameraFeed]s registered."] # [doc = ""] # [inline] pub fn get_feed_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . get_feed_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a [CameraFeed]."] # [doc = ""] # [inline] pub fn remove_feed (& self , feed : impl AsArg < crate :: generated :: camera_feed :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . remove_feed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , feed . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraServer { } unsafe impl GodotObject for CameraServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CameraServer" } } impl std :: ops :: Deref for CameraServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for CameraServer { } unsafe impl Send for CameraServer { } unsafe impl Sync for CameraServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_feed : * mut sys :: godot_method_bind , pub feeds : * mut sys :: godot_method_bind , pub get_feed : * mut sys :: godot_method_bind , pub get_feed_count : * mut sys :: godot_method_bind , pub remove_feed : * mut sys :: godot_method_bind } impl CameraServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraServerMethodTable = CameraServerMethodTable { class_constructor : None , add_feed : 0 as * mut sys :: godot_method_bind , feeds : 0 as * mut sys :: godot_method_bind , get_feed : 0 as * mut sys :: godot_method_bind , get_feed_count : 0 as * mut sys :: godot_method_bind , remove_feed : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CameraServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_feed = (gd_api . godot_method_bind_get_method) (class_name , "add_feed\0" . as_ptr () as * const c_char) ; table . feeds = (gd_api . godot_method_bind_get_method) (class_name , "feeds\0" . as_ptr () as * const c_char) ; table . get_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_feed\0" . as_ptr () as * const c_char) ; table . get_feed_count = (gd_api . godot_method_bind_get_method) (class_name , "get_feed_count\0" . as_ptr () as * const c_char) ; table . remove_feed = (gd_api . godot_method_bind_get_method) (class_name , "remove_feed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:16:4589 [INFO] [stdout] | [INFO] [stdout] 16 | ...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] 16 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:22:3784 [INFO] [stdout] | [INFO] [stdout] 22 | ...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] 22 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:28:4465 [INFO] [stdout] | [INFO] [stdout] 28 | ...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] 28 | # [doc = "`core class VSlider` inherits `Slider` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vslider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VSlider` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVSlider inherits methods from:\n - [Slider](struct.Slider.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VSlider { this : RawObject < Self > , } impl VSlider { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VSliderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VSlider { } unsafe impl GodotObject for VSlider { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VSlider" } } impl QueueFree for VSlider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VSlider { type Target = crate :: generated :: slider :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: slider :: Slider > for VSlider { } unsafe impl SubClass < crate :: generated :: range :: Range > for VSlider { } unsafe impl SubClass < crate :: generated :: control :: Control > for VSlider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VSlider { } unsafe impl SubClass < crate :: generated :: node :: Node > for VSlider { } unsafe impl SubClass < crate :: generated :: object :: Object > for VSlider { } impl Instanciable for VSlider { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VSlider :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VSliderMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VSliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VSliderMethodTable = VSliderMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VSliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VSlider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:34:6208 [INFO] [stdout] | [INFO] [stdout] 34 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:40:5094 [INFO] [stdout] | [INFO] [stdout] 40 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 40 | # [doc = "`core singleton class JSON` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_json.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJSON inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JSON { this : RawObject < Self > , } impl JSON { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("JSON\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Parses a JSON-encoded string and returns a [JSONParseResult] containing the result."] # [doc = ""] # [inline] pub fn parse (& self , json : impl Into < GodotString >) -> Option < Ref < crate :: generated :: json_parse_result :: JSONParseResult , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , json . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: json_parse_result :: JSONParseResult , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nConverts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.\n**Note:** The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.\nUse `indent` parameter to pretty print the output.\n**Example output:**\n```gdscript\n## JSON.print(my_dictionary)\n{\"name\":\"my_dictionary\",\"version\":\"1.0.0\",\"entities\":[{\"name\":\"entity_0\",\"value\":\"value_0\"},{\"name\":\"entity_1\",\"value\":\"value_1\"}]}\n\n## JSON.print(my_dictionary, \"\\t\")\n{\n \"name\": \"my_dictionary\",\n \"version\": \"1.0.0\",\n \"entities\": [\n {\n \"name\": \"entity_0\",\n \"value\": \"value_0\"\n },\n {\n \"name\": \"entity_1\",\n \"value\": \"value_1\"\n }\n ]\n}\n```\n# Default Arguments\n* `indent` - `\"\"`\n* `sort_keys` - `false`"] # [doc = ""] # [inline] pub fn print (& self , value : impl OwnedToVariant , indent : impl Into < GodotString > , sort_keys : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONMethodTable :: get (get_api ()) . print ; let ret = crate :: icalls :: icallptr_str_var_str_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , indent . into () , sort_keys) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for JSON { } unsafe impl GodotObject for JSON { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSON" } } impl std :: ops :: Deref for JSON { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSON { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for JSON { } unsafe impl Send for JSON { } unsafe impl Sync for JSON { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JSONMethodTable { pub class_constructor : sys :: godot_class_constructor , pub parse : * mut sys :: godot_method_bind , pub print : * mut sys :: godot_method_bind } impl JSONMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JSONMethodTable = JSONMethodTable { class_constructor : None , parse : 0 as * mut sys :: godot_method_bind , print : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { JSONMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_JSON\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\0" . as_ptr () as * const c_char) ; table . print = (gd_api . godot_method_bind_get_method) (class_name , "print\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:46:4661 [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 AudioEffectAmplify` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectamplify.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectAmplify inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectAmplify { this : RawObject < Self > , } impl AudioEffectAmplify { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectAmplifyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectAmplifyMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectAmplifyMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectAmplify { } unsafe impl GodotObject for AudioEffectAmplify { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectAmplify" } } impl std :: ops :: Deref for AudioEffectAmplify { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectAmplify { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectAmplify { } impl Instanciable for AudioEffectAmplify { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectAmplify :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectAmplifyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_volume_db : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind } impl AudioEffectAmplifyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectAmplifyMethodTable = AudioEffectAmplifyMethodTable { class_constructor : None , get_volume_db : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectAmplifyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectAmplify\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:52:7986 [INFO] [stdout] | [INFO] [stdout] 52 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 = "`tools class EditorExportPlugin` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorexportplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorExportPlugin inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorExportPlugin { this : RawObject < Self > , } impl EditorExportPlugin { # [doc = ""] # [doc = ""] # [inline] pub fn add_file (& self , path : impl Into < GodotString > , file : ByteArray , remap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_file ; let ret = crate :: icalls :: icallptr_void_str_bytearr_bool (method_bind , self . this . sys () . as_ptr () , path . into () , file , remap) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ios_bundle_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_bundle_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ios_cpp_code (& self , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_cpp_code ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , code . into ()) ; } } # [doc = "Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.\n**Note:** For static libraries (*.a) works in same way as [method add_ios_framework].\nThis method should not be used for System libraries as they are already present on the device."] # [doc = ""] # [inline] pub fn add_ios_embedded_framework (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_embedded_framework ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project."] # [doc = ""] # [inline] pub fn add_ios_framework (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_framework ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ios_linker_flags (& self , flags : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_linker_flags ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , flags . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ios_plist_content (& self , plist_content : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_plist_content ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , plist_content . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ios_project_static_lib (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_project_static_lib ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_shared_object (& self , path : impl Into < GodotString > , tags : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_shared_object ; let ret = crate :: icalls :: icallptr_void_str_strarr (method_bind , self . this . sys () . as_ptr () , path . into () , tags) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn skip (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . skip ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorExportPlugin { } unsafe impl GodotObject for EditorExportPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorExportPlugin" } } impl std :: ops :: Deref for EditorExportPlugin { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorExportPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorExportPlugin { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorExportPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorExportPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_file : * mut sys :: godot_method_bind , pub add_ios_bundle_file : * mut sys :: godot_method_bind , pub add_ios_cpp_code : * mut sys :: godot_method_bind , pub add_ios_embedded_framework : * mut sys :: godot_method_bind , pub add_ios_framework : * mut sys :: godot_method_bind , pub add_ios_linker_flags : * mut sys :: godot_method_bind , pub add_ios_plist_content : * mut sys :: godot_method_bind , pub add_ios_project_static_lib : * mut sys :: godot_method_bind , pub add_shared_object : * mut sys :: godot_method_bind , pub skip : * mut sys :: godot_method_bind } impl EditorExportPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorExportPluginMethodTable = EditorExportPluginMethodTable { class_constructor : None , add_file : 0 as * mut sys :: godot_method_bind , add_ios_bundle_file : 0 as * mut sys :: godot_method_bind , add_ios_cpp_code : 0 as * mut sys :: godot_method_bind , add_ios_embedded_framework : 0 as * mut sys :: godot_method_bind , add_ios_framework : 0 as * mut sys :: godot_method_bind , add_ios_linker_flags : 0 as * mut sys :: godot_method_bind , add_ios_plist_content : 0 as * mut sys :: godot_method_bind , add_ios_project_static_lib : 0 as * mut sys :: godot_method_bind , add_shared_object : 0 as * mut sys :: godot_method_bind , skip : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorExportPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorExportPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_file = (gd_api . godot_method_bind_get_method) (class_name , "add_file\0" . as_ptr () as * const c_char) ; table . add_ios_bundle_file = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_bundle_file\0" . as_ptr () as * const c_char) ; table . add_ios_cpp_code = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_cpp_code\0" . as_ptr () as * const c_char) ; table . add_ios_embedded_framework = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_embedded_framework\0" . as_ptr () as * const c_char) ; table . add_ios_framework = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_framework\0" . as_ptr () as * const c_char) ; table . add_ios_linker_flags = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_linker_flags\0" . as_ptr () as * const c_char) ; table . add_ios_plist_content = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_plist_content\0" . as_ptr () as * const c_char) ; table . add_ios_project_static_lib = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_project_static_lib\0" . as_ptr () as * const c_char) ; table . add_shared_object = (gd_api . godot_method_bind_get_method) (class_name , "add_shared_object\0" . as_ptr () as * const c_char) ; table . skip = (gd_api . godot_method_bind_get_method) (class_name , "skip\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:58:4680 [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 AnimationNodeAdd2` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeadd2.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAdd2 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAdd2 { this : RawObject < Self > , } impl AnimationNodeAdd2 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAdd2MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd2MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd2MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd2 { } unsafe impl GodotObject for AnimationNodeAdd2 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd2" } } impl std :: ops :: Deref for AnimationNodeAdd2 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAdd2 { } impl Instanciable for AnimationNodeAdd2 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeAdd2 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAdd2MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeAdd2MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAdd2MethodTable = AnimationNodeAdd2MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeAdd2MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAdd2\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:64:4827 [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 InputEventPanGesture` inherits `InputEventGesture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventpangesture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventPanGesture inherits methods from:\n - [InputEventGesture](struct.InputEventGesture.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventPanGesture { this : RawObject < Self > , } impl InputEventPanGesture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventPanGestureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn delta (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventPanGestureMethodTable :: get (get_api ()) . get_delta ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_delta (& self , delta : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventPanGestureMethodTable :: get (get_api ()) . set_delta ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , delta) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventPanGesture { } unsafe impl GodotObject for InputEventPanGesture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventPanGesture" } } impl std :: ops :: Deref for InputEventPanGesture { type Target = crate :: generated :: input_event_gesture :: InputEventGesture ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventPanGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_gesture :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_gesture :: InputEventGesture > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventPanGesture { } impl Instanciable for InputEventPanGesture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventPanGesture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventPanGestureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_delta : * mut sys :: godot_method_bind , pub set_delta : * mut sys :: godot_method_bind } impl InputEventPanGestureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventPanGestureMethodTable = InputEventPanGestureMethodTable { class_constructor : None , get_delta : 0 as * mut sys :: godot_method_bind , set_delta : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventPanGestureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventPanGesture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_delta\0" . as_ptr () as * const c_char) ; table . set_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_delta\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:70:5187 [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 Path` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_path.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Path` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPath inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Path { this : RawObject < Self > , } impl Path { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PathMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [Curve3D] describing the path."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: curve_3d :: Curve3D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve_3d :: Curve3D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A [Curve3D] describing the path."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: curve_3d :: Curve3D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Path { } unsafe impl GodotObject for Path { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Path" } } impl QueueFree for Path { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Path { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Path { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Path { } unsafe impl SubClass < crate :: generated :: node :: Node > for Path { } unsafe impl SubClass < crate :: generated :: object :: Object > for Path { } impl Instanciable for Path { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Path :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PathMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind } impl PathMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PathMethodTable = PathMethodTable { class_constructor : None , get_curve : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PathMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Path\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:76:3889 [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 VisualShaderNodeTransformCompose` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetransformcompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformCompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformCompose { this : RawObject < Self > , } impl VisualShaderNodeTransformCompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformComposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformCompose { } unsafe impl GodotObject for VisualShaderNodeTransformCompose { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformCompose" } } impl std :: ops :: Deref for VisualShaderNodeTransformCompose { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformCompose { } impl Instanciable for VisualShaderNodeTransformCompose { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformCompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformComposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTransformComposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformComposeMethodTable = VisualShaderNodeTransformComposeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformComposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformCompose\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:82:6546 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:88:4080 [INFO] [stdout] | [INFO] [stdout] 88 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 88 | # [doc = "`core class ScrollBar` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_scrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nScrollBar inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScrollBar { this : RawObject < Self > , } impl ScrollBar { # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused."] # [doc = ""] # [inline] pub fn custom_step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollBarMethodTable :: get (get_api ()) . get_custom_step ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused."] # [doc = ""] # [inline] pub fn set_custom_step (& self , step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollBarMethodTable :: get (get_api ()) . set_custom_step ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , step) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScrollBar { } unsafe impl GodotObject for ScrollBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScrollBar" } } impl QueueFree for ScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScrollBar { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for ScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for ScrollBar { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_custom_step : * mut sys :: godot_method_bind , pub set_custom_step : * mut sys :: godot_method_bind } impl ScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScrollBarMethodTable = ScrollBarMethodTable { class_constructor : None , get_custom_step : 0 as * mut sys :: godot_method_bind , set_custom_step : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_step\0" . as_ptr () as * const c_char) ; table . set_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_step\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:94:10038 [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 CSGCylinder` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgcylinder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGCylinder` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGCylinder inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGCylinder { this : RawObject < Self > , } impl CSGCylinder { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGCylinderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_sides ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_cone (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . is_cone ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cone (& self , cone : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_cone ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , cone) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_sides ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sides) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGCylinder { } unsafe impl GodotObject for CSGCylinder { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGCylinder" } } impl QueueFree for CSGCylinder { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGCylinder { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCylinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGCylinder { } impl Instanciable for CSGCylinder { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGCylinder :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGCylinderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_sides : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub is_cone : * mut sys :: godot_method_bind , pub set_cone : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_sides : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGCylinderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGCylinderMethodTable = CSGCylinderMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_sides : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , is_cone : 0 as * mut sys :: godot_method_bind , set_cone : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_sides : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CSGCylinderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGCylinder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . is_cone = (gd_api . godot_method_bind_get_method) (class_name , "is_cone\0" . as_ptr () as * const c_char) ; table . set_cone = (gd_api . godot_method_bind_get_method) (class_name , "set_cone\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:100:28077 [INFO] [stdout] | [INFO] [stdout] 100 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 100 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:106:3482 [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 WeakRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_weakref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWeakRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WeakRef { this : RawObject < Self > , } impl WeakRef { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WeakRefMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the [Object] this weakref is referring to."] # [doc = ""] # [inline] pub fn get_ref (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = WeakRefMethodTable :: get (get_api ()) . get_ref ; let ret = crate :: icalls :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for WeakRef { } unsafe impl GodotObject for WeakRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WeakRef" } } impl std :: ops :: Deref for WeakRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WeakRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WeakRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for WeakRef { } impl Instanciable for WeakRef { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WeakRef :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WeakRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ref : * mut sys :: godot_method_bind } impl WeakRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WeakRefMethodTable = WeakRefMethodTable { class_constructor : None , get_ref : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WeakRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WeakRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ref = (gd_api . godot_method_bind_get_method) (class_name , "get_ref\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:112:4841 [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 VisualScriptFunctionState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptfunctionstate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunctionState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunctionState { this : RawObject < Self > , } impl VisualScriptFunctionState { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionStateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn connect_to_signal (& self , obj : impl AsArg < crate :: generated :: object :: Object > , signals : impl Into < GodotString > , args : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . connect_to_signal ; let ret = crate :: icalls :: icallptr_void_obj_str_arr (method_bind , self . this . sys () . as_ptr () , obj . as_arg_ptr () , signals . into () , args) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn resume (& self , args : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallptr_var_arr (method_bind , self . this . sys () . as_ptr () , args) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionState { } unsafe impl GodotObject for VisualScriptFunctionState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionState" } } impl std :: ops :: Deref for VisualScriptFunctionState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptFunctionState { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptFunctionState { } impl Instanciable for VisualScriptFunctionState { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptFunctionState :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_signal : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub resume : * mut sys :: godot_method_bind } impl VisualScriptFunctionStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionStateMethodTable = VisualScriptFunctionStateMethodTable { class_constructor : None , connect_to_signal : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , resume : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptFunctionStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunctionState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_signal = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_signal\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:118:5245 [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 BoneAttachment` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_boneattachment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`BoneAttachment` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBoneAttachment inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoneAttachment { this : RawObject < Self > , } impl BoneAttachment { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BoneAttachmentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The name of the attached bone."] # [doc = ""] # [inline] pub fn bone_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = BoneAttachmentMethodTable :: get (get_api ()) . get_bone_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The name of the attached bone."] # [doc = ""] # [inline] pub fn set_bone_name (& self , bone_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoneAttachmentMethodTable :: get (get_api ()) . set_bone_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , bone_name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoneAttachment { } unsafe impl GodotObject for BoneAttachment { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BoneAttachment" } } impl QueueFree for BoneAttachment { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for BoneAttachment { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoneAttachment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: node :: Node > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: object :: Object > for BoneAttachment { } impl Instanciable for BoneAttachment { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BoneAttachment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoneAttachmentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bone_name : * mut sys :: godot_method_bind , pub set_bone_name : * mut sys :: godot_method_bind } impl BoneAttachmentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoneAttachmentMethodTable = BoneAttachmentMethodTable { class_constructor : None , get_bone_name : 0 as * mut sys :: godot_method_bind , set_bone_name : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { BoneAttachmentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoneAttachment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_name\0" . as_ptr () as * const c_char) ; table . set_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_name\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:124:7201 [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 ViewportContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_viewportcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ViewportContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nViewportContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ViewportContainer { this : RawObject < Self > , } impl ViewportContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.\nFor example, a 1280×720 viewport with [member stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [member stretch] must be `true` for this property to work."] # [doc = ""] # [inline] pub fn stretch_shrink (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . get_stretch_shrink ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will be scaled to the control's size."] # [doc = ""] # [inline] pub fn is_stretch_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . is_stretch_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will be scaled to the control's size."] # [doc = ""] # [inline] pub fn set_stretch (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . set_stretch ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.\nFor example, a 1280×720 viewport with [member stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [member stretch] must be `true` for this property to work."] # [doc = ""] # [inline] pub fn set_stretch_shrink (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . set_stretch_shrink ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ViewportContainer { } unsafe impl GodotObject for ViewportContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ViewportContainer" } } impl QueueFree for ViewportContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ViewportContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for ViewportContainer { } impl Instanciable for ViewportContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ViewportContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_stretch_shrink : * mut sys :: godot_method_bind , pub is_stretch_enabled : * mut sys :: godot_method_bind , pub set_stretch : * mut sys :: godot_method_bind , pub set_stretch_shrink : * mut sys :: godot_method_bind } impl ViewportContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportContainerMethodTable = ViewportContainerMethodTable { class_constructor : None , get_stretch_shrink : 0 as * mut sys :: godot_method_bind , is_stretch_enabled : 0 as * mut sys :: godot_method_bind , set_stretch : 0 as * mut sys :: godot_method_bind , set_stretch_shrink : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ViewportContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ViewportContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_stretch_shrink = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_shrink\0" . as_ptr () as * const c_char) ; table . is_stretch_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_stretch_enabled\0" . as_ptr () as * const c_char) ; table . set_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch\0" . as_ptr () as * const c_char) ; table . set_stretch_shrink = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_shrink\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:130:3380 [INFO] [stdout] | [INFO] [stdout] 130 | ...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] 130 | # [doc = "`core class Texture3D` inherits `TextureLayered` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texture3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTexture3D inherits methods from:\n - [TextureLayered](struct.TextureLayered.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Texture3D { this : RawObject < Self > , } impl Texture3D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Texture3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture3D { } unsafe impl GodotObject for Texture3D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture3D" } } impl std :: ops :: Deref for Texture3D { type Target = crate :: generated :: texture_layered :: TextureLayered ; # [inline] fn deref (& self) -> & crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture_layered :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture_layered :: TextureLayered > for Texture3D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Texture3D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Texture3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Texture3D { } impl Instanciable for Texture3D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Texture3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Texture3DMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl Texture3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Texture3DMethodTable = Texture3DMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Texture3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Texture3D\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:136:19889 [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 Skeleton` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_skeleton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Skeleton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeleton inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Skeleton { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Skeleton { pub const NOTIFICATION_UPDATE_SKELETON : i64 = 50i64 ; } impl Skeleton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkeletonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone, with name `name`. [method get_bone_count] will become the bone index."] # [doc = ""] # [inline] pub fn add_bone (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "[i]Deprecated soon.[/i]"] # [doc = ""] # [inline] pub fn bind_child_node_to_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . bind_child_node_to_bone ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx , node . as_arg_ptr ()) ; } } # [doc = "Clear all the bones in this skeleton."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_bones_global_pose_override (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . clear_bones_global_pose_override ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the bone index that matches `name` as its name."] # [doc = ""] # [inline] pub fn find_bone (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . find_bone ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the amount of bones in the skeleton."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose."] # [doc = ""] # [inline] pub fn get_bone_custom_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_custom_pose ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = "Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual \"global\" transform of the bone."] # [doc = ""] # [inline] pub fn get_bone_global_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_global_pose ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bone_global_pose_no_override (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_global_pose_no_override ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = "Returns the name of the bone at index `index`."] # [doc = ""] # [inline] pub fn get_bone_name (& self , bone_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the bone index which is the parent of the bone at `bone_idx`. If -1, then bone has no parent.\n**Note:** The parent bone returned will always be less than `bone_idx`."] # [doc = ""] # [inline] pub fn get_bone_parent (& self , bone_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_parent ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; ret as _ } } # [doc = "Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose."] # [doc = ""] # [inline] pub fn get_bone_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_pose ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = "Returns the rest transform for a bone `bone_idx`."] # [doc = ""] # [inline] pub fn get_bone_rest (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_rest ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; mem :: transmute (ret) } } # [doc = "[i]Deprecated soon.[/i]"] # [doc = ""] # [inline] pub fn get_bound_child_nodes_to_bone (& self , bone_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bound_child_nodes_to_bone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_bone_rest_disabled (& self , bone_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . is_bone_rest_disabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn localize_rests (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . localize_rests ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn physical_bones_add_collision_exception (& self , exception : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_add_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , exception) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn physical_bones_remove_collision_exception (& self , exception : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_remove_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , exception) ; } } # [doc = "\n# Default Arguments\n* `bones` - `[ ]`"] # [doc = ""] # [inline] pub fn physical_bones_start_simulation (& self , bones : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_start_simulation ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn physical_bones_stop_simulation (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_stop_simulation ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn register_skin (& self , skin : impl AsArg < crate :: generated :: skin :: Skin >) -> Option < Ref < crate :: generated :: skin_reference :: SkinReference , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . register_skin ; let ret = crate :: icalls :: icallptr_obj_obj (method_bind , self . this . sys () . as_ptr () , skin . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skin_reference :: SkinReference , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bone_custom_pose (& self , bone_idx : i64 , custom_pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_custom_pose ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , custom_pose) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bone_disable_rest (& self , bone_idx : i64 , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_disable_rest ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx , disable) ; } } # [doc = "\n# Default Arguments\n* `persistent` - `false`"] # [doc = ""] # [inline] pub fn set_bone_global_pose_override (& self , bone_idx : i64 , pose : Transform , amount : f64 , persistent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_global_pose_override ; let ret = crate :: icalls :: icallptr_void_i64_trans_f64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx , pose , amount , persistent) ; } } # [doc = "Sets the bone index `parent_idx` as the parent of the bone at `bone_idx`. If -1, then bone has no parent.\n**Note:** `parent_idx` must be less than `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_parent (& self , bone_idx : i64 , parent_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_parent ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx , parent_idx) ; } } # [doc = "Sets the pose transform for bone `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_pose (& self , bone_idx : i64 , pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_pose ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , pose) ; } } # [doc = "Sets the rest transform for bone `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_rest (& self , bone_idx : i64 , rest : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_rest ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx , rest) ; } } # [doc = "[i]Deprecated soon.[/i]"] # [doc = ""] # [inline] pub fn unbind_child_node_from_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . unbind_child_node_from_bone ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx , node . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn unparent_bone_and_rest (& self , bone_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . unparent_bone_and_rest ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton { } unsafe impl GodotObject for Skeleton { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Skeleton" } } impl QueueFree for Skeleton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Skeleton { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Skeleton { } unsafe impl SubClass < crate :: generated :: node :: Node > for Skeleton { } unsafe impl SubClass < crate :: generated :: object :: Object > for Skeleton { } impl Instanciable for Skeleton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Skeleton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkeletonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub bind_child_node_to_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub clear_bones_global_pose_override : * mut sys :: godot_method_bind , pub find_bone : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_custom_pose : * mut sys :: godot_method_bind , pub get_bone_global_pose : * mut sys :: godot_method_bind , pub get_bone_global_pose_no_override : * mut sys :: godot_method_bind , pub get_bone_name : * mut sys :: godot_method_bind , pub get_bone_parent : * mut sys :: godot_method_bind , pub get_bone_pose : * mut sys :: godot_method_bind , pub get_bone_rest : * mut sys :: godot_method_bind , pub get_bound_child_nodes_to_bone : * mut sys :: godot_method_bind , pub is_bone_rest_disabled : * mut sys :: godot_method_bind , pub localize_rests : * mut sys :: godot_method_bind , pub physical_bones_add_collision_exception : * mut sys :: godot_method_bind , pub physical_bones_remove_collision_exception : * mut sys :: godot_method_bind , pub physical_bones_start_simulation : * mut sys :: godot_method_bind , pub physical_bones_stop_simulation : * mut sys :: godot_method_bind , pub register_skin : * mut sys :: godot_method_bind , pub set_bone_custom_pose : * mut sys :: godot_method_bind , pub set_bone_disable_rest : * mut sys :: godot_method_bind , pub set_bone_global_pose_override : * mut sys :: godot_method_bind , pub set_bone_parent : * mut sys :: godot_method_bind , pub set_bone_pose : * mut sys :: godot_method_bind , pub set_bone_rest : * mut sys :: godot_method_bind , pub unbind_child_node_from_bone : * mut sys :: godot_method_bind , pub unparent_bone_and_rest : * mut sys :: godot_method_bind } impl SkeletonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkeletonMethodTable = SkeletonMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , bind_child_node_to_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , clear_bones_global_pose_override : 0 as * mut sys :: godot_method_bind , find_bone : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_custom_pose : 0 as * mut sys :: godot_method_bind , get_bone_global_pose : 0 as * mut sys :: godot_method_bind , get_bone_global_pose_no_override : 0 as * mut sys :: godot_method_bind , get_bone_name : 0 as * mut sys :: godot_method_bind , get_bone_parent : 0 as * mut sys :: godot_method_bind , get_bone_pose : 0 as * mut sys :: godot_method_bind , get_bone_rest : 0 as * mut sys :: godot_method_bind , get_bound_child_nodes_to_bone : 0 as * mut sys :: godot_method_bind , is_bone_rest_disabled : 0 as * mut sys :: godot_method_bind , localize_rests : 0 as * mut sys :: godot_method_bind , physical_bones_add_collision_exception : 0 as * mut sys :: godot_method_bind , physical_bones_remove_collision_exception : 0 as * mut sys :: godot_method_bind , physical_bones_start_simulation : 0 as * mut sys :: godot_method_bind , physical_bones_stop_simulation : 0 as * mut sys :: godot_method_bind , register_skin : 0 as * mut sys :: godot_method_bind , set_bone_custom_pose : 0 as * mut sys :: godot_method_bind , set_bone_disable_rest : 0 as * mut sys :: godot_method_bind , set_bone_global_pose_override : 0 as * mut sys :: godot_method_bind , set_bone_parent : 0 as * mut sys :: godot_method_bind , set_bone_pose : 0 as * mut sys :: godot_method_bind , set_bone_rest : 0 as * mut sys :: godot_method_bind , unbind_child_node_from_bone : 0 as * mut sys :: godot_method_bind , unparent_bone_and_rest : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SkeletonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Skeleton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . bind_child_node_to_bone = (gd_api . godot_method_bind_get_method) (class_name , "bind_child_node_to_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . clear_bones_global_pose_override = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones_global_pose_override\0" . as_ptr () as * const c_char) ; table . find_bone = (gd_api . godot_method_bind_get_method) (class_name , "find_bone\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_custom_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_custom_pose\0" . as_ptr () as * const c_char) ; table . get_bone_global_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_global_pose\0" . as_ptr () as * const c_char) ; table . get_bone_global_pose_no_override = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_global_pose_no_override\0" . as_ptr () as * const c_char) ; table . get_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_name\0" . as_ptr () as * const c_char) ; table . get_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_parent\0" . as_ptr () as * const c_char) ; table . get_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_pose\0" . as_ptr () as * const c_char) ; table . get_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_rest\0" . as_ptr () as * const c_char) ; table . get_bound_child_nodes_to_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bound_child_nodes_to_bone\0" . as_ptr () as * const c_char) ; table . is_bone_rest_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_bone_rest_disabled\0" . as_ptr () as * const c_char) ; table . localize_rests = (gd_api . godot_method_bind_get_method) (class_name , "localize_rests\0" . as_ptr () as * const c_char) ; table . physical_bones_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_add_collision_exception\0" . as_ptr () as * const c_char) ; table . physical_bones_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . physical_bones_start_simulation = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_start_simulation\0" . as_ptr () as * const c_char) ; table . physical_bones_stop_simulation = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_stop_simulation\0" . as_ptr () as * const c_char) ; table . register_skin = (gd_api . godot_method_bind_get_method) (class_name , "register_skin\0" . as_ptr () as * const c_char) ; table . set_bone_custom_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_custom_pose\0" . as_ptr () as * const c_char) ; table . set_bone_disable_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_disable_rest\0" . as_ptr () as * const c_char) ; table . set_bone_global_pose_override = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_global_pose_override\0" . as_ptr () as * const c_char) ; table . set_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_parent\0" . as_ptr () as * const c_char) ; table . set_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_pose\0" . as_ptr () as * const c_char) ; table . set_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_rest\0" . as_ptr () as * const c_char) ; table . unbind_child_node_from_bone = (gd_api . godot_method_bind_get_method) (class_name , "unbind_child_node_from_bone\0" . as_ptr () as * const c_char) ; table . unparent_bone_and_rest = (gd_api . godot_method_bind_get_method) (class_name , "unparent_bone_and_rest\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:142:6957 [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 LightOccluder2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_lightoccluder2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`LightOccluder2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLightOccluder2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LightOccluder2D { this : RawObject < Self > , } impl LightOccluder2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LightOccluder2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn occluder_light_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . get_occluder_light_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn occluder_polygon (& self) -> Option < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . get_occluder_polygon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn set_occluder_light_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . set_occluder_light_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "The [OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn set_occluder_polygon (& self , polygon : impl AsArg < crate :: generated :: occluder_polygon_2d :: OccluderPolygon2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . set_occluder_polygon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , polygon . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LightOccluder2D { } unsafe impl GodotObject for LightOccluder2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LightOccluder2D" } } impl QueueFree for LightOccluder2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LightOccluder2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LightOccluder2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for LightOccluder2D { } impl Instanciable for LightOccluder2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { LightOccluder2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LightOccluder2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_occluder_light_mask : * mut sys :: godot_method_bind , pub get_occluder_polygon : * mut sys :: godot_method_bind , pub set_occluder_light_mask : * mut sys :: godot_method_bind , pub set_occluder_polygon : * mut sys :: godot_method_bind } impl LightOccluder2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LightOccluder2DMethodTable = LightOccluder2DMethodTable { class_constructor : None , get_occluder_light_mask : 0 as * mut sys :: godot_method_bind , get_occluder_polygon : 0 as * mut sys :: godot_method_bind , set_occluder_light_mask : 0 as * mut sys :: godot_method_bind , set_occluder_polygon : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { LightOccluder2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LightOccluder2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . get_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_polygon\0" . as_ptr () as * const c_char) ; table . set_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . set_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:148:13550 [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 = "`tools class EditorSettings` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorsettings.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSettings inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSettings { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorSettings { pub const NOTIFICATION_EDITOR_SETTINGS_CHANGED : i64 = 10000i64 ; } impl EditorSettings { # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a custom property info to a property. The dictionary must contain:\n- `name`: [String] (the name of the property)\n- `type`: [int] (see [enum Variant.Type])\n- optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String]\n**Example:**\n```gdscript\neditor_settings.set(\"category/property_name\", 0)\n\nvar property_info = {\n \"name\": \"category/property_name\",\n \"type\": TYPE_INT,\n \"hint\": PROPERTY_HINT_ENUM,\n \"hint_string\": \"one,two,three\"\n}\n\neditor_settings.add_property_info(property_info)\n```"] # [doc = ""] # [inline] pub fn add_property_info (& self , info : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . add_property_info ; let ret = crate :: icalls :: icallptr_void_dict (method_bind , self . this . sys () . as_ptr () , info) ; } } # [doc = "Erases the setting whose name is specified by `property`."] # [doc = ""] # [inline] pub fn erase (& self , property : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . erase ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; } } # [doc = "Returns the list of favorite files and directories for this project."] # [doc = ""] # [inline] pub fn get_favorites (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_favorites ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns project-specific metadata for the `section` and `key` specified. If the metadata doesn't exist, `default` will be returned instead. See also [method set_project_metadata].\n# Default Arguments\n* `default` - `null`"] # [doc = ""] # [inline] pub fn get_project_metadata (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , default : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_project_metadata ; let ret = crate :: icalls :: icallptr_var_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved."] # [doc = ""] # [inline] pub fn get_project_settings_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_project_settings_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the list of recently visited folders in the file dialog for this project."] # [doc = ""] # [inline] pub fn get_recent_dirs (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_recent_dirs ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the value of the setting specified by `name`. This is equivalent to using [method Object.get] on the EditorSettings instance."] # [doc = ""] # [inline] pub fn get_setting (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_setting ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:\n`settings/tmp` - Used for temporary storage of files\n`settings/templates` - Where export templates are located"] # [doc = ""] # [inline] pub fn get_settings_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_settings_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the setting specified by `name` exists, `false` otherwise."] # [doc = ""] # [inline] pub fn has_setting (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . has_setting ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if the setting specified by `name` can have its value reverted to the default value, `false` otherwise. When this method returns `true`, a Revert button will display next to the setting in the Editor Settings."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the default value of the setting specified by `name`. This is the value that would be applied when clicking the Revert button in the Editor Settings."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Sets the list of favorite files and directories for this project."] # [doc = ""] # [inline] pub fn set_favorites (& self , dirs : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_favorites ; let ret = crate :: icalls :: icallptr_void_strarr (method_bind , self . this . sys () . as_ptr () , dirs) ; } } # [doc = "Sets the initial value of the setting specified by `name` to `value`. This is used to provide a value for the Revert button in the Editor Settings. If `update_current` is true, the current value of the setting will be set to `value` as well."] # [doc = ""] # [inline] pub fn set_initial_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant , update_current : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_initial_value ; let ret = crate :: icalls :: icallptr_void_str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant () , update_current) ; } } # [doc = "Sets project-specific metadata with the `section`, `key` and `data` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]."] # [doc = ""] # [inline] pub fn set_project_metadata (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_project_metadata ; let ret = crate :: icalls :: icallptr_void_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , data . owned_to_variant ()) ; } } # [doc = "Sets the list of recently visited folders in the file dialog for this project."] # [doc = ""] # [inline] pub fn set_recent_dirs (& self , dirs : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_recent_dirs ; let ret = crate :: icalls :: icallptr_void_strarr (method_bind , self . this . sys () . as_ptr () , dirs) ; } } # [doc = "Sets the `value` of the setting specified by `name`. This is equivalent to using [method Object.set] on the EditorSettings instance."] # [doc = ""] # [inline] pub fn set_setting (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_setting ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSettings { } unsafe impl GodotObject for EditorSettings { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSettings" } } impl std :: ops :: Deref for EditorSettings { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for EditorSettings { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSettings { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorSettings { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSettingsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_property_info : * mut sys :: godot_method_bind , pub erase : * mut sys :: godot_method_bind , pub get_favorites : * mut sys :: godot_method_bind , pub get_project_metadata : * mut sys :: godot_method_bind , pub get_project_settings_dir : * mut sys :: godot_method_bind , pub get_recent_dirs : * mut sys :: godot_method_bind , pub get_setting : * mut sys :: godot_method_bind , pub get_settings_dir : * mut sys :: godot_method_bind , pub has_setting : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub set_favorites : * mut sys :: godot_method_bind , pub set_initial_value : * mut sys :: godot_method_bind , pub set_project_metadata : * mut sys :: godot_method_bind , pub set_recent_dirs : * mut sys :: godot_method_bind , pub set_setting : * mut sys :: godot_method_bind } impl EditorSettingsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSettingsMethodTable = EditorSettingsMethodTable { class_constructor : None , add_property_info : 0 as * mut sys :: godot_method_bind , erase : 0 as * mut sys :: godot_method_bind , get_favorites : 0 as * mut sys :: godot_method_bind , get_project_metadata : 0 as * mut sys :: godot_method_bind , get_project_settings_dir : 0 as * mut sys :: godot_method_bind , get_recent_dirs : 0 as * mut sys :: godot_method_bind , get_setting : 0 as * mut sys :: godot_method_bind , get_settings_dir : 0 as * mut sys :: godot_method_bind , has_setting : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , set_favorites : 0 as * mut sys :: godot_method_bind , set_initial_value : 0 as * mut sys :: godot_method_bind , set_project_metadata : 0 as * mut sys :: godot_method_bind , set_recent_dirs : 0 as * mut sys :: godot_method_bind , set_setting : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorSettingsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSettings\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_property_info = (gd_api . godot_method_bind_get_method) (class_name , "add_property_info\0" . as_ptr () as * const c_char) ; table . erase = (gd_api . godot_method_bind_get_method) (class_name , "erase\0" . as_ptr () as * const c_char) ; table . get_favorites = (gd_api . godot_method_bind_get_method) (class_name , "get_favorites\0" . as_ptr () as * const c_char) ; table . get_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_project_metadata\0" . as_ptr () as * const c_char) ; table . get_project_settings_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_project_settings_dir\0" . as_ptr () as * const c_char) ; table . get_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "get_recent_dirs\0" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\0" . as_ptr () as * const c_char) ; table . get_settings_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_settings_dir\0" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . set_favorites = (gd_api . godot_method_bind_get_method) (class_name , "set_favorites\0" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\0" . as_ptr () as * const c_char) ; table . set_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_project_metadata\0" . as_ptr () as * const c_char) ; table . set_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "set_recent_dirs\0" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:154:4590 [INFO] [stdout] | [INFO] [stdout] 154 | ...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] 154 | # [doc = "`core class CheckButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_checkbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CheckButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCheckButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CheckButton { this : RawObject < Self > , } impl CheckButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CheckButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for CheckButton { } unsafe impl GodotObject for CheckButton { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CheckButton" } } impl QueueFree for CheckButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CheckButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CheckButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for CheckButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for CheckButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for CheckButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CheckButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for CheckButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for CheckButton { } impl Instanciable for CheckButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CheckButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CheckButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl CheckButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CheckButtonMethodTable = CheckButtonMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CheckButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CheckButton\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:160:4483 [INFO] [stdout] | [INFO] [stdout] 160 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 160 | # [doc = "`core class RectangleShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_rectangleshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRectangleShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RectangleShape2D { this : RawObject < Self > , } impl RectangleShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RectangleShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rectangle's half extents. The width and height of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RectangleShape2DMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rectangle's half extents. The width and height of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RectangleShape2DMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RectangleShape2D { } unsafe impl GodotObject for RectangleShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RectangleShape2D" } } impl std :: ops :: Deref for RectangleShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RectangleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RectangleShape2D { } impl Instanciable for RectangleShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RectangleShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RectangleShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_extents : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind } impl RectangleShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RectangleShape2DMethodTable = RectangleShape2DMethodTable { class_constructor : None , get_extents : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RectangleShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RectangleShape2D\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:166:5952 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:172:3641 [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 AudioEffectEQ21` inherits `AudioEffectEQ` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffecteq21.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ21 inherits methods from:\n - [AudioEffectEQ](struct.AudioEffectEQ.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ21 { this : RawObject < Self > , } impl AudioEffectEQ21 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQ21MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ21 { } unsafe impl GodotObject for AudioEffectEQ21 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ21" } } impl std :: ops :: Deref for AudioEffectEQ21 { type Target = crate :: generated :: audio_effect_eq :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ21 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_eq :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_eq :: AudioEffectEQ > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectEQ21 { } impl Instanciable for AudioEffectEQ21 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectEQ21 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQ21MethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectEQ21MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQ21MethodTable = AudioEffectEQ21MethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectEQ21MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ21\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:178:3766 [INFO] [stdout] | [INFO] [stdout] 178 | ...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] 178 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:184:15446 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:190:7609 [INFO] [stdout] | [INFO] [stdout] 190 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 190 | # [doc = "`core class Physics2DTestMotionResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dtestmotionresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DTestMotionResult inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DTestMotionResult { this : RawObject < Self > , } impl Physics2DTestMotionResult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Physics2DTestMotionResultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_rid ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_point (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn motion (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_motion ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn motion_remainder (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_motion_remainder ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DTestMotionResult { } unsafe impl GodotObject for Physics2DTestMotionResult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DTestMotionResult" } } impl std :: ops :: Deref for Physics2DTestMotionResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DTestMotionResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DTestMotionResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DTestMotionResult { } impl Instanciable for Physics2DTestMotionResult { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Physics2DTestMotionResult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DTestMotionResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_rid : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_motion : * mut sys :: godot_method_bind , pub get_motion_remainder : * mut sys :: godot_method_bind } impl Physics2DTestMotionResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DTestMotionResultMethodTable = Physics2DTestMotionResultMethodTable { class_constructor : None , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_rid : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_motion : 0 as * mut sys :: godot_method_bind , get_motion_remainder : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Physics2DTestMotionResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DTestMotionResult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_collision_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_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\0" . as_ptr () as * const c_char) ; table . get_motion_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_remainder\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:196:5721 [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 InputEventJoypadMotion` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventjoypadmotion.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventJoypadMotion inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventJoypadMotion { this : RawObject < Self > , } impl InputEventJoypadMotion { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventJoypadMotionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Axis identifier. Use one of the [enum JoystickList] axis constants."] # [doc = ""] # [inline] pub fn axis (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Current position of the joystick on the given axis. The value ranges from `-1.0` to `1.0`. A value of `0` means the axis is in its resting position."] # [doc = ""] # [inline] pub fn axis_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . get_axis_value ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Axis identifier. Use one of the [enum JoystickList] axis constants."] # [doc = ""] # [inline] pub fn set_axis (& self , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . set_axis ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [doc = "Current position of the joystick on the given axis. The value ranges from `-1.0` to `1.0`. A value of `0` means the axis is in its resting position."] # [doc = ""] # [inline] pub fn set_axis_value (& self , axis_value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . set_axis_value ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , axis_value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventJoypadMotion { } unsafe impl GodotObject for InputEventJoypadMotion { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventJoypadMotion" } } impl std :: ops :: Deref for InputEventJoypadMotion { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventJoypadMotion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventJoypadMotion { } impl Instanciable for InputEventJoypadMotion { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventJoypadMotion :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventJoypadMotionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_axis : * mut sys :: godot_method_bind , pub get_axis_value : * mut sys :: godot_method_bind , pub set_axis : * mut sys :: godot_method_bind , pub set_axis_value : * mut sys :: godot_method_bind } impl InputEventJoypadMotionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventJoypadMotionMethodTable = InputEventJoypadMotionMethodTable { class_constructor : None , get_axis : 0 as * mut sys :: godot_method_bind , get_axis_value : 0 as * mut sys :: godot_method_bind , set_axis : 0 as * mut sys :: godot_method_bind , set_axis_value : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventJoypadMotionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventJoypadMotion\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\0" . as_ptr () as * const c_char) ; table . get_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_value\0" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\0" . as_ptr () as * const c_char) ; table . set_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_value\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:202:8780 [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 AudioEffectPhaser` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectphaser.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPhaser inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPhaser { this : RawObject < Self > , } impl AudioEffectPhaser { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPhaserMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4."] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Output percent of modified sound. Value can range from 0.1 to 0.9."] # [doc = ""] # [inline] pub fn feedback (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_feedback ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn range_max_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_range_max_hz ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn range_min_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_range_min_hz ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range."] # [doc = ""] # [inline] pub fn rate_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_rate_hz ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4."] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [doc = "Output percent of modified sound. Value can range from 0.1 to 0.9."] # [doc = ""] # [inline] pub fn set_feedback (& self , fbk : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_feedback ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , fbk) ; } } # [doc = "Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn set_range_max_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_range_max_hz ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } # [doc = "Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn set_range_min_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_range_min_hz ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } # [doc = "Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range."] # [doc = ""] # [inline] pub fn set_rate_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_rate_hz ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , hz) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPhaser { } unsafe impl GodotObject for AudioEffectPhaser { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPhaser" } } impl std :: ops :: Deref for AudioEffectPhaser { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPhaser { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPhaser { } impl Instanciable for AudioEffectPhaser { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectPhaser :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPhaserMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_feedback : * mut sys :: godot_method_bind , pub get_range_max_hz : * mut sys :: godot_method_bind , pub get_range_min_hz : * mut sys :: godot_method_bind , pub get_rate_hz : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_feedback : * mut sys :: godot_method_bind , pub set_range_max_hz : * mut sys :: godot_method_bind , pub set_range_min_hz : * mut sys :: godot_method_bind , pub set_rate_hz : * mut sys :: godot_method_bind } impl AudioEffectPhaserMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPhaserMethodTable = AudioEffectPhaserMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_feedback : 0 as * mut sys :: godot_method_bind , get_range_max_hz : 0 as * mut sys :: godot_method_bind , get_range_min_hz : 0 as * mut sys :: godot_method_bind , get_rate_hz : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_feedback : 0 as * mut sys :: godot_method_bind , set_range_max_hz : 0 as * mut sys :: godot_method_bind , set_range_min_hz : 0 as * mut sys :: godot_method_bind , set_rate_hz : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectPhaserMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPhaser\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_feedback = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback\0" . as_ptr () as * const c_char) ; table . get_range_max_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_range_max_hz\0" . as_ptr () as * const c_char) ; table . get_range_min_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_range_min_hz\0" . as_ptr () as * const c_char) ; table . get_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_rate_hz\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_feedback = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback\0" . as_ptr () as * const c_char) ; table . set_range_max_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_range_max_hz\0" . as_ptr () as * const c_char) ; table . set_range_min_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_range_min_hz\0" . as_ptr () as * const c_char) ; table . set_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_rate_hz\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:208:4670 [INFO] [stdout] | [INFO] [stdout] 208 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 208 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:214:8757 [INFO] [stdout] | [INFO] [stdout] 214 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 214 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:220:7448 [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 WebSocketPeer` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_websocketpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketPeer inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketPeer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct WriteMode (pub i64) ; impl WriteMode { pub const TEXT : WriteMode = WriteMode (0i64) ; pub const BINARY : WriteMode = WriteMode (1i64) ; } impl From < i64 > for WriteMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < WriteMode > for i64 { # [inline] fn from (v : WriteMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebSocketPeer { pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; } impl WebSocketPeer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketPeerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn close (& self , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , code , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_host (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_connected_host ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_connected_port ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_write_mode (& self) -> crate :: generated :: web_socket_peer :: WriteMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_write_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: web_socket_peer :: WriteMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_connected_to_host (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . is_connected_to_host ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_no_delay (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . set_no_delay ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_write_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . set_write_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn was_string_packet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . was_string_packet ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketPeer { } unsafe impl GodotObject for WebSocketPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketPeer" } } impl std :: ops :: Deref for WebSocketPeer { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketPeer { } impl Instanciable for WebSocketPeer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebSocketPeer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub get_connected_host : * mut sys :: godot_method_bind , pub get_connected_port : * mut sys :: godot_method_bind , pub get_write_mode : * mut sys :: godot_method_bind , pub is_connected_to_host : * mut sys :: godot_method_bind , pub set_no_delay : * mut sys :: godot_method_bind , pub set_write_mode : * mut sys :: godot_method_bind , pub was_string_packet : * mut sys :: godot_method_bind } impl WebSocketPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketPeerMethodTable = WebSocketPeerMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , get_connected_host : 0 as * mut sys :: godot_method_bind , get_connected_port : 0 as * mut sys :: godot_method_bind , get_write_mode : 0 as * mut sys :: godot_method_bind , is_connected_to_host : 0 as * mut sys :: godot_method_bind , set_no_delay : 0 as * mut sys :: godot_method_bind , set_write_mode : 0 as * mut sys :: godot_method_bind , was_string_packet : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WebSocketPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:226:6725 [INFO] [stdout] | [INFO] [stdout] 226 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 226 | # [doc = "`core singleton class Marshalls` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_marshalls.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nMarshalls inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Marshalls { this : RawObject < Self > , } impl Marshalls { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Marshalls\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string `base64_str`."] # [doc = ""] # [inline] pub fn base64_to_raw (& self , base64_str : impl Into < GodotString >) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_raw ; let ret = crate :: icalls :: icallptr_bytearr_str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns a decoded string corresponding to the Base64-encoded string `base64_str`."] # [doc = ""] # [inline] pub fn base64_to_utf8 (& self , base64_str : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_utf8 ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns a decoded [Variant] corresponding to the Base64-encoded string `base64_str`. If `allow_objects` is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn base64_to_variant (& self , base64_str : impl Into < GodotString > , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_variant ; let ret = crate :: icalls :: icallptr_var_str_bool (method_bind , self . this . sys () . as_ptr () , base64_str . into () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "Returns a Base64-encoded string of a given [PoolByteArray]."] # [doc = ""] # [inline] pub fn raw_to_base64 (& self , array : ByteArray) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . raw_to_base64 ; let ret = crate :: icalls :: icallptr_str_bytearr (method_bind , self . this . sys () . as_ptr () , array) ; GodotString :: from_sys (ret) } } # [doc = "Returns a Base64-encoded string of the UTF-8 string `utf8_str`."] # [doc = ""] # [inline] pub fn utf8_to_base64 (& self , utf8_str : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . utf8_to_base64 ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , utf8_str . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns a Base64-encoded string of the [Variant] `variant`. If `full_objects` is `true`, encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn variant_to_base64 (& self , variant : impl OwnedToVariant , full_objects : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . variant_to_base64 ; let ret = crate :: icalls :: icallptr_str_var_bool (method_bind , self . this . sys () . as_ptr () , variant . owned_to_variant () , full_objects) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Marshalls { } unsafe impl GodotObject for Marshalls { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Marshalls" } } impl std :: ops :: Deref for Marshalls { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Marshalls { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Marshalls { } unsafe impl Send for Marshalls { } unsafe impl Sync for Marshalls { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MarshallsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub base64_to_raw : * mut sys :: godot_method_bind , pub base64_to_utf8 : * mut sys :: godot_method_bind , pub base64_to_variant : * mut sys :: godot_method_bind , pub raw_to_base64 : * mut sys :: godot_method_bind , pub utf8_to_base64 : * mut sys :: godot_method_bind , pub variant_to_base64 : * mut sys :: godot_method_bind } impl MarshallsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MarshallsMethodTable = MarshallsMethodTable { class_constructor : None , base64_to_raw : 0 as * mut sys :: godot_method_bind , base64_to_utf8 : 0 as * mut sys :: godot_method_bind , base64_to_variant : 0 as * mut sys :: godot_method_bind , raw_to_base64 : 0 as * mut sys :: godot_method_bind , utf8_to_base64 : 0 as * mut sys :: godot_method_bind , variant_to_base64 : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MarshallsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Marshalls\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . base64_to_raw = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_raw\0" . as_ptr () as * const c_char) ; table . base64_to_utf8 = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_utf8\0" . as_ptr () as * const c_char) ; table . base64_to_variant = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_variant\0" . as_ptr () as * const c_char) ; table . raw_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "raw_to_base64\0" . as_ptr () as * const c_char) ; table . utf8_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "utf8_to_base64\0" . as_ptr () as * const c_char) ; table . variant_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "variant_to_base64\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:232:45605 [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 Animation` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimation inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Animation { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InterpolationType (pub i64) ; impl InterpolationType { pub const NEAREST : InterpolationType = InterpolationType (0i64) ; pub const LINEAR : InterpolationType = InterpolationType (1i64) ; pub const CUBIC : InterpolationType = InterpolationType (2i64) ; } impl From < i64 > for InterpolationType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InterpolationType > for i64 { # [inline] fn from (v : InterpolationType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackType (pub i64) ; impl TrackType { pub const VALUE : TrackType = TrackType (0i64) ; pub const TRANSFORM : TrackType = TrackType (1i64) ; pub const METHOD : TrackType = TrackType (2i64) ; pub const BEZIER : TrackType = TrackType (3i64) ; pub const AUDIO : TrackType = TrackType (4i64) ; pub const ANIMATION : TrackType = TrackType (5i64) ; } impl From < i64 > for TrackType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackType > for i64 { # [inline] fn from (v : TrackType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpdateMode (pub i64) ; impl UpdateMode { pub const CONTINUOUS : UpdateMode = UpdateMode (0i64) ; pub const DISCRETE : UpdateMode = UpdateMode (1i64) ; pub const TRIGGER : UpdateMode = UpdateMode (2i64) ; pub const CAPTURE : UpdateMode = UpdateMode (3i64) ; } impl From < i64 > for UpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpdateMode > for i64 { # [inline] fn from (v : UpdateMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Animation { pub const INTERPOLATION_CUBIC : i64 = 2i64 ; pub const INTERPOLATION_LINEAR : i64 = 1i64 ; pub const INTERPOLATION_NEAREST : i64 = 0i64 ; pub const TYPE_ANIMATION : i64 = 5i64 ; pub const TYPE_AUDIO : i64 = 4i64 ; pub const TYPE_BEZIER : i64 = 3i64 ; pub const TYPE_METHOD : i64 = 2i64 ; pub const TYPE_TRANSFORM : i64 = 1i64 ; pub const TYPE_VALUE : i64 = 0i64 ; pub const UPDATE_CAPTURE : i64 = 3i64 ; pub const UPDATE_CONTINUOUS : i64 = 0i64 ; pub const UPDATE_DISCRETE : i64 = 1i64 ; pub const UPDATE_TRIGGER : i64 = 2i64 ; } impl Animation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a track to the Animation.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_track (& self , _type : i64 , at_position : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . add_track ; let ret = crate :: icalls :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , _type , at_position) ; ret as _ } } # [doc = "Returns the animation name at the key identified by `key_idx`. The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_get_key_animation (& self , track_idx : i64 , key_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_get_key_animation ; let ret = crate :: icalls :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; GodotString :: from_sys (ret) } } # [doc = "Inserts a key with value `animation` at the given `time` (in seconds). The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_insert_key (& self , track_idx : i64 , time : f64 , animation : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_insert_key ; let ret = crate :: icalls :: icallptr_i64_i64_f64_str (method_bind , self . this . sys () . as_ptr () , track_idx , time , animation . into ()) ; ret as _ } } # [doc = "Sets the key identified by `key_idx` to value `animation`. The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_set_key_animation (& self , track_idx : i64 , key_idx : i64 , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_set_key_animation ; let ret = crate :: icalls :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , animation . into ()) ; } } # [doc = "Returns the end offset of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track.\nEnd offset is the number of seconds cut off at the ending of the audio stream."] # [doc = ""] # [inline] pub fn audio_track_get_key_end_offset (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_end_offset ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [doc = "Returns the start offset of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track.\nStart offset is the number of seconds cut off at the beginning of the audio stream."] # [doc = ""] # [inline] pub fn audio_track_get_key_start_offset (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_start_offset ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [doc = "Returns the audio stream of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_get_key_stream (& self , track_idx : i64 , key_idx : i64) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_stream ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Inserts an Audio Track key at the given `time` in seconds. The `track_idx` must be the index of an Audio Track.\n`stream` is the [AudioStream] resource to play. `start_offset` is the number of seconds cut off at the beginning of the audio stream, while `end_offset` is at the ending.\n# Default Arguments\n* `start_offset` - `0`\n* `end_offset` - `0`"] # [doc = ""] # [inline] pub fn audio_track_insert_key (& self , track_idx : i64 , time : f64 , stream : impl AsArg < crate :: generated :: resource :: Resource > , start_offset : f64 , end_offset : f64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_insert_key ; let ret = crate :: icalls :: icallptr_i64_i64_f64_obj_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time , stream . as_arg_ptr () , start_offset , end_offset) ; ret as _ } } # [doc = "Sets the end offset of the key identified by `key_idx` to value `offset`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_end_offset (& self , track_idx : i64 , key_idx : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_end_offset ; let ret = crate :: icalls :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , offset) ; } } # [doc = "Sets the start offset of the key identified by `key_idx` to value `offset`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_start_offset (& self , track_idx : i64 , key_idx : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_start_offset ; let ret = crate :: icalls :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , offset) ; } } # [doc = "Sets the stream of the key identified by `key_idx` to value `offset`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_stream (& self , track_idx : i64 , key_idx : i64 , stream : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_stream ; let ret = crate :: icalls :: icallptr_void_i64_i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , stream . as_arg_ptr ()) ; } } # [doc = "Returns the in handle of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_in_handle (& self , track_idx : i64 , key_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_in_handle ; let ret = crate :: icalls :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; mem :: transmute (ret) } } # [doc = "Returns the out handle of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_out_handle (& self , track_idx : i64 , key_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_out_handle ; let ret = crate :: icalls :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; mem :: transmute (ret) } } # [doc = "Returns the value of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_value (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_value ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [doc = "Inserts a Bezier Track key at the given `time` in seconds. The `track_idx` must be the index of a Bezier Track.\n`in_handle` is the left-side weight of the added Bezier curve point, `out_handle` is the right-side one, while `value` is the actual value at this point.\n# Default Arguments\n* `in_handle` - `Vector2( 0, 0 )`\n* `out_handle` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn bezier_track_insert_key (& self , track_idx : i64 , time : f64 , value : f64 , in_handle : Vector2 , out_handle : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_insert_key ; let ret = crate :: icalls :: icallptr_i64_i64_f64_f64_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , time , value , in_handle , out_handle) ; ret as _ } } # [doc = "Returns the interpolated value at the given `time` (in seconds). The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_interpolate (& self , track_idx : i64 , time : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_interpolate ; let ret = crate :: icalls :: icallptr_f64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time) ; ret as _ } } # [doc = "Sets the in handle of the key identified by `key_idx` to value `in_handle`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_in_handle (& self , track_idx : i64 , key_idx : i64 , in_handle : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_in_handle ; let ret = crate :: icalls :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , in_handle) ; } } # [doc = "Sets the out handle of the key identified by `key_idx` to value `out_handle`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_out_handle (& self , track_idx : i64 , key_idx : i64 , out_handle : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_out_handle ; let ret = crate :: icalls :: icallptr_void_i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , out_handle) ; } } # [doc = "Sets the value of the key identified by `key_idx` to the given value. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_value (& self , track_idx : i64 , key_idx : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_value ; let ret = crate :: icalls :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , value) ; } } # [doc = "Clear the animation (clear all tracks and reset all)."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a new track that is a copy of the given track from `to_animation`."] # [doc = ""] # [inline] pub fn copy_track (& self , track_idx : i64 , to_animation : impl AsArg < crate :: generated :: animation :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . copy_track ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx , to_animation . as_arg_ptr ()) ; } } # [doc = "Returns the index of the specified track. If the track is not found, return -1."] # [doc = ""] # [inline] pub fn find_track (& self , path : impl Into < NodePath >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . find_track ; let ret = crate :: icalls :: icallptr_i64_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "The total length of the animation (in seconds).\n**Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The animation step value."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of tracks in the animation."] # [doc = ""] # [inline] pub fn get_track_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_track_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation."] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns all the key indices of a method track, given a position and delta time."] # [doc = ""] # [inline] pub fn method_track_get_key_indices (& self , track_idx : i64 , time_sec : f64 , delta : f64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_key_indices ; let ret = crate :: icalls :: icallptr_i32arr_i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec , delta) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the method name of a method track."] # [doc = ""] # [inline] pub fn method_track_get_name (& self , track_idx : i64 , key_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_name ; let ret = crate :: icalls :: icallptr_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the arguments values to be called on a method track for a given key in a given track."] # [doc = ""] # [inline] pub fn method_track_get_params (& self , track_idx : i64 , key_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_params ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a track by specifying the track index."] # [doc = ""] # [inline] pub fn remove_track (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . remove_track ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [doc = "The total length of the animation (in seconds).\n**Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping."] # [doc = ""] # [inline] pub fn set_length (& self , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_sec) ; } } # [doc = "A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation."] # [doc = ""] # [inline] pub fn set_loop (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The animation step value."] # [doc = ""] # [inline] pub fn set_step (& self , size_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_step ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size_sec) ; } } # [doc = "Finds the key index by time in a given track. Optionally, only find it if the exact time is given.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn track_find_key (& self , track_idx : i64 , time : f64 , exact : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_find_key ; let ret = crate :: icalls :: icallptr_i64_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , time , exact) ; ret as _ } } # [doc = "Returns `true` if the track at `idx` wraps the interpolation loop. New tracks wrap the interpolation loop by default."] # [doc = ""] # [inline] pub fn track_get_interpolation_loop_wrap (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_interpolation_loop_wrap ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [doc = "Returns the interpolation type of a given track."] # [doc = ""] # [inline] pub fn track_get_interpolation_type (& self , track_idx : i64) -> crate :: generated :: animation :: InterpolationType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_interpolation_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: InterpolationType (ret) } } # [doc = "Returns the amount of keys in a given track."] # [doc = ""] # [inline] pub fn track_get_key_count (& self , track_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_count ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [doc = "Returns the time at which the key is located."] # [doc = ""] # [inline] pub fn track_get_key_time (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_time ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [doc = "Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease])."] # [doc = ""] # [inline] pub fn track_get_key_transition (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_transition ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; ret as _ } } # [doc = "Returns the value of a given key in a given track."] # [doc = ""] # [inline] pub fn track_get_key_value (& self , track_idx : i64 , key_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_value ; let ret = crate :: icalls :: icallptr_var_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; Variant :: from_sys (ret) } } # [doc = "Gets the path of a track. For more information on the path format, see [method track_set_path]."] # [doc = ""] # [inline] pub fn track_get_path (& self , track_idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; NodePath :: from_sys (ret) } } # [doc = "Gets the type of a track."] # [doc = ""] # [inline] pub fn track_get_type (& self , track_idx : i64) -> crate :: generated :: animation :: TrackType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: TrackType (ret) } } # [doc = "Insert a generic key in a given track.\n# Default Arguments\n* `transition` - `1`"] # [doc = ""] # [inline] pub fn track_insert_key (& self , track_idx : i64 , time : f64 , key : impl OwnedToVariant , transition : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_insert_key ; let ret = crate :: icalls :: icallptr_void_i64_f64_var_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time , key . owned_to_variant () , transition) ; } } # [doc = "Returns `true` if the track at index `idx` is enabled."] # [doc = ""] # [inline] pub fn track_is_enabled (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_is_enabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [doc = "Returns `true` if the given track is imported. Else, return `false`."] # [doc = ""] # [inline] pub fn track_is_imported (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_is_imported ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; ret as _ } } # [doc = "Moves a track down."] # [doc = ""] # [inline] pub fn track_move_down (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_down ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [doc = "Changes the index position of track `idx` to the one defined in `to_idx`."] # [doc = ""] # [inline] pub fn track_move_to (& self , track_idx : i64 , to_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_to ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , to_idx) ; } } # [doc = "Moves a track up."] # [doc = ""] # [inline] pub fn track_move_up (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_up ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; } } # [doc = "Removes a key by index in a given track."] # [doc = ""] # [inline] pub fn track_remove_key (& self , track_idx : i64 , key_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_remove_key ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx) ; } } # [doc = "Removes a key by position (seconds) in a given track."] # [doc = ""] # [inline] pub fn track_remove_key_at_position (& self , track_idx : i64 , position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_remove_key_at_position ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , position) ; } } # [doc = "Enables/disables the given track. Tracks are enabled by default."] # [doc = ""] # [inline] pub fn track_set_enabled (& self , track_idx : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_enabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , enabled) ; } } # [doc = "Sets the given track as imported or not."] # [doc = ""] # [inline] pub fn track_set_imported (& self , track_idx : i64 , imported : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_imported ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , imported) ; } } # [doc = "If `true`, the track at `idx` wraps the interpolation loop."] # [doc = ""] # [inline] pub fn track_set_interpolation_loop_wrap (& self , track_idx : i64 , interpolation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_interpolation_loop_wrap ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx , interpolation) ; } } # [doc = "Sets the interpolation type of a given track."] # [doc = ""] # [inline] pub fn track_set_interpolation_type (& self , track_idx : i64 , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_interpolation_type ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , interpolation) ; } } # [doc = "Sets the time of an existing key."] # [doc = ""] # [inline] pub fn track_set_key_time (& self , track_idx : i64 , key_idx : i64 , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_time ; let ret = crate :: icalls :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , time) ; } } # [doc = "Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease])."] # [doc = ""] # [inline] pub fn track_set_key_transition (& self , track_idx : i64 , key_idx : i64 , transition : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_transition ; let ret = crate :: icalls :: icallptr_void_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , key_idx , transition) ; } } # [doc = "Sets the value of an existing key."] # [doc = ""] # [inline] pub fn track_set_key_value (& self , track_idx : i64 , key : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_value ; let ret = crate :: icalls :: icallptr_void_i64_i64_var (method_bind , self . this . sys () . as_ptr () , track_idx , key , value . owned_to_variant ()) ; } } # [doc = "Sets the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by `\":\"`.\nFor example, `\"character/skeleton:ankle\"` or `\"character/mesh:transform/local\"`."] # [doc = ""] # [inline] pub fn track_set_path (& self , track_idx : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_path ; let ret = crate :: icalls :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , track_idx , path . into ()) ; } } # [doc = "Swaps the track `idx`'s index position with the track `with_idx`."] # [doc = ""] # [inline] pub fn track_swap (& self , track_idx : i64 , with_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_swap ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , with_idx) ; } } # [doc = "Insert a transform key for a transform track."] # [doc = ""] # [inline] pub fn transform_track_insert_key (& self , track_idx : i64 , time : f64 , location : Vector3 , rotation : Quat , scale : Vector3) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . transform_track_insert_key ; let ret = crate :: icalls :: icallptr_i64_i64_f64_vec3_quat_vec3 (method_bind , self . this . sys () . as_ptr () , track_idx , time , location , rotation , scale) ; ret as _ } } # [doc = "Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3])."] # [doc = ""] # [inline] pub fn transform_track_interpolate (& self , track_idx : i64 , time_sec : f64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . transform_track_interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the key indices of a value track, given a position and delta time."] # [doc = ""] # [inline] pub fn value_track_get_key_indices (& self , track_idx : i64 , time_sec : f64 , delta : f64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_get_key_indices ; let ret = crate :: icalls :: icallptr_i32arr_i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec , delta) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the update mode of a value track."] # [doc = ""] # [inline] pub fn value_track_get_update_mode (& self , track_idx : i64) -> crate :: generated :: animation :: UpdateMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_get_update_mode ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx) ; crate :: generated :: animation :: UpdateMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn value_track_interpolate (& self , track_idx : i64 , time_sec : f64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_interpolate ; let ret = crate :: icalls :: icallptr_var_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx , time_sec) ; Variant :: from_sys (ret) } } # [doc = "Sets the update mode (see [enum UpdateMode]) of a value track."] # [doc = ""] # [inline] pub fn value_track_set_update_mode (& self , track_idx : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_set_update_mode ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Animation { } unsafe impl GodotObject for Animation { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Animation" } } impl std :: ops :: Deref for Animation { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Animation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Animation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Animation { } unsafe impl SubClass < crate :: generated :: object :: Object > for Animation { } impl Instanciable for Animation { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Animation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_track : * mut sys :: godot_method_bind , pub animation_track_get_key_animation : * mut sys :: godot_method_bind , pub animation_track_insert_key : * mut sys :: godot_method_bind , pub animation_track_set_key_animation : * mut sys :: godot_method_bind , pub audio_track_get_key_end_offset : * mut sys :: godot_method_bind , pub audio_track_get_key_start_offset : * mut sys :: godot_method_bind , pub audio_track_get_key_stream : * mut sys :: godot_method_bind , pub audio_track_insert_key : * mut sys :: godot_method_bind , pub audio_track_set_key_end_offset : * mut sys :: godot_method_bind , pub audio_track_set_key_start_offset : * mut sys :: godot_method_bind , pub audio_track_set_key_stream : * mut sys :: godot_method_bind , pub bezier_track_get_key_in_handle : * mut sys :: godot_method_bind , pub bezier_track_get_key_out_handle : * mut sys :: godot_method_bind , pub bezier_track_get_key_value : * mut sys :: godot_method_bind , pub bezier_track_insert_key : * mut sys :: godot_method_bind , pub bezier_track_interpolate : * mut sys :: godot_method_bind , pub bezier_track_set_key_in_handle : * mut sys :: godot_method_bind , pub bezier_track_set_key_out_handle : * mut sys :: godot_method_bind , pub bezier_track_set_key_value : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub copy_track : * mut sys :: godot_method_bind , pub find_track : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub get_track_count : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub method_track_get_key_indices : * mut sys :: godot_method_bind , pub method_track_get_name : * mut sys :: godot_method_bind , pub method_track_get_params : * mut sys :: godot_method_bind , pub remove_track : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_step : * mut sys :: godot_method_bind , pub track_find_key : * mut sys :: godot_method_bind , pub track_get_interpolation_loop_wrap : * mut sys :: godot_method_bind , pub track_get_interpolation_type : * mut sys :: godot_method_bind , pub track_get_key_count : * mut sys :: godot_method_bind , pub track_get_key_time : * mut sys :: godot_method_bind , pub track_get_key_transition : * mut sys :: godot_method_bind , pub track_get_key_value : * mut sys :: godot_method_bind , pub track_get_path : * mut sys :: godot_method_bind , pub track_get_type : * mut sys :: godot_method_bind , pub track_insert_key : * mut sys :: godot_method_bind , pub track_is_enabled : * mut sys :: godot_method_bind , pub track_is_imported : * mut sys :: godot_method_bind , pub track_move_down : * mut sys :: godot_method_bind , pub track_move_to : * mut sys :: godot_method_bind , pub track_move_up : * mut sys :: godot_method_bind , pub track_remove_key : * mut sys :: godot_method_bind , pub track_remove_key_at_position : * mut sys :: godot_method_bind , pub track_set_enabled : * mut sys :: godot_method_bind , pub track_set_imported : * mut sys :: godot_method_bind , pub track_set_interpolation_loop_wrap : * mut sys :: godot_method_bind , pub track_set_interpolation_type : * mut sys :: godot_method_bind , pub track_set_key_time : * mut sys :: godot_method_bind , pub track_set_key_transition : * mut sys :: godot_method_bind , pub track_set_key_value : * mut sys :: godot_method_bind , pub track_set_path : * mut sys :: godot_method_bind , pub track_swap : * mut sys :: godot_method_bind , pub transform_track_insert_key : * mut sys :: godot_method_bind , pub transform_track_interpolate : * mut sys :: godot_method_bind , pub value_track_get_key_indices : * mut sys :: godot_method_bind , pub value_track_get_update_mode : * mut sys :: godot_method_bind , pub value_track_interpolate : * mut sys :: godot_method_bind , pub value_track_set_update_mode : * mut sys :: godot_method_bind } impl AnimationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationMethodTable = AnimationMethodTable { class_constructor : None , add_track : 0 as * mut sys :: godot_method_bind , animation_track_get_key_animation : 0 as * mut sys :: godot_method_bind , animation_track_insert_key : 0 as * mut sys :: godot_method_bind , animation_track_set_key_animation : 0 as * mut sys :: godot_method_bind , audio_track_get_key_end_offset : 0 as * mut sys :: godot_method_bind , audio_track_get_key_start_offset : 0 as * mut sys :: godot_method_bind , audio_track_get_key_stream : 0 as * mut sys :: godot_method_bind , audio_track_insert_key : 0 as * mut sys :: godot_method_bind , audio_track_set_key_end_offset : 0 as * mut sys :: godot_method_bind , audio_track_set_key_start_offset : 0 as * mut sys :: godot_method_bind , audio_track_set_key_stream : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_in_handle : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_out_handle : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_value : 0 as * mut sys :: godot_method_bind , bezier_track_insert_key : 0 as * mut sys :: godot_method_bind , bezier_track_interpolate : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_in_handle : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_out_handle : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_value : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , copy_track : 0 as * mut sys :: godot_method_bind , find_track : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , get_track_count : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , method_track_get_key_indices : 0 as * mut sys :: godot_method_bind , method_track_get_name : 0 as * mut sys :: godot_method_bind , method_track_get_params : 0 as * mut sys :: godot_method_bind , remove_track : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_step : 0 as * mut sys :: godot_method_bind , track_find_key : 0 as * mut sys :: godot_method_bind , track_get_interpolation_loop_wrap : 0 as * mut sys :: godot_method_bind , track_get_interpolation_type : 0 as * mut sys :: godot_method_bind , track_get_key_count : 0 as * mut sys :: godot_method_bind , track_get_key_time : 0 as * mut sys :: godot_method_bind , track_get_key_transition : 0 as * mut sys :: godot_method_bind , track_get_key_value : 0 as * mut sys :: godot_method_bind , track_get_path : 0 as * mut sys :: godot_method_bind , track_get_type : 0 as * mut sys :: godot_method_bind , track_insert_key : 0 as * mut sys :: godot_method_bind , track_is_enabled : 0 as * mut sys :: godot_method_bind , track_is_imported : 0 as * mut sys :: godot_method_bind , track_move_down : 0 as * mut sys :: godot_method_bind , track_move_to : 0 as * mut sys :: godot_method_bind , track_move_up : 0 as * mut sys :: godot_method_bind , track_remove_key : 0 as * mut sys :: godot_method_bind , track_remove_key_at_position : 0 as * mut sys :: godot_method_bind , track_set_enabled : 0 as * mut sys :: godot_method_bind , track_set_imported : 0 as * mut sys :: godot_method_bind , track_set_interpolation_loop_wrap : 0 as * mut sys :: godot_method_bind , track_set_interpolation_type : 0 as * mut sys :: godot_method_bind , track_set_key_time : 0 as * mut sys :: godot_method_bind , track_set_key_transition : 0 as * mut sys :: godot_method_bind , track_set_key_value : 0 as * mut sys :: godot_method_bind , track_set_path : 0 as * mut sys :: godot_method_bind , track_swap : 0 as * mut sys :: godot_method_bind , transform_track_insert_key : 0 as * mut sys :: godot_method_bind , transform_track_interpolate : 0 as * mut sys :: godot_method_bind , value_track_get_key_indices : 0 as * mut sys :: godot_method_bind , value_track_get_update_mode : 0 as * mut sys :: godot_method_bind , value_track_interpolate : 0 as * mut sys :: godot_method_bind , value_track_set_update_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Animation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_track = (gd_api . godot_method_bind_get_method) (class_name , "add_track\0" . as_ptr () as * const c_char) ; table . animation_track_get_key_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_get_key_animation\0" . as_ptr () as * const c_char) ; table . animation_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_insert_key\0" . as_ptr () as * const c_char) ; table . animation_track_set_key_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_set_key_animation\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_end_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_end_offset\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_start_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_start_offset\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_stream = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_stream\0" . as_ptr () as * const c_char) ; table . audio_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_insert_key\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_end_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_end_offset\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_start_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_start_offset\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_stream = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_stream\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_in_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_in_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_out_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_out_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_value = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_value\0" . as_ptr () as * const c_char) ; table . bezier_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_insert_key\0" . as_ptr () as * const c_char) ; table . bezier_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_interpolate\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_in_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_in_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_out_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_out_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_value = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_value\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . copy_track = (gd_api . godot_method_bind_get_method) (class_name , "copy_track\0" . as_ptr () as * const c_char) ; table . find_track = (gd_api . godot_method_bind_get_method) (class_name , "find_track\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_track_count = (gd_api . godot_method_bind_get_method) (class_name , "get_track_count\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . method_track_get_key_indices = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_key_indices\0" . as_ptr () as * const c_char) ; table . method_track_get_name = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_name\0" . as_ptr () as * const c_char) ; table . method_track_get_params = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_params\0" . as_ptr () as * const c_char) ; table . remove_track = (gd_api . godot_method_bind_get_method) (class_name , "remove_track\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\0" . as_ptr () as * const c_char) ; table . track_find_key = (gd_api . godot_method_bind_get_method) (class_name , "track_find_key\0" . as_ptr () as * const c_char) ; table . track_get_interpolation_loop_wrap = (gd_api . godot_method_bind_get_method) (class_name , "track_get_interpolation_loop_wrap\0" . as_ptr () as * const c_char) ; table . track_get_interpolation_type = (gd_api . godot_method_bind_get_method) (class_name , "track_get_interpolation_type\0" . as_ptr () as * const c_char) ; table . track_get_key_count = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_count\0" . as_ptr () as * const c_char) ; table . track_get_key_time = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_time\0" . as_ptr () as * const c_char) ; table . track_get_key_transition = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_transition\0" . as_ptr () as * const c_char) ; table . track_get_key_value = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_value\0" . as_ptr () as * const c_char) ; table . track_get_path = (gd_api . godot_method_bind_get_method) (class_name , "track_get_path\0" . as_ptr () as * const c_char) ; table . track_get_type = (gd_api . godot_method_bind_get_method) (class_name , "track_get_type\0" . as_ptr () as * const c_char) ; table . track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "track_insert_key\0" . as_ptr () as * const c_char) ; table . track_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_is_enabled\0" . as_ptr () as * const c_char) ; table . track_is_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_is_imported\0" . as_ptr () as * const c_char) ; table . track_move_down = (gd_api . godot_method_bind_get_method) (class_name , "track_move_down\0" . as_ptr () as * const c_char) ; table . track_move_to = (gd_api . godot_method_bind_get_method) (class_name , "track_move_to\0" . as_ptr () as * const c_char) ; table . track_move_up = (gd_api . godot_method_bind_get_method) (class_name , "track_move_up\0" . as_ptr () as * const c_char) ; table . track_remove_key = (gd_api . godot_method_bind_get_method) (class_name , "track_remove_key\0" . as_ptr () as * const c_char) ; table . track_remove_key_at_position = (gd_api . godot_method_bind_get_method) (class_name , "track_remove_key_at_position\0" . as_ptr () as * const c_char) ; table . track_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_set_enabled\0" . as_ptr () as * const c_char) ; table . track_set_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_set_imported\0" . as_ptr () as * const c_char) ; table . track_set_interpolation_loop_wrap = (gd_api . godot_method_bind_get_method) (class_name , "track_set_interpolation_loop_wrap\0" . as_ptr () as * const c_char) ; table . track_set_interpolation_type = (gd_api . godot_method_bind_get_method) (class_name , "track_set_interpolation_type\0" . as_ptr () as * const c_char) ; table . track_set_key_time = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_time\0" . as_ptr () as * const c_char) ; table . track_set_key_transition = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_transition\0" . as_ptr () as * const c_char) ; table . track_set_key_value = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_value\0" . as_ptr () as * const c_char) ; table . track_set_path = (gd_api . godot_method_bind_get_method) (class_name , "track_set_path\0" . as_ptr () as * const c_char) ; table . track_swap = (gd_api . godot_method_bind_get_method) (class_name , "track_swap\0" . as_ptr () as * const c_char) ; table . transform_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "transform_track_insert_key\0" . as_ptr () as * const c_char) ; table . transform_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "transform_track_interpolate\0" . as_ptr () as * const c_char) ; table . value_track_get_key_indices = (gd_api . godot_method_bind_get_method) (class_name , "value_track_get_key_indices\0" . as_ptr () as * const c_char) ; table . value_track_get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "value_track_get_update_mode\0" . as_ptr () as * const c_char) ; table . value_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "value_track_interpolate\0" . as_ptr () as * const c_char) ; table . value_track_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "value_track_set_update_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:238:7802 [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 = "`tools class EditorFileSystem` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorfilesystem.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileSystem inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileSystem { this : RawObject < Self > , } impl EditorFileSystem { # [doc = "Gets the type of the file, given the full path."] # [doc = ""] # [inline] pub fn get_file_type (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_file_type ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the root directory object."] # [doc = ""] # [inline] pub fn get_filesystem (& self) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a view into the filesystem at `path`."] # [doc = ""] # [inline] pub fn get_filesystem_path (& self , path : impl Into < GodotString >) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem_path ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the scan progress for 0 to 1 if the FS is being scanned."] # [doc = ""] # [inline] pub fn get_scanning_progress (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_scanning_progress ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` of the filesystem is being scanned."] # [doc = ""] # [inline] pub fn is_scanning (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . is_scanning ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Scan the filesystem for changes."] # [doc = ""] # [inline] pub fn scan (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . scan ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Check if the source of any imported resource changed."] # [doc = ""] # [inline] pub fn scan_sources (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . scan_sources ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Update a file information. Call this if an external program (not Godot) modified the file."] # [doc = ""] # [inline] pub fn update_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . update_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Scans the script files and updates the list of custom class names."] # [doc = ""] # [inline] pub fn update_script_classes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . update_script_classes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystem { } unsafe impl GodotObject for EditorFileSystem { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileSystem" } } impl QueueFree for EditorFileSystem { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorFileSystem { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorFileSystem { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorFileSystem { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileSystemMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file_type : * mut sys :: godot_method_bind , pub get_filesystem : * mut sys :: godot_method_bind , pub get_filesystem_path : * mut sys :: godot_method_bind , pub get_scanning_progress : * mut sys :: godot_method_bind , pub is_scanning : * mut sys :: godot_method_bind , pub scan : * mut sys :: godot_method_bind , pub scan_sources : * mut sys :: godot_method_bind , pub update_file : * mut sys :: godot_method_bind , pub update_script_classes : * mut sys :: godot_method_bind } impl EditorFileSystemMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileSystemMethodTable = EditorFileSystemMethodTable { class_constructor : None , get_file_type : 0 as * mut sys :: godot_method_bind , get_filesystem : 0 as * mut sys :: godot_method_bind , get_filesystem_path : 0 as * mut sys :: godot_method_bind , get_scanning_progress : 0 as * mut sys :: godot_method_bind , is_scanning : 0 as * mut sys :: godot_method_bind , scan : 0 as * mut sys :: godot_method_bind , scan_sources : 0 as * mut sys :: godot_method_bind , update_file : 0 as * mut sys :: godot_method_bind , update_script_classes : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorFileSystemMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileSystem\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file_type = (gd_api . godot_method_bind_get_method) (class_name , "get_file_type\0" . as_ptr () as * const c_char) ; table . get_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem\0" . as_ptr () as * const c_char) ; table . get_filesystem_path = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem_path\0" . as_ptr () as * const c_char) ; table . get_scanning_progress = (gd_api . godot_method_bind_get_method) (class_name , "get_scanning_progress\0" . as_ptr () as * const c_char) ; table . is_scanning = (gd_api . godot_method_bind_get_method) (class_name , "is_scanning\0" . as_ptr () as * const c_char) ; table . scan = (gd_api . godot_method_bind_get_method) (class_name , "scan\0" . as_ptr () as * const c_char) ; table . scan_sources = (gd_api . godot_method_bind_get_method) (class_name , "scan_sources\0" . as_ptr () as * const c_char) ; table . update_file = (gd_api . godot_method_bind_get_method) (class_name , "update_file\0" . as_ptr () as * const c_char) ; table . update_script_classes = (gd_api . godot_method_bind_get_method) (class_name , "update_script_classes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:250:16661 [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 AudioStreamPlayer2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamplayer2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AudioStreamPlayer2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayer2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayer2D { this : RawObject < Self > , } impl AudioStreamPlayer2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamPlayer2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Areas in which this sound plays."] # [doc = ""] # [inline] pub fn area_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_area_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Dampens audio over distance with this as an exponent."] # [doc = ""] # [inline] pub fn attenuation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_attenuation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Bus on which this audio is playing."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Maximum distance from which audio is still hearable."] # [doc = ""] # [inline] pub fn max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_max_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position in the [AudioStream]."] # [doc = ""] # [inline] pub fn get_playback_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_playback_position ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn stream_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Base volume without dampening."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn is_autoplay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, audio is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Plays the audio from the given position `from_position`, in seconds.\n# Default Arguments\n* `from_position` - `0.0`"] # [doc = ""] # [inline] pub fn play (& self , from_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , from_position) ; } } # [doc = "Sets the position from which audio will be played, in seconds."] # [doc = ""] # [inline] pub fn seek (& self , to_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "Areas in which this sound plays."] # [doc = ""] # [inline] pub fn set_area_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_area_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Dampens audio over distance with this as an exponent."] # [doc = ""] # [inline] pub fn set_attenuation (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_attenuation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , curve) ; } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bus on which this audio is playing."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "Maximum distance from which audio is still hearable."] # [doc = ""] # [inline] pub fn set_max_distance (& self , pixels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_max_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixels) ; } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , pitch_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale) ; } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn set_stream_paused (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } # [doc = "Base volume without dampening."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_db) ; } } # [doc = "Stops the audio."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer2D { } unsafe impl GodotObject for AudioStreamPlayer2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayer2D" } } impl QueueFree for AudioStreamPlayer2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AudioStreamPlayer2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayer2D { } impl Instanciable for AudioStreamPlayer2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamPlayer2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamPlayer2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_area_mask : * mut sys :: godot_method_bind , pub get_attenuation : * mut sys :: godot_method_bind , pub get_bus : * mut sys :: godot_method_bind , pub get_max_distance : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub get_playback_position : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_paused : * mut sys :: godot_method_bind , pub get_stream_playback : * mut sys :: godot_method_bind , pub get_volume_db : * mut sys :: godot_method_bind , pub is_autoplay_enabled : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_area_mask : * mut sys :: godot_method_bind , pub set_attenuation : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_max_distance : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_paused : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AudioStreamPlayer2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamPlayer2DMethodTable = AudioStreamPlayer2DMethodTable { class_constructor : None , get_area_mask : 0 as * mut sys :: godot_method_bind , get_attenuation : 0 as * mut sys :: godot_method_bind , get_bus : 0 as * mut sys :: godot_method_bind , get_max_distance : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , get_playback_position : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_paused : 0 as * mut sys :: godot_method_bind , get_stream_playback : 0 as * mut sys :: godot_method_bind , get_volume_db : 0 as * mut sys :: godot_method_bind , is_autoplay_enabled : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_area_mask : 0 as * mut sys :: godot_method_bind , set_attenuation : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_max_distance : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_paused : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamPlayer2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamPlayer2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_area_mask\0" . as_ptr () as * const c_char) ; table . get_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\0" . as_ptr () as * const c_char) ; table . set_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:256:3784 [INFO] [stdout] | [INFO] [stdout] 256 | ...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] 256 | # [doc = "`core class VisualShaderNodeVectorClamp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorclamp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorClamp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { this : RawObject < Self > , } impl VisualShaderNodeVectorClamp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorClampMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorClamp { } unsafe impl GodotObject for VisualShaderNodeVectorClamp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorClamp" } } impl std :: ops :: Deref for VisualShaderNodeVectorClamp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorClamp { } impl Instanciable for VisualShaderNodeVectorClamp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorClamp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorClampMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorClampMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorClampMethodTable = VisualShaderNodeVectorClampMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorClampMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorClamp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:262:3595 [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 VisualScriptSwitch` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptswitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSwitch inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSwitch { this : RawObject < Self > , } impl VisualScriptSwitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSwitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSwitch { } unsafe impl GodotObject for VisualScriptSwitch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSwitch" } } impl std :: ops :: Deref for VisualScriptSwitch { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSwitch { } impl Instanciable for VisualScriptSwitch { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSwitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSwitchMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSwitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSwitchMethodTable = VisualScriptSwitchMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSwitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSwitch\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:268:26008 [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 VisualScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScript { this : RawObject < Self > , } impl VisualScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_custom_signal ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_node (& self , func : impl Into < GodotString > , id : i64 , node : impl AsArg < crate :: generated :: visual_script_node :: VisualScriptNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_str_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , node . as_arg_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_variable (& self , name : impl Into < GodotString > , default_value : impl OwnedToVariant , export : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_variable ; let ret = crate :: icalls :: icallptr_void_str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , default_value . owned_to_variant () , export) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_add_argument (& self , name : impl Into < GodotString > , _type : i64 , argname : impl Into < GodotString > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_add_argument ; let ret = crate :: icalls :: icallptr_void_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , _type , argname . into () , index) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_count (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_count ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_name (& self , name : impl Into < GodotString > , argidx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_name ; let ret = crate :: icalls :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_type (& self , name : impl Into < GodotString > , argidx : i64) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_type ; let ret = crate :: icalls :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_remove_argument (& self , name : impl Into < GodotString > , argidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_remove_argument ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_name (& self , name : impl Into < GodotString > , argidx : i64 , argname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_name ; let ret = crate :: icalls :: icallptr_void_str_i64_str (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , argname . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_type (& self , name : impl Into < GodotString > , argidx : i64 , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_type ; let ret = crate :: icalls :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , _type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_swap_argument (& self , name : impl Into < GodotString > , argidx : i64 , withidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_swap_argument ; let ret = crate :: icalls :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , withidx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_connect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_disconnect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_node_id (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_node_id ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_scroll (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_scroll ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node (& self , func : impl Into < GodotString > , id : i64) -> Option < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node_position (& self , func : impl Into < GodotString > , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallptr_vec2_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_default_value (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_default_value ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_export (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_export ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_info (& self , name : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_info ; let ret = crate :: icalls :: icallptr_dict_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_custom_signal (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_custom_signal ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_data_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_data_connection ; let ret = crate :: icalls :: icallptr_bool_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_function (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_function ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_node (& self , func : impl Into < GodotString > , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallptr_bool_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_sequence_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_sequence_connection ; let ret = crate :: icalls :: icallptr_bool_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_variable (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_variable ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_custom_signal ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_node (& self , func : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_variable ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_custom_signal (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_custom_signal ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_function (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_function ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_variable (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_variable ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_connect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_disconnect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function_scroll (& self , name : impl Into < GodotString > , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_function_scroll ; let ret = crate :: icalls :: icallptr_void_str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , ofs) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_instance_base_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_instance_base_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_position (& self , func : impl Into < GodotString > , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallptr_void_str_i64_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_default_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_default_value ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_export (& self , name : impl Into < GodotString > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_export ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_info (& self , name : impl Into < GodotString > , value : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_info ; let ret = crate :: icalls :: icallptr_void_str_dict (method_bind , self . this . sys () . as_ptr () , name . into () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScript { } unsafe impl GodotObject for VisualScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScript" } } impl std :: ops :: Deref for VisualScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for VisualScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScript { } impl Instanciable for VisualScript { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_signal : * mut sys :: godot_method_bind , pub add_function : * mut sys :: godot_method_bind , pub add_node : * mut sys :: godot_method_bind , pub add_variable : * mut sys :: godot_method_bind , pub custom_signal_add_argument : * mut sys :: godot_method_bind , pub custom_signal_get_argument_count : * mut sys :: godot_method_bind , pub custom_signal_get_argument_name : * mut sys :: godot_method_bind , pub custom_signal_get_argument_type : * mut sys :: godot_method_bind , pub custom_signal_remove_argument : * mut sys :: godot_method_bind , pub custom_signal_set_argument_name : * mut sys :: godot_method_bind , pub custom_signal_set_argument_type : * mut sys :: godot_method_bind , pub custom_signal_swap_argument : * mut sys :: godot_method_bind , pub data_connect : * mut sys :: godot_method_bind , pub data_disconnect : * mut sys :: godot_method_bind , pub get_function_node_id : * mut sys :: godot_method_bind , pub get_function_scroll : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub get_variable_default_value : * mut sys :: godot_method_bind , pub get_variable_export : * mut sys :: godot_method_bind , pub get_variable_info : * mut sys :: godot_method_bind , pub has_custom_signal : * mut sys :: godot_method_bind , pub has_data_connection : * mut sys :: godot_method_bind , pub has_function : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub has_sequence_connection : * mut sys :: godot_method_bind , pub has_variable : * mut sys :: godot_method_bind , pub remove_custom_signal : * mut sys :: godot_method_bind , pub remove_function : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub remove_variable : * mut sys :: godot_method_bind , pub rename_custom_signal : * mut sys :: godot_method_bind , pub rename_function : * mut sys :: godot_method_bind , pub rename_variable : * mut sys :: godot_method_bind , pub sequence_connect : * mut sys :: godot_method_bind , pub sequence_disconnect : * mut sys :: godot_method_bind , pub set_function_scroll : * mut sys :: godot_method_bind , pub set_instance_base_type : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind , pub set_variable_default_value : * mut sys :: godot_method_bind , pub set_variable_export : * mut sys :: godot_method_bind , pub set_variable_info : * mut sys :: godot_method_bind } impl VisualScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptMethodTable = VisualScriptMethodTable { class_constructor : None , add_custom_signal : 0 as * mut sys :: godot_method_bind , add_function : 0 as * mut sys :: godot_method_bind , add_node : 0 as * mut sys :: godot_method_bind , add_variable : 0 as * mut sys :: godot_method_bind , custom_signal_add_argument : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_count : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_remove_argument : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_swap_argument : 0 as * mut sys :: godot_method_bind , data_connect : 0 as * mut sys :: godot_method_bind , data_disconnect : 0 as * mut sys :: godot_method_bind , get_function_node_id : 0 as * mut sys :: godot_method_bind , get_function_scroll : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , get_variable_default_value : 0 as * mut sys :: godot_method_bind , get_variable_export : 0 as * mut sys :: godot_method_bind , get_variable_info : 0 as * mut sys :: godot_method_bind , has_custom_signal : 0 as * mut sys :: godot_method_bind , has_data_connection : 0 as * mut sys :: godot_method_bind , has_function : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , has_sequence_connection : 0 as * mut sys :: godot_method_bind , has_variable : 0 as * mut sys :: godot_method_bind , remove_custom_signal : 0 as * mut sys :: godot_method_bind , remove_function : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , remove_variable : 0 as * mut sys :: godot_method_bind , rename_custom_signal : 0 as * mut sys :: godot_method_bind , rename_function : 0 as * mut sys :: godot_method_bind , rename_variable : 0 as * mut sys :: godot_method_bind , sequence_connect : 0 as * mut sys :: godot_method_bind , sequence_disconnect : 0 as * mut sys :: godot_method_bind , set_function_scroll : 0 as * mut sys :: godot_method_bind , set_instance_base_type : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind , set_variable_default_value : 0 as * mut sys :: godot_method_bind , set_variable_export : 0 as * mut sys :: godot_method_bind , set_variable_info : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_signal\0" . as_ptr () as * const c_char) ; table . add_function = (gd_api . godot_method_bind_get_method) (class_name , "add_function\0" . as_ptr () as * const c_char) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_variable = (gd_api . godot_method_bind_get_method) (class_name , "add_variable\0" . as_ptr () as * const c_char) ; table . custom_signal_add_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_add_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_count = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_count\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_remove_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_remove_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_swap_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_swap_argument\0" . as_ptr () as * const c_char) ; table . data_connect = (gd_api . godot_method_bind_get_method) (class_name , "data_connect\0" . as_ptr () as * const c_char) ; table . data_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "data_disconnect\0" . as_ptr () as * const c_char) ; table . get_function_node_id = (gd_api . godot_method_bind_get_method) (class_name , "get_function_node_id\0" . as_ptr () as * const c_char) ; table . get_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_function_scroll\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_default_value\0" . as_ptr () as * const c_char) ; table . get_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_export\0" . as_ptr () as * const c_char) ; table . get_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_info\0" . as_ptr () as * const c_char) ; table . has_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_custom_signal\0" . as_ptr () as * const c_char) ; table . has_data_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_data_connection\0" . as_ptr () as * const c_char) ; table . has_function = (gd_api . godot_method_bind_get_method) (class_name , "has_function\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_sequence_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_sequence_connection\0" . as_ptr () as * const c_char) ; table . has_variable = (gd_api . godot_method_bind_get_method) (class_name , "has_variable\0" . as_ptr () as * const c_char) ; table . remove_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_signal\0" . as_ptr () as * const c_char) ; table . remove_function = (gd_api . godot_method_bind_get_method) (class_name , "remove_function\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_variable = (gd_api . godot_method_bind_get_method) (class_name , "remove_variable\0" . as_ptr () as * const c_char) ; table . rename_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "rename_custom_signal\0" . as_ptr () as * const c_char) ; table . rename_function = (gd_api . godot_method_bind_get_method) (class_name , "rename_function\0" . as_ptr () as * const c_char) ; table . rename_variable = (gd_api . godot_method_bind_get_method) (class_name , "rename_variable\0" . as_ptr () as * const c_char) ; table . sequence_connect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_connect\0" . as_ptr () as * const c_char) ; table . sequence_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_disconnect\0" . as_ptr () as * const c_char) ; table . set_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_function_scroll\0" . as_ptr () as * const c_char) ; table . set_instance_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_base_type\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_default_value\0" . as_ptr () as * const c_char) ; table . set_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_export\0" . as_ptr () as * const c_char) ; table . set_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_info\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:274:3393 [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 PacketPeerGDNative` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packetpeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerGDNative inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerGDNative { this : RawObject < Self > , } impl PacketPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerGDNative { } unsafe impl GodotObject for PacketPeerGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerGDNative" } } impl std :: ops :: Deref for PacketPeerGDNative { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerGDNative { } impl Instanciable for PacketPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PacketPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PacketPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerGDNativeMethodTable = PacketPeerGDNativeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PacketPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerGDNative\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:280:2890 [INFO] [stdout] | [INFO] [stdout] 280 | ...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] 280 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:286:4781 [INFO] [stdout] | [INFO] [stdout] 286 | ...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] 286 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:292:42531 [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 CPUParticles2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cpuparticles2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CPUParticles2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCPUParticles2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CPUParticles2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EmissionShape (pub i64) ; impl EmissionShape { pub const POINT : EmissionShape = EmissionShape (0i64) ; pub const SPHERE : EmissionShape = EmissionShape (1i64) ; pub const RECTANGLE : EmissionShape = EmissionShape (2i64) ; pub const POINTS : EmissionShape = EmissionShape (3i64) ; pub const DIRECTED_POINTS : EmissionShape = EmissionShape (4i64) ; pub const MAX : EmissionShape = EmissionShape (5i64) ; } impl From < i64 > for EmissionShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EmissionShape > for i64 { # [inline] fn from (v : EmissionShape) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const ALIGN_Y_TO_VELOCITY : Flags = Flags (0i64) ; pub const ROTATE_Y : Flags = Flags (1i64) ; pub const DISABLE_Z : Flags = Flags (2i64) ; pub const MAX : Flags = Flags (3i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Parameter (pub i64) ; impl Parameter { pub const INITIAL_LINEAR_VELOCITY : Parameter = Parameter (0i64) ; pub const ANGULAR_VELOCITY : Parameter = Parameter (1i64) ; pub const ORBIT_VELOCITY : Parameter = Parameter (2i64) ; pub const LINEAR_ACCEL : Parameter = Parameter (3i64) ; pub const RADIAL_ACCEL : Parameter = Parameter (4i64) ; pub const TANGENTIAL_ACCEL : Parameter = Parameter (5i64) ; pub const DAMPING : Parameter = Parameter (6i64) ; pub const ANGLE : Parameter = Parameter (7i64) ; pub const SCALE : Parameter = Parameter (8i64) ; pub const HUE_VARIATION : Parameter = Parameter (9i64) ; pub const ANIM_SPEED : Parameter = Parameter (10i64) ; pub const ANIM_OFFSET : Parameter = Parameter (11i64) ; pub const MAX : Parameter = Parameter (12i64) ; } impl From < i64 > for Parameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Parameter > for i64 { # [inline] fn from (v : Parameter) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CPUParticles2D { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const EMISSION_SHAPE_MAX : i64 = 5i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const EMISSION_SHAPE_RECTANGLE : i64 = 2i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const PARAM_MAX : i64 = 12i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; } impl CPUParticles2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CPUParticles2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets this node's properties to match a given [Particles2D] node with an assigned [ParticlesMaterial]."] # [doc = ""] # [inline] pub fn convert_from_particles (& self , particles : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . convert_from_particles ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , particles . as_arg_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Each particle's initial color. If [member texture] is defined, it will be multiplied by this color."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Each particle's color will vary along this [Gradient]."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gradient :: Gradient , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn direction (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_direction ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particle draw order. Uses [enum DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: cpu_particles_2d :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles_2d :: DrawOrder (ret) } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_normals (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_normals ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]."] # [doc = ""] # [inline] pub fn emission_rect_extents (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_rect_extents ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Particles will be emitted inside this region. See [enum EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn emission_shape (& self) -> crate :: generated :: cpu_particles_2d :: EmissionShape { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_shape ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: cpu_particles_2d :: EmissionShape (ret) } } # [doc = "The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn emission_sphere_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_sphere_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn gravity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Amount of time each particle will exist."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn lifetime_randomness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_lifetime_randomness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normalmap (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_normalmap ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn param_curve (& self , param : i64) -> Option < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: curve :: Curve , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn param_randomness (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn particle_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Restarts the particle emitter."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Each particle's initial color. If [member texture] is defined, it will be multiplied by this color."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's color will vary along this [Gradient]."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: gradient :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn set_direction (& self , direction : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_direction ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Particle draw order. Uses [enum DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [doc = "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_colors (& self , array : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_normals (& self , array : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_normals ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_points (& self , array : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]."] # [doc = ""] # [inline] pub fn set_emission_rect_extents (& self , extents : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_rect_extents ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Particles will be emitted inside this region. See [enum EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn set_emission_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_shape ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn set_emission_sphere_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_sphere_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn set_gravity (& self , accel_vec : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "Amount of time each particle will exist."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_lifetime_randomness (& self , random : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_lifetime_randomness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , random) ; } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normalmap (& self , normalmap : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_normalmap ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normalmap . as_arg_ptr ()) ; } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn set_one_shot (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "Each particle's tangential acceleration will vary along this [Curve]."] # [doc = ""] # [inline] pub fn set_param_curve (& self , param : i64 , curve : impl AsArg < crate :: generated :: curve :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , param , curve . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_param_randomness (& self , param : i64 , randomness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , randomness) ; } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn set_particle_flag (& self , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enable) ; } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn set_spread (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CPUParticles2D { } unsafe impl GodotObject for CPUParticles2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CPUParticles2D" } } impl QueueFree for CPUParticles2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CPUParticles2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CPUParticles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CPUParticles2D { } impl Instanciable for CPUParticles2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CPUParticles2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CPUParticles2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub convert_from_particles : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_color_ramp : * mut sys :: godot_method_bind , pub get_direction : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_emission_colors : * mut sys :: godot_method_bind , pub get_emission_normals : * mut sys :: godot_method_bind , pub get_emission_points : * mut sys :: godot_method_bind , pub get_emission_rect_extents : * mut sys :: godot_method_bind , pub get_emission_shape : * mut sys :: godot_method_bind , pub get_emission_sphere_radius : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_lifetime_randomness : * mut sys :: godot_method_bind , pub get_normalmap : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_param_curve : * mut sys :: godot_method_bind , pub get_param_randomness : * mut sys :: godot_method_bind , pub get_particle_flag : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_spread : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_color_ramp : * mut sys :: godot_method_bind , pub set_direction : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_emission_colors : * mut sys :: godot_method_bind , pub set_emission_normals : * mut sys :: godot_method_bind , pub set_emission_points : * mut sys :: godot_method_bind , pub set_emission_rect_extents : * mut sys :: godot_method_bind , pub set_emission_shape : * mut sys :: godot_method_bind , pub set_emission_sphere_radius : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_lifetime_randomness : * mut sys :: godot_method_bind , pub set_normalmap : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_param_curve : * mut sys :: godot_method_bind , pub set_param_randomness : * mut sys :: godot_method_bind , pub set_particle_flag : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_spread : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind } impl CPUParticles2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CPUParticles2DMethodTable = CPUParticles2DMethodTable { class_constructor : None , convert_from_particles : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_color_ramp : 0 as * mut sys :: godot_method_bind , get_direction : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_emission_colors : 0 as * mut sys :: godot_method_bind , get_emission_normals : 0 as * mut sys :: godot_method_bind , get_emission_points : 0 as * mut sys :: godot_method_bind , get_emission_rect_extents : 0 as * mut sys :: godot_method_bind , get_emission_shape : 0 as * mut sys :: godot_method_bind , get_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_lifetime_randomness : 0 as * mut sys :: godot_method_bind , get_normalmap : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_param_curve : 0 as * mut sys :: godot_method_bind , get_param_randomness : 0 as * mut sys :: godot_method_bind , get_particle_flag : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_spread : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_color_ramp : 0 as * mut sys :: godot_method_bind , set_direction : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_emission_colors : 0 as * mut sys :: godot_method_bind , set_emission_normals : 0 as * mut sys :: godot_method_bind , set_emission_points : 0 as * mut sys :: godot_method_bind , set_emission_rect_extents : 0 as * mut sys :: godot_method_bind , set_emission_shape : 0 as * mut sys :: godot_method_bind , set_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_lifetime_randomness : 0 as * mut sys :: godot_method_bind , set_normalmap : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_param_curve : 0 as * mut sys :: godot_method_bind , set_param_randomness : 0 as * mut sys :: godot_method_bind , set_particle_flag : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_spread : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CPUParticles2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CPUParticles2D\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_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\0" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\0" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\0" . as_ptr () as * const c_char) ; table . get_emission_rect_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_rect_extents\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "get_normalmap\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\0" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\0" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\0" . as_ptr () as * const c_char) ; table . set_emission_rect_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_rect_extents\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_normalmap\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:298:9210 [INFO] [stdout] | [INFO] [stdout] 298 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 298 | # [doc = "`core class KinematicCollision2D` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_kinematiccollision2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nKinematicCollision2D inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct KinematicCollision2D { this : RawObject < Self > , } impl KinematicCollision2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = KinematicCollision2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The colliding body."] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding body's unique instance ID. See [method Object.get_instance_id]."] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The colliding body's metadata. See [Object]."] # [doc = ""] # [inline] pub fn collider_metadata (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_metadata ; let ret = crate :: icalls :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "The colliding body's shape."] # [doc = ""] # [inline] pub fn collider_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding shape's index. See [CollisionObject2D]."] # [doc = ""] # [inline] pub fn collider_shape_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_shape_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The colliding object's velocity."] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The moving object's colliding shape."] # [doc = ""] # [inline] pub fn local_shape (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_local_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The colliding body's shape's normal at the point of collision."] # [doc = ""] # [inline] pub fn normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_normal ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The point of collision, in global coordinates."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The moving object's remaining movement vector."] # [doc = ""] # [inline] pub fn remainder (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_remainder ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The distance the moving object traveled before collision."] # [doc = ""] # [inline] pub fn travel (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_travel ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicCollision2D { } unsafe impl GodotObject for KinematicCollision2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "KinematicCollision2D" } } impl std :: ops :: Deref for KinematicCollision2D { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicCollision2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for KinematicCollision2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for KinematicCollision2D { } impl Instanciable for KinematicCollision2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { KinematicCollision2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct KinematicCollision2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_metadata : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_shape_index : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_local_shape : * mut sys :: godot_method_bind , pub get_normal : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_remainder : * mut sys :: godot_method_bind , pub get_travel : * mut sys :: godot_method_bind } impl KinematicCollision2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : KinematicCollision2DMethodTable = KinematicCollision2DMethodTable { class_constructor : None , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_metadata : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_shape_index : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_local_shape : 0 as * mut sys :: godot_method_bind , get_normal : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_remainder : 0 as * mut sys :: godot_method_bind , get_travel : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { KinematicCollision2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "KinematicCollision2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_metadata\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape_index\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_local_shape\0" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_remainder\0" . as_ptr () as * const c_char) ; table . get_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_travel\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:304:5159 [INFO] [stdout] | [INFO] [stdout] 304 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 304 | # [doc = "`core class PCKPacker` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_pckpacker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPCKPacker inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PCKPacker { this : RawObject < Self > , } impl PCKPacker { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PCKPackerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the `source_path` file to the current PCK package at the `pck_path` internal path (should start with `res://`)."] # [doc = ""] # [inline] pub fn add_file (& self , pck_path : impl Into < GodotString > , source_path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . add_file ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , pck_path . into () , source_path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Writes the files specified using all [method add_file] calls since the last flush. If `verbose` is `true`, a list of files added will be printed to the console for easier debugging.\n# Default Arguments\n* `verbose` - `false`"] # [doc = ""] # [inline] pub fn flush (& self , verbose : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . flush ; let ret = crate :: icalls :: icallptr_i64_bool (method_bind , self . this . sys () . as_ptr () , verbose) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Creates a new PCK file with the name `pck_name`. The `.pck` file extension isn't added automatically, so it should be part of `pck_name` (even though it's not required).\n# Default Arguments\n* `alignment` - `0`"] # [doc = ""] # [inline] pub fn pck_start (& self , pck_name : impl Into < GodotString > , alignment : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . pck_start ; let ret = crate :: icalls :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , pck_name . into () , alignment) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for PCKPacker { } unsafe impl GodotObject for PCKPacker { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PCKPacker" } } impl std :: ops :: Deref for PCKPacker { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PCKPacker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PCKPacker { } unsafe impl SubClass < crate :: generated :: object :: Object > for PCKPacker { } impl Instanciable for PCKPacker { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PCKPacker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PCKPackerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_file : * mut sys :: godot_method_bind , pub flush : * mut sys :: godot_method_bind , pub pck_start : * mut sys :: godot_method_bind } impl PCKPackerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PCKPackerMethodTable = PCKPackerMethodTable { class_constructor : None , add_file : 0 as * mut sys :: godot_method_bind , flush : 0 as * mut sys :: godot_method_bind , pck_start : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PCKPackerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PCKPacker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_file = (gd_api . godot_method_bind_get_method) (class_name , "add_file\0" . as_ptr () as * const c_char) ; table . flush = (gd_api . godot_method_bind_get_method) (class_name , "flush\0" . as_ptr () as * const c_char) ; table . pck_start = (gd_api . godot_method_bind_get_method) (class_name , "pck_start\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:310:4564 [INFO] [stdout] | [INFO] [stdout] 310 | ...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] 310 | # [doc = "`core class ToolButton` inherits `Button` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_toolbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ToolButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nToolButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ToolButton { this : RawObject < Self > , } impl ToolButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ToolButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ToolButton { } unsafe impl GodotObject for ToolButton { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ToolButton" } } impl QueueFree for ToolButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ToolButton { type Target = crate :: generated :: button :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ToolButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: button :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: button :: Button > for ToolButton { } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for ToolButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for ToolButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ToolButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for ToolButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for ToolButton { } impl Instanciable for ToolButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ToolButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ToolButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ToolButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ToolButtonMethodTable = ToolButtonMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ToolButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ToolButton\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:316:3889 [INFO] [stdout] | [INFO] [stdout] 316 | ...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] 316 | # [doc = "`core class VisualShaderNodeVectorSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorSmoothStep { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorSmoothStep { } impl Instanciable for VisualShaderNodeVectorSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorSmoothStepMethodTable = VisualShaderNodeVectorSmoothStepMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorSmoothStep\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:322:9552 [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 singleton class IP` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_ip.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nIP inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct IP { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ResolverStatus (pub i64) ; impl ResolverStatus { pub const NONE : ResolverStatus = ResolverStatus (0i64) ; pub const WAITING : ResolverStatus = ResolverStatus (1i64) ; pub const DONE : ResolverStatus = ResolverStatus (2i64) ; pub const ERROR : ResolverStatus = ResolverStatus (3i64) ; } impl From < i64 > for ResolverStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ResolverStatus > for i64 { # [inline] fn from (v : ResolverStatus) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Type (pub i64) ; impl Type { pub const NONE : Type = Type (0i64) ; pub const IPV4 : Type = Type (1i64) ; pub const IPV6 : Type = Type (2i64) ; pub const ANY : Type = Type (3i64) ; } impl From < i64 > for Type { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Type > for i64 { # [inline] fn from (v : Type) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl IP { pub const RESOLVER_INVALID_ID : i64 = - 1i64 ; pub const RESOLVER_MAX_QUERIES : i64 = 32i64 ; pub const RESOLVER_STATUS_DONE : i64 = 2i64 ; pub const RESOLVER_STATUS_ERROR : i64 = 3i64 ; pub const RESOLVER_STATUS_NONE : i64 = 0i64 ; pub const RESOLVER_STATUS_WAITING : i64 = 1i64 ; pub const TYPE_ANY : i64 = 3i64 ; pub const TYPE_IPV4 : i64 = 1i64 ; pub const TYPE_IPV6 : i64 = 2i64 ; pub const TYPE_NONE : i64 = 0i64 ; } impl IP { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("IP\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Removes all of a `hostname`'s cached references. If no `hostname` is given, all cached IP addresses are removed.\n# Default Arguments\n* `hostname` - `\"\"`"] # [doc = ""] # [inline] pub fn clear_cache (& self , hostname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . clear_cache ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , hostname . into ()) ; } } # [doc = "Removes a given item `id` from the queue. This should be used to free a queue after it has completed to enable more queries to happen."] # [doc = ""] # [inline] pub fn erase_resolve_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . erase_resolve_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Returns all of the user's current IPv4 and IPv6 addresses as an array."] # [doc = ""] # [inline] pub fn get_local_addresses (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_local_addresses ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns all network adapters as an array.\nEach adapter is a dictionary of the form:\n```gdscript\n{\n \"index\": \"1\", # Interface index.\n \"name\": \"eth0\", # Interface name.\n \"friendly\": \"Ethernet One\", # A friendly name (might be empty).\n \"addresses\": [\"192.168.1.101\"], # An array of IP addresses associated to this interface.\n}\n```"] # [doc = ""] # [inline] pub fn get_local_interfaces (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_local_interfaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a queued hostname's IP address, given its queue `id`. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status])."] # [doc = ""] # [inline] pub fn get_resolve_item_address (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_resolve_item_address ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue `id`."] # [doc = ""] # [inline] pub fn get_resolve_item_status (& self , id : i64) -> crate :: generated :: ip :: ResolverStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_resolve_item_status ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; crate :: generated :: ip :: ResolverStatus (ret) } } # [doc = "Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as `ip_type`.\n# Default Arguments\n* `ip_type` - `3`"] # [doc = ""] # [inline] pub fn resolve_hostname (& self , host : impl Into < GodotString > , ip_type : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . resolve_hostname ; let ret = crate :: icalls :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type) ; GodotString :: from_sys (ret) } } # [doc = "Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as `ip_type`. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.\n# Default Arguments\n* `ip_type` - `3`"] # [doc = ""] # [inline] pub fn resolve_hostname_queue_item (& self , host : impl Into < GodotString > , ip_type : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . resolve_hostname_queue_item ; let ret = crate :: icalls :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for IP { } unsafe impl GodotObject for IP { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "IP" } } impl std :: ops :: Deref for IP { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for IP { } unsafe impl Send for IP { } unsafe impl Sync for IP { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct IPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_cache : * mut sys :: godot_method_bind , pub erase_resolve_item : * mut sys :: godot_method_bind , pub get_local_addresses : * mut sys :: godot_method_bind , pub get_local_interfaces : * mut sys :: godot_method_bind , pub get_resolve_item_address : * mut sys :: godot_method_bind , pub get_resolve_item_status : * mut sys :: godot_method_bind , pub resolve_hostname : * mut sys :: godot_method_bind , pub resolve_hostname_queue_item : * mut sys :: godot_method_bind } impl IPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : IPMethodTable = IPMethodTable { class_constructor : None , clear_cache : 0 as * mut sys :: godot_method_bind , erase_resolve_item : 0 as * mut sys :: godot_method_bind , get_local_addresses : 0 as * mut sys :: godot_method_bind , get_local_interfaces : 0 as * mut sys :: godot_method_bind , get_resolve_item_address : 0 as * mut sys :: godot_method_bind , get_resolve_item_status : 0 as * mut sys :: godot_method_bind , resolve_hostname : 0 as * mut sys :: godot_method_bind , resolve_hostname_queue_item : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { IPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "IP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_cache = (gd_api . godot_method_bind_get_method) (class_name , "clear_cache\0" . as_ptr () as * const c_char) ; table . erase_resolve_item = (gd_api . godot_method_bind_get_method) (class_name , "erase_resolve_item\0" . as_ptr () as * const c_char) ; table . get_local_addresses = (gd_api . godot_method_bind_get_method) (class_name , "get_local_addresses\0" . as_ptr () as * const c_char) ; table . get_local_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_local_interfaces\0" . as_ptr () as * const c_char) ; table . get_resolve_item_address = (gd_api . godot_method_bind_get_method) (class_name , "get_resolve_item_address\0" . as_ptr () as * const c_char) ; table . get_resolve_item_status = (gd_api . godot_method_bind_get_method) (class_name , "get_resolve_item_status\0" . as_ptr () as * const c_char) ; table . resolve_hostname = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname\0" . as_ptr () as * const c_char) ; table . resolve_hostname_queue_item = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname_queue_item\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:328:5174 [INFO] [stdout] | [INFO] [stdout] 328 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 328 | # [doc = "`core class YSort` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_ysort.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`YSort` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nYSort inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct YSort { this : RawObject < Self > , } impl YSort { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = YSortMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, child nodes are sorted, otherwise sorting is disabled."] # [doc = ""] # [inline] pub fn is_sort_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = YSortMethodTable :: get (get_api ()) . is_sort_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, child nodes are sorted, otherwise sorting is disabled."] # [doc = ""] # [inline] pub fn set_sort_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = YSortMethodTable :: get (get_api ()) . set_sort_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for YSort { } unsafe impl GodotObject for YSort { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "YSort" } } impl QueueFree for YSort { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for YSort { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for YSort { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for YSort { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for YSort { } unsafe impl SubClass < crate :: generated :: node :: Node > for YSort { } unsafe impl SubClass < crate :: generated :: object :: Object > for YSort { } impl Instanciable for YSort { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { YSort :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct YSortMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_sort_enabled : * mut sys :: godot_method_bind , pub set_sort_enabled : * mut sys :: godot_method_bind } impl YSortMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : YSortMethodTable = YSortMethodTable { class_constructor : None , is_sort_enabled : 0 as * mut sys :: godot_method_bind , set_sort_enabled : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { YSortMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "YSort\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_sort_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_sort_enabled\0" . as_ptr () as * const c_char) ; table . set_sort_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_sort_enabled\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:334:7422 [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 RegEx` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_regex.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRegEx inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RegEx { this : RawObject < Self > , } impl RegEx { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RegExMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn compile (& self , pattern : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . compile ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , pattern . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_group_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_group_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_names (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_pattern (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_pattern ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn search (& self , subject : impl Into < GodotString > , offset : i64 , end : i64) -> Option < Ref < crate :: generated :: reg_ex_match :: RegExMatch , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . search ; let ret = crate :: icalls :: icallptr_obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , offset , end) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: reg_ex_match :: RegExMatch , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn search_all (& self , subject : impl Into < GodotString > , offset : i64 , end : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . search_all ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , offset , end) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn sub (& self , subject : impl Into < GodotString > , replacement : impl Into < GodotString > , all : bool , offset : i64 , end : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . sub ; let ret = crate :: icalls :: icallptr_str_str_str_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , replacement . into () , all , offset , end) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RegEx { } unsafe impl GodotObject for RegEx { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegEx" } } impl std :: ops :: Deref for RegEx { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegEx { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RegEx { } unsafe impl SubClass < crate :: generated :: object :: Object > for RegEx { } impl Instanciable for RegEx { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RegEx :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RegExMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub compile : * mut sys :: godot_method_bind , pub get_group_count : * mut sys :: godot_method_bind , pub get_names : * mut sys :: godot_method_bind , pub get_pattern : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub search : * mut sys :: godot_method_bind , pub search_all : * mut sys :: godot_method_bind , pub sub : * mut sys :: godot_method_bind } impl RegExMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RegExMethodTable = RegExMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , compile : 0 as * mut sys :: godot_method_bind , get_group_count : 0 as * mut sys :: godot_method_bind , get_names : 0 as * mut sys :: godot_method_bind , get_pattern : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , search : 0 as * mut sys :: godot_method_bind , search_all : 0 as * mut sys :: godot_method_bind , sub : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RegExMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RegEx\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . compile = (gd_api . godot_method_bind_get_method) (class_name , "compile\0" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\0" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\0" . as_ptr () as * const c_char) ; table . get_pattern = (gd_api . godot_method_bind_get_method) (class_name , "get_pattern\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\0" . as_ptr () as * const c_char) ; table . search_all = (gd_api . godot_method_bind_get_method) (class_name , "search_all\0" . as_ptr () as * const c_char) ; table . sub = (gd_api . godot_method_bind_get_method) (class_name , "sub\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:340:4705 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:346:6954 [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 WebRTCMultiplayer` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webrtcmultiplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCMultiplayer inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCMultiplayer { this : RawObject < Self > , } impl WebRTCMultiplayer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCMultiplayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_peer (& self , peer : impl AsArg < crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection > , peer_id : i64 , unreliable_lifetime : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . add_peer ; let ret = crate :: icalls :: icallptr_i64_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr () , peer_id , unreliable_lifetime) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer (& self , peer_id : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . get_peer ; let ret = crate :: icalls :: icallptr_dict_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peers (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . get_peers ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_peer (& self , peer_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . has_peer ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn initialize (& self , peer_id : i64 , server_compatibility : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallptr_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , peer_id , server_compatibility) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_peer (& self , peer_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . remove_peer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , peer_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCMultiplayer { } unsafe impl GodotObject for WebRTCMultiplayer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCMultiplayer" } } impl std :: ops :: Deref for WebRTCMultiplayer { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCMultiplayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCMultiplayer { } impl Instanciable for WebRTCMultiplayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebRTCMultiplayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCMultiplayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_peer : * mut sys :: godot_method_bind , pub close : * mut sys :: godot_method_bind , pub get_peer : * mut sys :: godot_method_bind , pub get_peers : * mut sys :: godot_method_bind , pub has_peer : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub remove_peer : * mut sys :: godot_method_bind } impl WebRTCMultiplayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCMultiplayerMethodTable = WebRTCMultiplayerMethodTable { class_constructor : None , add_peer : 0 as * mut sys :: godot_method_bind , close : 0 as * mut sys :: godot_method_bind , get_peer : 0 as * mut sys :: godot_method_bind , get_peers : 0 as * mut sys :: godot_method_bind , has_peer : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , remove_peer : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WebRTCMultiplayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCMultiplayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_peer = (gd_api . godot_method_bind_get_method) (class_name , "add_peer\0" . as_ptr () as * const c_char) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_peer\0" . as_ptr () as * const c_char) ; table . get_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_peers\0" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . remove_peer = (gd_api . godot_method_bind_get_method) (class_name , "remove_peer\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:352:46948 [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 AnimationTreePlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationtreeplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AnimationTreePlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimationTreePlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationTreePlayer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationProcessMode (pub i64) ; impl AnimationProcessMode { pub const PHYSICS : AnimationProcessMode = AnimationProcessMode (0i64) ; pub const IDLE : AnimationProcessMode = AnimationProcessMode (1i64) ; } impl From < i64 > for AnimationProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationProcessMode > for i64 { # [inline] fn from (v : AnimationProcessMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct NodeType (pub i64) ; impl NodeType { pub const OUTPUT : NodeType = NodeType (0i64) ; pub const ANIMATION : NodeType = NodeType (1i64) ; pub const ONESHOT : NodeType = NodeType (2i64) ; pub const MIX : NodeType = NodeType (3i64) ; pub const BLEND2 : NodeType = NodeType (4i64) ; pub const BLEND3 : NodeType = NodeType (5i64) ; pub const BLEND4 : NodeType = NodeType (6i64) ; pub const TIMESCALE : NodeType = NodeType (7i64) ; pub const TIMESEEK : NodeType = NodeType (8i64) ; pub const TRANSITION : NodeType = NodeType (9i64) ; } impl From < i64 > for NodeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < NodeType > for i64 { # [inline] fn from (v : NodeType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationTreePlayer { pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; pub const NODE_ANIMATION : i64 = 1i64 ; pub const NODE_BLEND2 : i64 = 4i64 ; pub const NODE_BLEND3 : i64 = 5i64 ; pub const NODE_BLEND4 : i64 = 6i64 ; pub const NODE_MIX : i64 = 3i64 ; pub const NODE_ONESHOT : i64 = 2i64 ; pub const NODE_OUTPUT : i64 = 0i64 ; pub const NODE_TIMESCALE : i64 = 7i64 ; pub const NODE_TIMESEEK : i64 = 8i64 ; pub const NODE_TRANSITION : i64 = 9i64 ; } impl AnimationTreePlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationTreePlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a `type` node to the graph with name `id`."] # [doc = ""] # [inline] pub fn add_node (& self , _type : i64 , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , _type , id . into ()) ; } } # [doc = "Shifts position in the animation timeline. `delta` is the time in seconds to shift. Events between the current frame and `delta` are handled."] # [doc = ""] # [inline] pub fn advance (& self , delta : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . advance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; } } # [doc = "Returns the [AnimationPlayer]'s [Animation] bound to the [AnimationTreePlayer]'s animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_get_animation (& self , id : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_animation ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation :: Animation , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the name of the [member master_player]'s [Animation] bound to this animation node."] # [doc = ""] # [inline] pub fn animation_node_get_master_animation (& self , id : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_master_animation ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the absolute playback timestamp of the animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_get_position (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_position ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Binds a new [Animation] from the [member master_player] to the [AnimationTreePlayer]'s animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_set_animation (& self , id : impl Into < GodotString > , animation : impl AsArg < crate :: generated :: animation :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_animation ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , id . into () , animation . as_arg_ptr ()) ; } } # [doc = "If `enable` is `true`, the animation node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn animation_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_filter_path ; let ret = crate :: icalls :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [doc = "Binds the [Animation] named `source` from [member master_player] to the animation node `id`. Recalculates caches."] # [doc = ""] # [inline] pub fn animation_node_set_master_animation (& self , id : impl Into < GodotString > , source : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_master_animation ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , id . into () , source . into ()) ; } } # [doc = "Returns whether node `id` and `dst_id` are connected at the specified slot."] # [doc = ""] # [inline] pub fn are_nodes_connected (& self , id : impl Into < GodotString > , dst_id : impl Into < GodotString > , dst_input_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . are_nodes_connected ; let ret = crate :: icalls :: icallptr_bool_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx) ; ret as _ } } # [doc = "Returns the blend amount of a Blend2 node given its name."] # [doc = ""] # [inline] pub fn blend2_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_get_amount ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the blend amount of a Blend2 node given its name and value.\nA Blend2 node blends two animations (A and B) with the amount between 0 and 1.\nAt 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B."] # [doc = ""] # [inline] pub fn blend2_node_set_amount (& self , id : impl Into < GodotString > , blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_set_amount ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [doc = "If `enable` is `true`, the Blend2 node with name `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn blend2_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_set_filter_path ; let ret = crate :: icalls :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [doc = "Returns the blend amount of a Blend3 node given its name."] # [doc = ""] # [inline] pub fn blend3_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend3_node_get_amount ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the blend amount of a Blend3 node given its name and value.\nA Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1.\nAt -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+."] # [doc = ""] # [inline] pub fn blend3_node_set_amount (& self , id : impl Into < GodotString > , blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend3_node_set_amount ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [doc = "Returns the blend amount of a Blend4 node given its name."] # [doc = ""] # [inline] pub fn blend4_node_get_amount (& self , id : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend4_node_get_amount ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; mem :: transmute (ret) } } # [doc = "Sets the blend amount of a Blend4 node given its name and value.\nA Blend4 Node blends two pairs of animations.\nThe two pairs are blended like Blend2 and then added together."] # [doc = ""] # [inline] pub fn blend4_node_set_amount (& self , id : impl Into < GodotString > , blend : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend4_node_set_amount ; let ret = crate :: icalls :: icallptr_void_str_vec2 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [doc = "Connects node `id` to `dst_id` at the specified input slot."] # [doc = ""] # [inline] pub fn connect_nodes (& self , id : impl Into < GodotString > , dst_id : impl Into < GodotString > , dst_input_idx : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . connect_nodes ; let ret = crate :: icalls :: icallptr_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Disconnects nodes connected to `id` at the specified input slot."] # [doc = ""] # [inline] pub fn disconnect_nodes (& self , id : impl Into < GodotString > , dst_input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . disconnect_nodes ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_input_idx) ; } } # [doc = "The thread in which to update animations."] # [doc = ""] # [inline] pub fn animation_process_mode (& self) -> crate :: generated :: animation_tree_player :: AnimationProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_animation_process_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_tree_player :: AnimationProcessMode (ret) } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [AnimationPlayer] would point its Root Node at."] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [Animation] nodes can be added to the [AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn master_player (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_master_player ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "Returns a [PoolStringArray] containing the name of all nodes."] # [doc = ""] # [inline] pub fn get_node_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_node_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "If `true`, the [AnimationTreePlayer] is able to play animations."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the mix amount of a Mix node given its name."] # [doc = ""] # [inline] pub fn mix_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . mix_node_get_amount ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the mix amount of a Mix node given its name and value.\nA Mix node adds input b to input a by the amount given by ratio."] # [doc = ""] # [inline] pub fn mix_node_set_amount (& self , id : impl Into < GodotString > , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . mix_node_set_amount ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , ratio) ; } } # [doc = "Check if a node exists (by name)."] # [doc = ""] # [inline] pub fn node_exists (& self , node : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , node . into ()) ; ret as _ } } # [doc = "Returns the input count for a given node. Different types of nodes have different amount of inputs."] # [doc = ""] # [inline] pub fn node_get_input_count (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_input_count ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the input source for a given node input."] # [doc = ""] # [inline] pub fn node_get_input_source (& self , id : impl Into < GodotString > , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_input_source ; let ret = crate :: icalls :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns position of a node in the graph given its name."] # [doc = ""] # [inline] pub fn node_get_position (& self , id : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_position ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; mem :: transmute (ret) } } # [doc = "Gets the node type, will return from [enum NodeType] enum."] # [doc = ""] # [inline] pub fn node_get_type (& self , id : impl Into < GodotString >) -> crate :: generated :: animation_tree_player :: NodeType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_type ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; crate :: generated :: animation_tree_player :: NodeType (ret) } } # [doc = "Renames a node in the graph."] # [doc = ""] # [inline] pub fn node_rename (& self , node : impl Into < GodotString > , new_name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_rename ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , node . into () , new_name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sets the position of a node in the graph given its name and position."] # [doc = ""] # [inline] pub fn node_set_position (& self , id : impl Into < GodotString > , screen_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_set_position ; let ret = crate :: icalls :: icallptr_void_str_vec2 (method_bind , self . this . sys () . as_ptr () , id . into () , screen_position) ; } } # [doc = "Returns the autostart delay of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_autorestart_delay (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_autorestart_delay ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the autostart random delay of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_autorestart_random_delay (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_autorestart_random_delay ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the fade in time of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_fadein_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_fadein_time ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the fade out time of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_fadeout_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_fadeout_time ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns whether a OneShot node will auto restart given its name."] # [doc = ""] # [inline] pub fn oneshot_node_has_autorestart (& self , id : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_has_autorestart ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns whether a OneShot node is active given its name."] # [doc = ""] # [inline] pub fn oneshot_node_is_active (& self , id : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_is_active ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the autorestart property of a OneShot node given its name and value."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart (& self , id : impl Into < GodotString > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , id . into () , enable) ; } } # [doc = "Sets the autorestart delay of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart_delay (& self , id : impl Into < GodotString > , delay_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart_delay ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , delay_sec) ; } } # [doc = "Sets the autorestart random delay of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart_random_delay (& self , id : impl Into < GodotString > , rand_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart_random_delay ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , rand_sec) ; } } # [doc = "Sets the fade in time of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_fadein_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_fadein_time ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } # [doc = "Sets the fade out time of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_fadeout_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_fadeout_time ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } # [doc = "If `enable` is `true`, the OneShot node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn oneshot_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_filter_path ; let ret = crate :: icalls :: icallptr_void_str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable) ; } } # [doc = "Starts a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_start (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_start ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Stops the OneShot node with name `id`."] # [doc = ""] # [inline] pub fn oneshot_node_stop (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_stop ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state."] # [doc = ""] # [inline] pub fn recompute_caches (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . recompute_caches ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the animation node with name `id`."] # [doc = ""] # [inline] pub fn remove_node (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Resets this [AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn reset (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [AnimationTreePlayer] is able to play animations."] # [doc = ""] # [inline] pub fn set_active (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The thread in which to update animations."] # [doc = ""] # [inline] pub fn set_animation_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_animation_process_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [AnimationPlayer] would point its Root Node at."] # [doc = ""] # [inline] pub fn set_base_path (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [Animation] nodes can be added to the [AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn set_master_player (& self , nodepath : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_master_player ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , nodepath . into ()) ; } } # [doc = "Returns the time scale value of the TimeScale node with name `id`."] # [doc = ""] # [inline] pub fn timescale_node_get_scale (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timescale_node_get_scale ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Sets the time scale of the TimeScale node with name `id` to `scale`.\nThe TimeScale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1.\nIf applied after a blend or mix, affects all input animations to that blend or mix."] # [doc = ""] # [inline] pub fn timescale_node_set_scale (& self , id : impl Into < GodotString > , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timescale_node_set_scale ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , scale) ; } } # [doc = "Sets the time seek value of the TimeSeek node with name `id` to `seconds`.\nThis functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it."] # [doc = ""] # [inline] pub fn timeseek_node_seek (& self , id : impl Into < GodotString > , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timeseek_node_seek ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , seconds) ; } } # [doc = "Deletes the input at `input_idx` for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_delete_input (& self , id : impl Into < GodotString > , input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_delete_input ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; } } # [doc = "Returns the index of the currently evaluated input for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_get_current (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_current ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the number of inputs for the transition node with name `id`. You can add inputs by right-clicking on the transition node."] # [doc = ""] # [inline] pub fn transition_node_get_input_count (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_input_count ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns the cross fade time for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_get_xfade_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_xfade_time ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; ret as _ } } # [doc = "Returns `true` if the input at `input_idx` on the transition node with name `id` is set to automatically advance to the next input upon completion."] # [doc = ""] # [inline] pub fn transition_node_has_input_auto_advance (& self , id : impl Into < GodotString > , input_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_has_input_auto_advance ; let ret = crate :: icalls :: icallptr_bool_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; ret as _ } } # [doc = "The transition node with name `id` sets its current input at `input_idx`."] # [doc = ""] # [inline] pub fn transition_node_set_current (& self , id : impl Into < GodotString > , input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_current ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx) ; } } # [doc = "The transition node with name `id` advances to its next input automatically when the input at `input_idx` completes."] # [doc = ""] # [inline] pub fn transition_node_set_input_auto_advance (& self , id : impl Into < GodotString > , input_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_input_auto_advance ; let ret = crate :: icalls :: icallptr_void_str_i64_bool (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx , enable) ; } } # [doc = "Resizes the number of inputs available for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_set_input_count (& self , id : impl Into < GodotString > , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_input_count ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , count) ; } } # [doc = "The transition node with name `id` sets its cross fade time to `time_sec`."] # [doc = ""] # [inline] pub fn transition_node_set_xfade_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_xfade_time ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTreePlayer { } unsafe impl GodotObject for AnimationTreePlayer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimationTreePlayer" } } impl QueueFree for AnimationTreePlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimationTreePlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTreePlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimationTreePlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationTreePlayer { } impl Instanciable for AnimationTreePlayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationTreePlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationTreePlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub advance : * mut sys :: godot_method_bind , pub animation_node_get_animation : * mut sys :: godot_method_bind , pub animation_node_get_master_animation : * mut sys :: godot_method_bind , pub animation_node_get_position : * mut sys :: godot_method_bind , pub animation_node_set_animation : * mut sys :: godot_method_bind , pub animation_node_set_filter_path : * mut sys :: godot_method_bind , pub animation_node_set_master_animation : * mut sys :: godot_method_bind , pub are_nodes_connected : * mut sys :: godot_method_bind , pub blend2_node_get_amount : * mut sys :: godot_method_bind , pub blend2_node_set_amount : * mut sys :: godot_method_bind , pub blend2_node_set_filter_path : * mut sys :: godot_method_bind , pub blend3_node_get_amount : * mut sys :: godot_method_bind , pub blend3_node_set_amount : * mut sys :: godot_method_bind , pub blend4_node_get_amount : * mut sys :: godot_method_bind , pub blend4_node_set_amount : * mut sys :: godot_method_bind , pub connect_nodes : * mut sys :: godot_method_bind , pub disconnect_nodes : * mut sys :: godot_method_bind , pub get_animation_process_mode : * mut sys :: godot_method_bind , pub get_base_path : * mut sys :: godot_method_bind , pub get_master_player : * mut sys :: godot_method_bind , pub get_node_list : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub mix_node_get_amount : * mut sys :: godot_method_bind , pub mix_node_set_amount : * mut sys :: godot_method_bind , pub node_exists : * mut sys :: godot_method_bind , pub node_get_input_count : * mut sys :: godot_method_bind , pub node_get_input_source : * mut sys :: godot_method_bind , pub node_get_position : * mut sys :: godot_method_bind , pub node_get_type : * mut sys :: godot_method_bind , pub node_rename : * mut sys :: godot_method_bind , pub node_set_position : * mut sys :: godot_method_bind , pub oneshot_node_get_autorestart_delay : * mut sys :: godot_method_bind , pub oneshot_node_get_autorestart_random_delay : * mut sys :: godot_method_bind , pub oneshot_node_get_fadein_time : * mut sys :: godot_method_bind , pub oneshot_node_get_fadeout_time : * mut sys :: godot_method_bind , pub oneshot_node_has_autorestart : * mut sys :: godot_method_bind , pub oneshot_node_is_active : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart_delay : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart_random_delay : * mut sys :: godot_method_bind , pub oneshot_node_set_fadein_time : * mut sys :: godot_method_bind , pub oneshot_node_set_fadeout_time : * mut sys :: godot_method_bind , pub oneshot_node_set_filter_path : * mut sys :: godot_method_bind , pub oneshot_node_start : * mut sys :: godot_method_bind , pub oneshot_node_stop : * mut sys :: godot_method_bind , pub recompute_caches : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub reset : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_animation_process_mode : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_master_player : * mut sys :: godot_method_bind , pub timescale_node_get_scale : * mut sys :: godot_method_bind , pub timescale_node_set_scale : * mut sys :: godot_method_bind , pub timeseek_node_seek : * mut sys :: godot_method_bind , pub transition_node_delete_input : * mut sys :: godot_method_bind , pub transition_node_get_current : * mut sys :: godot_method_bind , pub transition_node_get_input_count : * mut sys :: godot_method_bind , pub transition_node_get_xfade_time : * mut sys :: godot_method_bind , pub transition_node_has_input_auto_advance : * mut sys :: godot_method_bind , pub transition_node_set_current : * mut sys :: godot_method_bind , pub transition_node_set_input_auto_advance : * mut sys :: godot_method_bind , pub transition_node_set_input_count : * mut sys :: godot_method_bind , pub transition_node_set_xfade_time : * mut sys :: godot_method_bind } impl AnimationTreePlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationTreePlayerMethodTable = AnimationTreePlayerMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , advance : 0 as * mut sys :: godot_method_bind , animation_node_get_animation : 0 as * mut sys :: godot_method_bind , animation_node_get_master_animation : 0 as * mut sys :: godot_method_bind , animation_node_get_position : 0 as * mut sys :: godot_method_bind , animation_node_set_animation : 0 as * mut sys :: godot_method_bind , animation_node_set_filter_path : 0 as * mut sys :: godot_method_bind , animation_node_set_master_animation : 0 as * mut sys :: godot_method_bind , are_nodes_connected : 0 as * mut sys :: godot_method_bind , blend2_node_get_amount : 0 as * mut sys :: godot_method_bind , blend2_node_set_amount : 0 as * mut sys :: godot_method_bind , blend2_node_set_filter_path : 0 as * mut sys :: godot_method_bind , blend3_node_get_amount : 0 as * mut sys :: godot_method_bind , blend3_node_set_amount : 0 as * mut sys :: godot_method_bind , blend4_node_get_amount : 0 as * mut sys :: godot_method_bind , blend4_node_set_amount : 0 as * mut sys :: godot_method_bind , connect_nodes : 0 as * mut sys :: godot_method_bind , disconnect_nodes : 0 as * mut sys :: godot_method_bind , get_animation_process_mode : 0 as * mut sys :: godot_method_bind , get_base_path : 0 as * mut sys :: godot_method_bind , get_master_player : 0 as * mut sys :: godot_method_bind , get_node_list : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , mix_node_get_amount : 0 as * mut sys :: godot_method_bind , mix_node_set_amount : 0 as * mut sys :: godot_method_bind , node_exists : 0 as * mut sys :: godot_method_bind , node_get_input_count : 0 as * mut sys :: godot_method_bind , node_get_input_source : 0 as * mut sys :: godot_method_bind , node_get_position : 0 as * mut sys :: godot_method_bind , node_get_type : 0 as * mut sys :: godot_method_bind , node_rename : 0 as * mut sys :: godot_method_bind , node_set_position : 0 as * mut sys :: godot_method_bind , oneshot_node_get_autorestart_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_get_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_get_fadein_time : 0 as * mut sys :: godot_method_bind , oneshot_node_get_fadeout_time : 0 as * mut sys :: godot_method_bind , oneshot_node_has_autorestart : 0 as * mut sys :: godot_method_bind , oneshot_node_is_active : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_set_fadein_time : 0 as * mut sys :: godot_method_bind , oneshot_node_set_fadeout_time : 0 as * mut sys :: godot_method_bind , oneshot_node_set_filter_path : 0 as * mut sys :: godot_method_bind , oneshot_node_start : 0 as * mut sys :: godot_method_bind , oneshot_node_stop : 0 as * mut sys :: godot_method_bind , recompute_caches : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , reset : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_animation_process_mode : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_master_player : 0 as * mut sys :: godot_method_bind , timescale_node_get_scale : 0 as * mut sys :: godot_method_bind , timescale_node_set_scale : 0 as * mut sys :: godot_method_bind , timeseek_node_seek : 0 as * mut sys :: godot_method_bind , transition_node_delete_input : 0 as * mut sys :: godot_method_bind , transition_node_get_current : 0 as * mut sys :: godot_method_bind , transition_node_get_input_count : 0 as * mut sys :: godot_method_bind , transition_node_get_xfade_time : 0 as * mut sys :: godot_method_bind , transition_node_has_input_auto_advance : 0 as * mut sys :: godot_method_bind , transition_node_set_current : 0 as * mut sys :: godot_method_bind , transition_node_set_input_auto_advance : 0 as * mut sys :: godot_method_bind , transition_node_set_input_count : 0 as * mut sys :: godot_method_bind , transition_node_set_xfade_time : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationTreePlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationTreePlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\0" . as_ptr () as * const c_char) ; table . animation_node_get_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_animation\0" . as_ptr () as * const c_char) ; table . animation_node_get_master_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_master_animation\0" . as_ptr () as * const c_char) ; table . animation_node_get_position = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_position\0" . as_ptr () as * const c_char) ; table . animation_node_set_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_animation\0" . as_ptr () as * const c_char) ; table . animation_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . animation_node_set_master_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_master_animation\0" . as_ptr () as * const c_char) ; table . are_nodes_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_nodes_connected\0" . as_ptr () as * const c_char) ; table . blend2_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend2_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_set_amount\0" . as_ptr () as * const c_char) ; table . blend2_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . blend3_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend3_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend3_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend3_node_set_amount\0" . as_ptr () as * const c_char) ; table . blend4_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend4_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend4_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend4_node_set_amount\0" . as_ptr () as * const c_char) ; table . connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes\0" . as_ptr () as * const c_char) ; table . disconnect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_nodes\0" . as_ptr () as * const c_char) ; table . get_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_process_mode\0" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_master_player = (gd_api . godot_method_bind_get_method) (class_name , "get_master_player\0" . as_ptr () as * const c_char) ; table . get_node_list = (gd_api . godot_method_bind_get_method) (class_name , "get_node_list\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . mix_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "mix_node_get_amount\0" . as_ptr () as * const c_char) ; table . mix_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "mix_node_set_amount\0" . as_ptr () as * const c_char) ; table . node_exists = (gd_api . godot_method_bind_get_method) (class_name , "node_exists\0" . as_ptr () as * const c_char) ; table . node_get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "node_get_input_count\0" . as_ptr () as * const c_char) ; table . node_get_input_source = (gd_api . godot_method_bind_get_method) (class_name , "node_get_input_source\0" . as_ptr () as * const c_char) ; table . node_get_position = (gd_api . godot_method_bind_get_method) (class_name , "node_get_position\0" . as_ptr () as * const c_char) ; table . node_get_type = (gd_api . godot_method_bind_get_method) (class_name , "node_get_type\0" . as_ptr () as * const c_char) ; table . node_rename = (gd_api . godot_method_bind_get_method) (class_name , "node_rename\0" . as_ptr () as * const c_char) ; table . node_set_position = (gd_api . godot_method_bind_get_method) (class_name , "node_set_position\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_autorestart_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_fadein_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_fadeout_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_has_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_has_autorestart\0" . as_ptr () as * const c_char) ; table . oneshot_node_is_active = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_is_active\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_fadein_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_fadeout_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . oneshot_node_start = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_start\0" . as_ptr () as * const c_char) ; table . oneshot_node_stop = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_stop\0" . as_ptr () as * const c_char) ; table . recompute_caches = (gd_api . godot_method_bind_get_method) (class_name , "recompute_caches\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_process_mode\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_master_player = (gd_api . godot_method_bind_get_method) (class_name , "set_master_player\0" . as_ptr () as * const c_char) ; table . timescale_node_get_scale = (gd_api . godot_method_bind_get_method) (class_name , "timescale_node_get_scale\0" . as_ptr () as * const c_char) ; table . timescale_node_set_scale = (gd_api . godot_method_bind_get_method) (class_name , "timescale_node_set_scale\0" . as_ptr () as * const c_char) ; table . timeseek_node_seek = (gd_api . godot_method_bind_get_method) (class_name , "timeseek_node_seek\0" . as_ptr () as * const c_char) ; table . transition_node_delete_input = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_delete_input\0" . as_ptr () as * const c_char) ; table . transition_node_get_current = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_current\0" . as_ptr () as * const c_char) ; table . transition_node_get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_input_count\0" . as_ptr () as * const c_char) ; table . transition_node_get_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_xfade_time\0" . as_ptr () as * const c_char) ; table . transition_node_has_input_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_has_input_auto_advance\0" . as_ptr () as * const c_char) ; table . transition_node_set_current = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_current\0" . as_ptr () as * const c_char) ; table . transition_node_set_input_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_input_auto_advance\0" . as_ptr () as * const c_char) ; table . transition_node_set_input_count = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_input_count\0" . as_ptr () as * const c_char) ; table . transition_node_set_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_xfade_time\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:358:7431 [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 = "`tools class ScriptEditor` inherits `PanelContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_scripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nScriptEditor inherits methods from:\n - [PanelContainer](struct.PanelContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScriptEditor { this : RawObject < Self > , } impl ScriptEditor { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: control :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallptr_bool_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallptr_void_vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; } } # [doc = "Returns a [Script] that is currently active in editor."] # [doc = ""] # [inline] pub fn get_current_script (& self) -> Option < Ref < crate :: generated :: script :: Script , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_current_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script :: Script , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , point : Vector2 , from : impl AsArg < crate :: generated :: control :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallptr_var_vec2_obj (method_bind , self . this . sys () . as_ptr () , point , from . as_arg_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "Returns an array with all [Script] objects which are currently open in editor."] # [doc = ""] # [inline] pub fn get_open_scripts (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_open_scripts ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Goes to the specified line in the current script."] # [doc = ""] # [inline] pub fn goto_line (& self , line_number : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . goto_line ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line_number) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn open_script_create_dialog (& self , base_name : impl Into < GodotString > , base_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . open_script_create_dialog ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , base_name . into () , base_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScriptEditor { } unsafe impl GodotObject for ScriptEditor { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScriptEditor" } } impl QueueFree for ScriptEditor { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ScriptEditor { type Target = crate :: generated :: panel_container :: PanelContainer ; # [inline] fn deref (& self) -> & crate :: generated :: panel_container :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: panel_container :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: panel_container :: PanelContainer > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: container :: Container > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: control :: Control > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: node :: Node > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: object :: Object > for ScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_drop_data_fw : * mut sys :: godot_method_bind , pub drop_data_fw : * mut sys :: godot_method_bind , pub get_current_script : * mut sys :: godot_method_bind , pub get_drag_data_fw : * mut sys :: godot_method_bind , pub get_open_scripts : * mut sys :: godot_method_bind , pub goto_line : * mut sys :: godot_method_bind , pub open_script_create_dialog : * mut sys :: godot_method_bind } impl ScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScriptEditorMethodTable = ScriptEditorMethodTable { class_constructor : None , can_drop_data_fw : 0 as * mut sys :: godot_method_bind , drop_data_fw : 0 as * mut sys :: godot_method_bind , get_current_script : 0 as * mut sys :: godot_method_bind , get_drag_data_fw : 0 as * mut sys :: godot_method_bind , get_open_scripts : 0 as * mut sys :: godot_method_bind , goto_line : 0 as * mut sys :: godot_method_bind , open_script_create_dialog : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "can_drop_data_fw\0" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\0" . as_ptr () as * const c_char) ; table . get_current_script = (gd_api . godot_method_bind_get_method) (class_name , "get_current_script\0" . as_ptr () as * const c_char) ; table . get_drag_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_data_fw\0" . as_ptr () as * const c_char) ; table . get_open_scripts = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scripts\0" . as_ptr () as * const c_char) ; table . goto_line = (gd_api . godot_method_bind_get_method) (class_name , "goto_line\0" . as_ptr () as * const c_char) ; table . open_script_create_dialog = (gd_api . godot_method_bind_get_method) (class_name , "open_script_create_dialog\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:364:5629 [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 SpatialVelocityTracker` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spatialvelocitytracker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpatialVelocityTracker inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpatialVelocityTracker { this : RawObject < Self > , } impl SpatialVelocityTracker { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpatialVelocityTrackerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_tracked_linear_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . get_tracked_linear_velocity ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_tracking_physics_step (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . is_tracking_physics_step ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn reset (& self , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_track_physics_step (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . set_track_physics_step ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn update_position (& self , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . update_position ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpatialVelocityTracker { } unsafe impl GodotObject for SpatialVelocityTracker { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialVelocityTracker" } } impl std :: ops :: Deref for SpatialVelocityTracker { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialVelocityTracker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpatialVelocityTracker { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpatialVelocityTracker { } impl Instanciable for SpatialVelocityTracker { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SpatialVelocityTracker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpatialVelocityTrackerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_tracked_linear_velocity : * mut sys :: godot_method_bind , pub is_tracking_physics_step : * mut sys :: godot_method_bind , pub reset : * mut sys :: godot_method_bind , pub set_track_physics_step : * mut sys :: godot_method_bind , pub update_position : * mut sys :: godot_method_bind } impl SpatialVelocityTrackerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpatialVelocityTrackerMethodTable = SpatialVelocityTrackerMethodTable { class_constructor : None , get_tracked_linear_velocity : 0 as * mut sys :: godot_method_bind , is_tracking_physics_step : 0 as * mut sys :: godot_method_bind , reset : 0 as * mut sys :: godot_method_bind , set_track_physics_step : 0 as * mut sys :: godot_method_bind , update_position : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SpatialVelocityTrackerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpatialVelocityTracker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_tracked_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_tracked_linear_velocity\0" . as_ptr () as * const c_char) ; table . is_tracking_physics_step = (gd_api . godot_method_bind_get_method) (class_name , "is_tracking_physics_step\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . set_track_physics_step = (gd_api . godot_method_bind_get_method) (class_name , "set_track_physics_step\0" . as_ptr () as * const c_char) ; table . update_position = (gd_api . godot_method_bind_get_method) (class_name , "update_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:370:5429 [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 VisualShaderNodeColorFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodecolorfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorFunc { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const GRAYSCALE : Function = Function (0i64) ; pub const SEPIA : Function = Function (1i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeColorFunc { pub const FUNC_GRAYSCALE : i64 = 0i64 ; pub const FUNC_SEPIA : i64 = 1i64 ; } impl VisualShaderNodeColorFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A function to be applied to the input color. See [enum Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_color_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_color_func :: Function (ret) } } # [doc = "A function to be applied to the input color. See [enum Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorFunc { } unsafe impl GodotObject for VisualShaderNodeColorFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorFunc" } } impl std :: ops :: Deref for VisualShaderNodeColorFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorFunc { } impl Instanciable for VisualShaderNodeColorFunc { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeColorFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeColorFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorFuncMethodTable = VisualShaderNodeColorFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:376:3574 [INFO] [stdout] | [INFO] [stdout] 376 | ...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] 376 | # [doc = "`core class VisualScriptWhile` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptwhile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptWhile inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptWhile { this : RawObject < Self > , } impl VisualScriptWhile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptWhileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptWhile { } unsafe impl GodotObject for VisualScriptWhile { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptWhile" } } impl std :: ops :: Deref for VisualScriptWhile { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptWhile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptWhile { } impl Instanciable for VisualScriptWhile { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptWhile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptWhileMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptWhileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptWhileMethodTable = VisualScriptWhileMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptWhileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptWhile\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:382:13695 [INFO] [stdout] | [INFO] [stdout] 382 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 382 | # [doc = "`core class CanvasLayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_canvaslayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CanvasLayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCanvasLayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasLayer { this : RawObject < Self > , } impl CanvasLayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasLayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the RID of the canvas used by this layer."] # [doc = ""] # [inline] pub fn get_canvas (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_canvas ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The custom [Viewport] node assigned to the [CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales."] # [doc = ""] # [inline] pub fn follow_viewport_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_follow_viewport_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Layer index for draw order. Lower values are drawn first."] # [doc = ""] # [inline] pub fn layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The layer's base offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The layer's rotation in radians."] # [doc = ""] # [inline] pub fn rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The layer's rotation in degrees."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The layer's scale."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The layer's transform."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the layer to follow the viewport in order to simulate a pseudo 3D effect."] # [doc = ""] # [inline] pub fn is_following_viewport (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . is_following_viewport ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The custom [Viewport] node assigned to the [CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [doc = "Sets the layer to follow the viewport in order to simulate a pseudo 3D effect."] # [doc = ""] # [inline] pub fn set_follow_viewport (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_follow_viewport ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales."] # [doc = ""] # [inline] pub fn set_follow_viewport_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_follow_viewport_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Layer index for draw order. Lower values are drawn first."] # [doc = ""] # [inline] pub fn set_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "The layer's base offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The layer's rotation in radians."] # [doc = ""] # [inline] pub fn set_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "The layer's rotation in degrees."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The layer's scale."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The layer's transform."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasLayer { } unsafe impl GodotObject for CanvasLayer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CanvasLayer" } } impl QueueFree for CanvasLayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CanvasLayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for CanvasLayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasLayer { } impl Instanciable for CanvasLayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CanvasLayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasLayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_canvas : * mut sys :: godot_method_bind , pub get_custom_viewport : * mut sys :: godot_method_bind , pub get_follow_viewport_scale : * mut sys :: godot_method_bind , pub get_layer : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_following_viewport : * mut sys :: godot_method_bind , pub set_custom_viewport : * mut sys :: godot_method_bind , pub set_follow_viewport : * mut sys :: godot_method_bind , pub set_follow_viewport_scale : * mut sys :: godot_method_bind , pub set_layer : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl CanvasLayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasLayerMethodTable = CanvasLayerMethodTable { class_constructor : None , get_canvas : 0 as * mut sys :: godot_method_bind , get_custom_viewport : 0 as * mut sys :: godot_method_bind , get_follow_viewport_scale : 0 as * mut sys :: godot_method_bind , get_layer : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_following_viewport : 0 as * mut sys :: godot_method_bind , set_custom_viewport : 0 as * mut sys :: godot_method_bind , set_follow_viewport : 0 as * mut sys :: godot_method_bind , set_follow_viewport_scale : 0 as * mut sys :: godot_method_bind , set_layer : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CanvasLayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasLayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\0" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\0" . as_ptr () as * const c_char) ; table . get_follow_viewport_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_follow_viewport_scale\0" . as_ptr () as * const c_char) ; table . get_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_layer\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_following_viewport = (gd_api . godot_method_bind_get_method) (class_name , "is_following_viewport\0" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\0" . as_ptr () as * const c_char) ; table . set_follow_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_viewport\0" . as_ptr () as * const c_char) ; table . set_follow_viewport_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_viewport_scale\0" . as_ptr () as * const c_char) ; table . set_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_layer\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:388:3784 [INFO] [stdout] | [INFO] [stdout] 388 | ...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] 388 | # [doc = "`core class VisualShaderNodeFaceForward` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodefaceforward.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeFaceForward inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFaceForward { this : RawObject < Self > , } impl VisualShaderNodeFaceForward { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeFaceForwardMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeFaceForward { } unsafe impl GodotObject for VisualShaderNodeFaceForward { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeFaceForward" } } impl std :: ops :: Deref for VisualShaderNodeFaceForward { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeFaceForward { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeFaceForward { } impl Instanciable for VisualShaderNodeFaceForward { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeFaceForward :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeFaceForwardMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeFaceForwardMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeFaceForwardMethodTable = VisualShaderNodeFaceForwardMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeFaceForwardMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeFaceForward\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:394:9194 [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 Font` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_font.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nFont inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Font { this : RawObject < Self > , } impl Font { # [doc = "Draw `string` into a canvas item using the font at a given position, with `modulate` color, and optionally clipping the width. `position` specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.\nSee also [method CanvasItem.draw_string].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `clip_w` - `-1`\n* `outline_modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn draw (& self , canvas_item : Rid , position : Vector2 , string : impl Into < GodotString > , modulate : Color , clip_w : i64 , outline_modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_rid_vec2_str_color_i64_color (method_bind , self . this . sys () . as_ptr () , canvas_item , position , string . into () , modulate , clip_w , outline_modulate) ; } } # [doc = "Draw character `char` into a canvas item using the font at a given position, with `modulate` color, and optionally kerning if `next` is passed. clipping the width. `position` specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.\n# Default Arguments\n* `next` - `-1`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn draw_char (& self , canvas_item : Rid , position : Vector2 , char : i64 , next : i64 , modulate : Color , outline : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . draw_char ; let ret = crate :: icalls :: icallptr_f64_rid_vec2_i64_i64_color_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , position , char , next , modulate , outline) ; ret as _ } } # [doc = "Returns the font ascent (number of pixels above the baseline)."] # [doc = ""] # [inline] pub fn get_ascent (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_ascent ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the size of a character, optionally taking kerning into account if the next character is provided.\n# Default Arguments\n* `next` - `0`"] # [doc = ""] # [inline] pub fn get_char_size (& self , char : i64 , next : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_size ; let ret = crate :: icalls :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , char , next) ; mem :: transmute (ret) } } # [doc = "Returns the font descent (number of pixels below the baseline)."] # [doc = ""] # [inline] pub fn get_descent (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_descent ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total font height (ascent plus descent) in pixels."] # [doc = ""] # [inline] pub fn get_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the size of a string, taking kerning and advance into account."] # [doc = ""] # [inline] pub fn get_string_size (& self , string : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_string_size ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; mem :: transmute (ret) } } # [doc = "Returns the size that the string would have with word wrapping enabled with a fixed `width`."] # [doc = ""] # [inline] pub fn get_wordwrap_string_size (& self , string : impl Into < GodotString > , width : f64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_wordwrap_string_size ; let ret = crate :: icalls :: icallptr_vec2_str_f64 (method_bind , self . this . sys () . as_ptr () , string . into () , width) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the font has an outline."] # [doc = ""] # [inline] pub fn has_outline (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . has_outline ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_distance_field_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . is_distance_field_hint ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it."] # [doc = ""] # [inline] pub fn update_changes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . update_changes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Font { } unsafe impl GodotObject for Font { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Font" } } impl std :: ops :: Deref for Font { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Font { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Font { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Font { } unsafe impl SubClass < crate :: generated :: object :: Object > for Font { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FontMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub draw_char : * mut sys :: godot_method_bind , pub get_ascent : * mut sys :: godot_method_bind , pub get_char_size : * mut sys :: godot_method_bind , pub get_descent : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_string_size : * mut sys :: godot_method_bind , pub get_wordwrap_string_size : * mut sys :: godot_method_bind , pub has_outline : * mut sys :: godot_method_bind , pub is_distance_field_hint : * mut sys :: godot_method_bind , pub update_changes : * mut sys :: godot_method_bind } impl FontMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FontMethodTable = FontMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , draw_char : 0 as * mut sys :: godot_method_bind , get_ascent : 0 as * mut sys :: godot_method_bind , get_char_size : 0 as * mut sys :: godot_method_bind , get_descent : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_string_size : 0 as * mut sys :: godot_method_bind , get_wordwrap_string_size : 0 as * mut sys :: godot_method_bind , has_outline : 0 as * mut sys :: godot_method_bind , is_distance_field_hint : 0 as * mut sys :: godot_method_bind , update_changes : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { FontMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Font\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\0" . as_ptr () as * const c_char) ; table . get_ascent = (gd_api . godot_method_bind_get_method) (class_name , "get_ascent\0" . as_ptr () as * const c_char) ; table . get_char_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_size\0" . as_ptr () as * const c_char) ; table . get_descent = (gd_api . godot_method_bind_get_method) (class_name , "get_descent\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_string_size\0" . as_ptr () as * const c_char) ; table . get_wordwrap_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_wordwrap_string_size\0" . as_ptr () as * const c_char) ; table . has_outline = (gd_api . godot_method_bind_get_method) (class_name , "has_outline\0" . as_ptr () as * const c_char) ; table . is_distance_field_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_distance_field_hint\0" . as_ptr () as * const c_char) ; table . update_changes = (gd_api . godot_method_bind_get_method) (class_name , "update_changes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:400:6259 [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 VisualScriptComment` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptcomment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptComment inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptComment { this : RawObject < Self > , } impl VisualScriptComment { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptCommentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn description (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_description ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description (& self , description : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_description ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , description . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptComment { } unsafe impl GodotObject for VisualScriptComment { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComment" } } impl std :: ops :: Deref for VisualScriptComment { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptComment { } impl Instanciable for VisualScriptComment { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptComment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptCommentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_description : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub set_description : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl VisualScriptCommentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptCommentMethodTable = VisualScriptCommentMethodTable { class_constructor : None , get_description : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , set_description : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptCommentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptComment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_description = (gd_api . godot_method_bind_get_method) (class_name , "get_description\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . set_description = (gd_api . godot_method_bind_get_method) (class_name , "set_description\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:406:41714 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:412:3700 [INFO] [stdout] | [INFO] [stdout] 412 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 412 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:418:7296 [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 AudioEffectPitchShift` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectpitchshift.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPitchShift inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPitchShift { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FftSize (pub i64) ; impl FftSize { pub const _256 : FftSize = FftSize (0i64) ; pub const _512 : FftSize = FftSize (1i64) ; pub const _1024 : FftSize = FftSize (2i64) ; pub const _2048 : FftSize = FftSize (3i64) ; pub const _4096 : FftSize = FftSize (4i64) ; pub const MAX : FftSize = FftSize (5i64) ; } impl From < i64 > for FftSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FftSize > for i64 { # [inline] fn from (v : FftSize) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectPitchShift { pub const FFT_SIZE_1024 : i64 = 2i64 ; pub const FFT_SIZE_2048 : i64 = 3i64 ; pub const FFT_SIZE_256 : i64 = 0i64 ; pub const FFT_SIZE_4096 : i64 = 4i64 ; pub const FFT_SIZE_512 : i64 = 1i64 ; pub const FFT_SIZE_MAX : i64 = 5i64 ; } impl AudioEffectPitchShift { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPitchShiftMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn fft_size (& self) -> crate :: generated :: audio_effect_pitch_shift :: FftSize { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_fft_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_pitch_shift :: FftSize (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn oversampling (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_oversampling ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves)."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_fft_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_fft_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_oversampling (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_oversampling ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves)."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , rate : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , rate) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPitchShift { } unsafe impl GodotObject for AudioEffectPitchShift { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPitchShift" } } impl std :: ops :: Deref for AudioEffectPitchShift { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPitchShift { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPitchShift { } impl Instanciable for AudioEffectPitchShift { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectPitchShift :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPitchShiftMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_fft_size : * mut sys :: godot_method_bind , pub get_oversampling : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub set_fft_size : * mut sys :: godot_method_bind , pub set_oversampling : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind } impl AudioEffectPitchShiftMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPitchShiftMethodTable = AudioEffectPitchShiftMethodTable { class_constructor : None , get_fft_size : 0 as * mut sys :: godot_method_bind , get_oversampling : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , set_fft_size : 0 as * mut sys :: godot_method_bind , set_oversampling : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectPitchShiftMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPitchShift\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fft_size\0" . as_ptr () as * const c_char) ; table . get_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "get_oversampling\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fft_size\0" . as_ptr () as * const c_char) ; table . set_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_oversampling\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:424:56042 [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 Viewport` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_viewport.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Viewport` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nViewport inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Viewport { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ClearMode (pub i64) ; impl ClearMode { pub const ALWAYS : ClearMode = ClearMode (0i64) ; pub const NEVER : ClearMode = ClearMode (1i64) ; pub const ONLY_NEXT_FRAME : ClearMode = ClearMode (2i64) ; } impl From < i64 > for ClearMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ClearMode > for i64 { # [inline] fn from (v : ClearMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DebugDraw (pub i64) ; impl DebugDraw { pub const DISABLED : DebugDraw = DebugDraw (0i64) ; pub const UNSHADED : DebugDraw = DebugDraw (1i64) ; pub const OVERDRAW : DebugDraw = DebugDraw (2i64) ; pub const WIREFRAME : DebugDraw = DebugDraw (3i64) ; } impl From < i64 > for DebugDraw { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DebugDraw > for i64 { # [inline] fn from (v : DebugDraw) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Msaa (pub i64) ; impl Msaa { pub const DISABLED : Msaa = Msaa (0i64) ; pub const _2X : Msaa = Msaa (1i64) ; pub const _4X : Msaa = Msaa (2i64) ; pub const _8X : Msaa = Msaa (3i64) ; pub const _16X : Msaa = Msaa (4i64) ; } impl From < i64 > for Msaa { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Msaa > for i64 { # [inline] fn from (v : Msaa) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RenderInfo (pub i64) ; impl RenderInfo { pub const OBJECTS_IN_FRAME : RenderInfo = RenderInfo (0i64) ; pub const VERTICES_IN_FRAME : RenderInfo = RenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : RenderInfo = RenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : RenderInfo = RenderInfo (3i64) ; pub const SURFACE_CHANGES_IN_FRAME : RenderInfo = RenderInfo (4i64) ; pub const DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (5i64) ; pub const _2D_ITEMS_IN_FRAME : RenderInfo = RenderInfo (6i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (7i64) ; pub const MAX : RenderInfo = RenderInfo (8i64) ; } impl From < i64 > for RenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RenderInfo > for i64 { # [inline] fn from (v : RenderInfo) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowAtlasQuadrantSubdiv (pub i64) ; impl ShadowAtlasQuadrantSubdiv { pub const DISABLED : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (0i64) ; pub const _1 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (1i64) ; pub const _4 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (2i64) ; pub const _16 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (3i64) ; pub const _64 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (4i64) ; pub const _256 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (5i64) ; pub const _1024 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (6i64) ; pub const MAX : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (7i64) ; } impl From < i64 > for ShadowAtlasQuadrantSubdiv { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowAtlasQuadrantSubdiv > for i64 { # [inline] fn from (v : ShadowAtlasQuadrantSubdiv) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpdateMode (pub i64) ; impl UpdateMode { pub const DISABLED : UpdateMode = UpdateMode (0i64) ; pub const ONCE : UpdateMode = UpdateMode (1i64) ; pub const WHEN_VISIBLE : UpdateMode = UpdateMode (2i64) ; pub const ALWAYS : UpdateMode = UpdateMode (3i64) ; } impl From < i64 > for UpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpdateMode > for i64 { # [inline] fn from (v : UpdateMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Usage (pub i64) ; impl Usage { pub const _2D : Usage = Usage (0i64) ; pub const _2D_NO_SAMPLING : Usage = Usage (1i64) ; pub const _3D : Usage = Usage (2i64) ; pub const _3D_NO_EFFECTS : Usage = Usage (3i64) ; } impl From < i64 > for Usage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Usage > for i64 { # [inline] fn from (v : Usage) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Viewport { pub const CLEAR_MODE_ALWAYS : i64 = 0i64 ; pub const CLEAR_MODE_NEVER : i64 = 1i64 ; pub const CLEAR_MODE_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const MSAA_16X : i64 = 4i64 ; pub const MSAA_2X : i64 = 1i64 ; pub const MSAA_4X : i64 = 2i64 ; pub const MSAA_8X : i64 = 3i64 ; pub const MSAA_DISABLED : i64 = 0i64 ; pub const RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const RENDER_INFO_MAX : i64 = 8i64 ; pub const RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1 : i64 = 1i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1024 : i64 = 6i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_16 : i64 = 3i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_256 : i64 = 5i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_4 : i64 = 2i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_64 : i64 = 4i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED : i64 = 0i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_MAX : i64 = 7i64 ; pub const UPDATE_ALWAYS : i64 = 3i64 ; pub const UPDATE_DISABLED : i64 = 0i64 ; pub const UPDATE_ONCE : i64 = 1i64 ; pub const UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const USAGE_2D : i64 = 0i64 ; pub const USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const USAGE_3D : i64 = 2i64 ; pub const USAGE_3D_NO_EFFECTS : i64 = 3i64 ; } impl Viewport { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the 3D world of the viewport, or if none the world of the parent viewport."] # [doc = ""] # [inline] pub fn find_world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the 2D world of the viewport."] # [doc = ""] # [inline] pub fn find_world_2d (& self) -> Option < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world_2d ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the active 3D camera."] # [doc = ""] # [inline] pub fn get_camera (& self) -> Option < Ref < crate :: generated :: camera :: Camera , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_camera ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: camera :: Camera , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport."] # [doc = ""] # [inline] pub fn canvas_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_canvas_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The clear mode when viewport used as a render target.\n**Note:** This property is intended for 2D usage."] # [doc = ""] # [inline] pub fn clear_mode (& self) -> crate :: generated :: viewport :: ClearMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_clear_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: ClearMode (ret) } } # [doc = "The overlay mode for test rendered geometry in debug purposes."] # [doc = ""] # [inline] pub fn debug_draw (& self) -> crate :: generated :: viewport :: DebugDraw { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_debug_draw ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: DebugDraw (ret) } } # [doc = "Returns the total transform of the viewport."] # [doc = ""] # [inline] pub fn get_final_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_final_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The global canvas transform of the viewport. The canvas transform is relative to this."] # [doc = ""] # [inline] pub fn global_canvas_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_global_canvas_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number.\n**Note:** Requires [member usage] to be set to [constant USAGE_3D] or [constant USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D."] # [doc = ""] # [inline] pub fn hdr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_hdr ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output."] # [doc = ""] # [inline] pub fn keep_3d_linear (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_keep_3d_linear ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the topmost modal in the stack."] # [doc = ""] # [inline] pub fn get_modal_stack_top (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_modal_stack_top ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the mouse position relative to the viewport."] # [doc = ""] # [inline] pub fn get_mouse_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_mouse_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems."] # [doc = ""] # [inline] pub fn msaa (& self) -> crate :: generated :: viewport :: Msaa { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_msaa ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: Msaa (ret) } } # [doc = "If `true`, the objects rendered by viewport become subjects of mouse picking process."] # [doc = ""] # [inline] pub fn physics_object_picking (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_physics_object_picking ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns information about the viewport from the rendering pipeline."] # [doc = ""] # [inline] pub fn get_render_info (& self , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_render_info ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , info) ; ret as _ } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn shadow_atlas_quadrant_subdiv (& self , quadrant : i64) -> crate :: generated :: viewport :: ShadowAtlasQuadrantSubdiv { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , quadrant) ; crate :: generated :: viewport :: ShadowAtlasQuadrantSubdiv (ret) } } # [doc = "The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.\n**Note:** If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually."] # [doc = ""] # [inline] pub fn shadow_atlas_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The width and height of viewport."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the size override set with [method set_size_override]."] # [doc = ""] # [inline] pub fn get_size_override (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_size_override ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the viewport's texture.\n**Note:** Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example:\n```gdscript\nvar img = get_viewport().get_texture().get_data()\nimg.flip_y()\n```"] # [doc = ""] # [inline] pub fn get_texture (& self) -> Option < Ref < crate :: generated :: viewport_texture :: ViewportTexture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: viewport_texture :: ViewportTexture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The update mode when viewport used as a render target."] # [doc = ""] # [inline] pub fn update_mode (& self) -> crate :: generated :: viewport :: UpdateMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_update_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: UpdateMode (ret) } } # [doc = "The rendering mode of viewport."] # [doc = ""] # [inline] pub fn usage (& self) -> crate :: generated :: viewport :: Usage { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_usage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: viewport :: Usage (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn use_debanding (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_use_debanding ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn use_fxaa (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_use_fxaa ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the result of rendering will be flipped vertically."] # [doc = ""] # [inline] pub fn vflip (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_vflip ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the viewport's RID from the [VisualServer]."] # [doc = ""] # [inline] pub fn get_viewport_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_viewport_rid ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the visible rectangle in global screen coordinates."] # [doc = ""] # [inline] pub fn get_visible_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_visible_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The custom [World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn world (& self) -> Option < Ref < crate :: generated :: world :: World , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world :: World , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The custom [World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn world_2d (& self) -> Option < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world_2d ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: world_2d :: World2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data]."] # [doc = ""] # [inline] pub fn gui_get_drag_data (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_get_drag_data ; let ret = crate :: icalls :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } # [doc = "Returns `true` if there are visible modals on-screen."] # [doc = ""] # [inline] pub fn gui_has_modal_stack (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_has_modal_stack ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the viewport is currently performing a drag operation."] # [doc = ""] # [inline] pub fn gui_is_dragging (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_is_dragging ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport should render its background as transparent."] # [doc = ""] # [inline] pub fn has_transparent_background (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . has_transparent_background ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn input (& self , local_event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . input ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , local_event . as_arg_ptr ()) ; } } # [doc = "If `true`, the viewport will disable 3D rendering. For actual disabling use `usage`."] # [doc = ""] # [inline] pub fn is_3d_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_3d_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will process 3D audio streams."] # [doc = ""] # [inline] pub fn is_audio_listener (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_audio_listener ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will process 2D audio streams."] # [doc = ""] # [inline] pub fn is_audio_listener_2d (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_audio_listener_2d ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_handling_input_locally (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_handling_input_locally ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will not receive input event."] # [doc = ""] # [inline] pub fn is_input_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_input_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_input_handled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_input_handled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the size override is enabled. See [method set_size_override]."] # [doc = ""] # [inline] pub fn is_size_override_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_size_override_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the size override affects stretch as well."] # [doc = ""] # [inline] pub fn is_size_override_stretch_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_size_override_stretch_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the GUI controls on the viewport will lay pixel perfectly."] # [doc = ""] # [inline] pub fn is_snap_controls_to_pixels_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_snap_controls_to_pixels_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will use [World] defined in `world` property."] # [doc = ""] # [inline] pub fn is_using_own_world (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_using_own_world ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from `SCREEN_TEXTURE` becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]."] # [doc = ""] # [inline] pub fn is_using_render_direct_to_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_using_render_direct_to_screen ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the viewport will process 3D audio streams."] # [doc = ""] # [inline] pub fn set_as_audio_listener (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_as_audio_listener ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the viewport will process 2D audio streams."] # [doc = ""] # [inline] pub fn set_as_audio_listener_2d (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_as_audio_listener_2d ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually."] # [doc = ""] # [inline] pub fn set_attach_to_screen_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_attach_to_screen_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport."] # [doc = ""] # [inline] pub fn set_canvas_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_canvas_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "The clear mode when viewport used as a render target.\n**Note:** This property is intended for 2D usage."] # [doc = ""] # [inline] pub fn set_clear_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_clear_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The overlay mode for test rendered geometry in debug purposes."] # [doc = ""] # [inline] pub fn set_debug_draw (& self , debug_draw : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_debug_draw ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , debug_draw) ; } } # [doc = "If `true`, the viewport will disable 3D rendering. For actual disabling use `usage`."] # [doc = ""] # [inline] pub fn set_disable_3d (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_disable_3d ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "If `true`, the viewport will not receive input event."] # [doc = ""] # [inline] pub fn set_disable_input (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_disable_input ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "The global canvas transform of the viewport. The canvas transform is relative to this."] # [doc = ""] # [inline] pub fn set_global_canvas_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_global_canvas_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_handle_input_locally (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_handle_input_locally ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number.\n**Note:** Requires [member usage] to be set to [constant USAGE_3D] or [constant USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D."] # [doc = ""] # [inline] pub fn set_hdr (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_hdr ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Stops the input from propagating further down the [SceneTree]."] # [doc = ""] # [inline] pub fn set_input_as_handled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_input_as_handled ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output."] # [doc = ""] # [inline] pub fn set_keep_3d_linear (& self , keep_3d_linear : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_keep_3d_linear ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , keep_3d_linear) ; } } # [doc = "The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems."] # [doc = ""] # [inline] pub fn set_msaa (& self , msaa : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_msaa ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , msaa) ; } } # [doc = "If `true`, the objects rendered by viewport become subjects of mouse picking process."] # [doc = ""] # [inline] pub fn set_physics_object_picking (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_physics_object_picking ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quadrant_subdiv (& self , quadrant : i64 , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , quadrant , subdiv) ; } } # [doc = "The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.\n**Note:** If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually."] # [doc = ""] # [inline] pub fn set_shadow_atlas_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The width and height of viewport."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the size override of the viewport. If the `enable` parameter is `true` the override is used, otherwise it uses the default size. If the size parameter is `(-1, -1)`, it won't update the size.\n# Default Arguments\n* `size` - `Vector2( -1, -1 )`\n* `margin` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_size_override (& self , enable : bool , size : Vector2 , margin : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size_override ; let ret = crate :: icalls :: icallptr_void_bool_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , enable , size , margin) ; } } # [doc = "If `true`, the size override affects stretch as well."] # [doc = ""] # [inline] pub fn set_size_override_stretch (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size_override_stretch ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the GUI controls on the viewport will lay pixel perfectly."] # [doc = ""] # [inline] pub fn set_snap_controls_to_pixels (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_snap_controls_to_pixels ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the viewport should render its background as transparent."] # [doc = ""] # [inline] pub fn set_transparent_background (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_transparent_background ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The update mode when viewport used as a render target."] # [doc = ""] # [inline] pub fn set_update_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_update_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The rendering mode of viewport."] # [doc = ""] # [inline] pub fn set_usage (& self , usage : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_usage ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usage) ; } } # [doc = "If `true`, the viewport will be used in AR/VR process."] # [doc = ""] # [inline] pub fn set_use_arvr (& self , _use : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_arvr ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _use) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_debanding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_debanding ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_fxaa (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_fxaa ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the viewport will use [World] defined in `world` property."] # [doc = ""] # [inline] pub fn set_use_own_world (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_own_world ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from `SCREEN_TEXTURE` becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]."] # [doc = ""] # [inline] pub fn set_use_render_direct_to_screen (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_render_direct_to_screen ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the result of rendering will be flipped vertically."] # [doc = ""] # [inline] pub fn set_vflip (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_vflip ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The custom [World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn set_world (& self , world : impl AsArg < crate :: generated :: world :: World >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , world . as_arg_ptr ()) ; } } # [doc = "The custom [World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn set_world_2d (& self , world_2d : impl AsArg < crate :: generated :: world_2d :: World2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world_2d ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , world_2d . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn unhandled_input (& self , local_event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . unhandled_input ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , local_event . as_arg_ptr ()) ; } } # [doc = "Forces update of the 2D and 3D worlds."] # [doc = ""] # [inline] pub fn update_worlds (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . update_worlds ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the viewport will be used in AR/VR process."] # [doc = ""] # [inline] pub fn use_arvr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . use_arvr ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Warps the mouse to a position relative to the viewport."] # [doc = ""] # [inline] pub fn warp_mouse (& self , to_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . warp_mouse ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Viewport { } unsafe impl GodotObject for Viewport { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Viewport" } } impl QueueFree for Viewport { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Viewport { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Viewport { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for Viewport { } unsafe impl SubClass < crate :: generated :: object :: Object > for Viewport { } impl Instanciable for Viewport { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Viewport :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_world : * mut sys :: godot_method_bind , pub find_world_2d : * mut sys :: godot_method_bind , pub get_camera : * mut sys :: godot_method_bind , pub get_canvas_transform : * mut sys :: godot_method_bind , pub get_clear_mode : * mut sys :: godot_method_bind , pub get_debug_draw : * mut sys :: godot_method_bind , pub get_final_transform : * mut sys :: godot_method_bind , pub get_global_canvas_transform : * mut sys :: godot_method_bind , pub get_hdr : * mut sys :: godot_method_bind , pub get_keep_3d_linear : * mut sys :: godot_method_bind , pub get_modal_stack_top : * mut sys :: godot_method_bind , pub get_mouse_position : * mut sys :: godot_method_bind , pub get_msaa : * mut sys :: godot_method_bind , pub get_physics_object_picking : * mut sys :: godot_method_bind , pub get_render_info : * mut sys :: godot_method_bind , pub get_shadow_atlas_quadrant_subdiv : * mut sys :: godot_method_bind , pub get_shadow_atlas_size : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_size_override : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_update_mode : * mut sys :: godot_method_bind , pub get_usage : * mut sys :: godot_method_bind , pub get_use_debanding : * mut sys :: godot_method_bind , pub get_use_fxaa : * mut sys :: godot_method_bind , pub get_vflip : * mut sys :: godot_method_bind , pub get_viewport_rid : * mut sys :: godot_method_bind , pub get_visible_rect : * mut sys :: godot_method_bind , pub get_world : * mut sys :: godot_method_bind , pub get_world_2d : * mut sys :: godot_method_bind , pub gui_get_drag_data : * mut sys :: godot_method_bind , pub gui_has_modal_stack : * mut sys :: godot_method_bind , pub gui_is_dragging : * mut sys :: godot_method_bind , pub has_transparent_background : * mut sys :: godot_method_bind , pub input : * mut sys :: godot_method_bind , pub is_3d_disabled : * mut sys :: godot_method_bind , pub is_audio_listener : * mut sys :: godot_method_bind , pub is_audio_listener_2d : * mut sys :: godot_method_bind , pub is_handling_input_locally : * mut sys :: godot_method_bind , pub is_input_disabled : * mut sys :: godot_method_bind , pub is_input_handled : * mut sys :: godot_method_bind , pub is_size_override_enabled : * mut sys :: godot_method_bind , pub is_size_override_stretch_enabled : * mut sys :: godot_method_bind , pub is_snap_controls_to_pixels_enabled : * mut sys :: godot_method_bind , pub is_using_own_world : * mut sys :: godot_method_bind , pub is_using_render_direct_to_screen : * mut sys :: godot_method_bind , pub set_as_audio_listener : * mut sys :: godot_method_bind , pub set_as_audio_listener_2d : * mut sys :: godot_method_bind , pub set_attach_to_screen_rect : * mut sys :: godot_method_bind , pub set_canvas_transform : * mut sys :: godot_method_bind , pub set_clear_mode : * mut sys :: godot_method_bind , pub set_debug_draw : * mut sys :: godot_method_bind , pub set_disable_3d : * mut sys :: godot_method_bind , pub set_disable_input : * mut sys :: godot_method_bind , pub set_global_canvas_transform : * mut sys :: godot_method_bind , pub set_handle_input_locally : * mut sys :: godot_method_bind , pub set_hdr : * mut sys :: godot_method_bind , pub set_input_as_handled : * mut sys :: godot_method_bind , pub set_keep_3d_linear : * mut sys :: godot_method_bind , pub set_msaa : * mut sys :: godot_method_bind , pub set_physics_object_picking : * mut sys :: godot_method_bind , pub set_shadow_atlas_quadrant_subdiv : * mut sys :: godot_method_bind , pub set_shadow_atlas_size : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_size_override : * mut sys :: godot_method_bind , pub set_size_override_stretch : * mut sys :: godot_method_bind , pub set_snap_controls_to_pixels : * mut sys :: godot_method_bind , pub set_transparent_background : * mut sys :: godot_method_bind , pub set_update_mode : * mut sys :: godot_method_bind , pub set_usage : * mut sys :: godot_method_bind , pub set_use_arvr : * mut sys :: godot_method_bind , pub set_use_debanding : * mut sys :: godot_method_bind , pub set_use_fxaa : * mut sys :: godot_method_bind , pub set_use_own_world : * mut sys :: godot_method_bind , pub set_use_render_direct_to_screen : * mut sys :: godot_method_bind , pub set_vflip : * mut sys :: godot_method_bind , pub set_world : * mut sys :: godot_method_bind , pub set_world_2d : * mut sys :: godot_method_bind , pub unhandled_input : * mut sys :: godot_method_bind , pub update_worlds : * mut sys :: godot_method_bind , pub use_arvr : * mut sys :: godot_method_bind , pub warp_mouse : * mut sys :: godot_method_bind } impl ViewportMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportMethodTable = ViewportMethodTable { class_constructor : None , find_world : 0 as * mut sys :: godot_method_bind , find_world_2d : 0 as * mut sys :: godot_method_bind , get_camera : 0 as * mut sys :: godot_method_bind , get_canvas_transform : 0 as * mut sys :: godot_method_bind , get_clear_mode : 0 as * mut sys :: godot_method_bind , get_debug_draw : 0 as * mut sys :: godot_method_bind , get_final_transform : 0 as * mut sys :: godot_method_bind , get_global_canvas_transform : 0 as * mut sys :: godot_method_bind , get_hdr : 0 as * mut sys :: godot_method_bind , get_keep_3d_linear : 0 as * mut sys :: godot_method_bind , get_modal_stack_top : 0 as * mut sys :: godot_method_bind , get_mouse_position : 0 as * mut sys :: godot_method_bind , get_msaa : 0 as * mut sys :: godot_method_bind , get_physics_object_picking : 0 as * mut sys :: godot_method_bind , get_render_info : 0 as * mut sys :: godot_method_bind , get_shadow_atlas_quadrant_subdiv : 0 as * mut sys :: godot_method_bind , get_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_size_override : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_update_mode : 0 as * mut sys :: godot_method_bind , get_usage : 0 as * mut sys :: godot_method_bind , get_use_debanding : 0 as * mut sys :: godot_method_bind , get_use_fxaa : 0 as * mut sys :: godot_method_bind , get_vflip : 0 as * mut sys :: godot_method_bind , get_viewport_rid : 0 as * mut sys :: godot_method_bind , get_visible_rect : 0 as * mut sys :: godot_method_bind , get_world : 0 as * mut sys :: godot_method_bind , get_world_2d : 0 as * mut sys :: godot_method_bind , gui_get_drag_data : 0 as * mut sys :: godot_method_bind , gui_has_modal_stack : 0 as * mut sys :: godot_method_bind , gui_is_dragging : 0 as * mut sys :: godot_method_bind , has_transparent_background : 0 as * mut sys :: godot_method_bind , input : 0 as * mut sys :: godot_method_bind , is_3d_disabled : 0 as * mut sys :: godot_method_bind , is_audio_listener : 0 as * mut sys :: godot_method_bind , is_audio_listener_2d : 0 as * mut sys :: godot_method_bind , is_handling_input_locally : 0 as * mut sys :: godot_method_bind , is_input_disabled : 0 as * mut sys :: godot_method_bind , is_input_handled : 0 as * mut sys :: godot_method_bind , is_size_override_enabled : 0 as * mut sys :: godot_method_bind , is_size_override_stretch_enabled : 0 as * mut sys :: godot_method_bind , is_snap_controls_to_pixels_enabled : 0 as * mut sys :: godot_method_bind , is_using_own_world : 0 as * mut sys :: godot_method_bind , is_using_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , set_as_audio_listener : 0 as * mut sys :: godot_method_bind , set_as_audio_listener_2d : 0 as * mut sys :: godot_method_bind , set_attach_to_screen_rect : 0 as * mut sys :: godot_method_bind , set_canvas_transform : 0 as * mut sys :: godot_method_bind , set_clear_mode : 0 as * mut sys :: godot_method_bind , set_debug_draw : 0 as * mut sys :: godot_method_bind , set_disable_3d : 0 as * mut sys :: godot_method_bind , set_disable_input : 0 as * mut sys :: godot_method_bind , set_global_canvas_transform : 0 as * mut sys :: godot_method_bind , set_handle_input_locally : 0 as * mut sys :: godot_method_bind , set_hdr : 0 as * mut sys :: godot_method_bind , set_input_as_handled : 0 as * mut sys :: godot_method_bind , set_keep_3d_linear : 0 as * mut sys :: godot_method_bind , set_msaa : 0 as * mut sys :: godot_method_bind , set_physics_object_picking : 0 as * mut sys :: godot_method_bind , set_shadow_atlas_quadrant_subdiv : 0 as * mut sys :: godot_method_bind , set_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_size_override : 0 as * mut sys :: godot_method_bind , set_size_override_stretch : 0 as * mut sys :: godot_method_bind , set_snap_controls_to_pixels : 0 as * mut sys :: godot_method_bind , set_transparent_background : 0 as * mut sys :: godot_method_bind , set_update_mode : 0 as * mut sys :: godot_method_bind , set_usage : 0 as * mut sys :: godot_method_bind , set_use_arvr : 0 as * mut sys :: godot_method_bind , set_use_debanding : 0 as * mut sys :: godot_method_bind , set_use_fxaa : 0 as * mut sys :: godot_method_bind , set_use_own_world : 0 as * mut sys :: godot_method_bind , set_use_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , set_vflip : 0 as * mut sys :: godot_method_bind , set_world : 0 as * mut sys :: godot_method_bind , set_world_2d : 0 as * mut sys :: godot_method_bind , unhandled_input : 0 as * mut sys :: godot_method_bind , update_worlds : 0 as * mut sys :: godot_method_bind , use_arvr : 0 as * mut sys :: godot_method_bind , warp_mouse : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ViewportMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Viewport\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_world = (gd_api . godot_method_bind_get_method) (class_name , "find_world\0" . as_ptr () as * const c_char) ; table . find_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "find_world_2d\0" . as_ptr () as * const c_char) ; table . get_camera = (gd_api . godot_method_bind_get_method) (class_name , "get_camera\0" . as_ptr () as * const c_char) ; table . get_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_transform\0" . as_ptr () as * const c_char) ; table . get_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_clear_mode\0" . as_ptr () as * const c_char) ; table . get_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_draw\0" . as_ptr () as * const c_char) ; table . get_final_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_final_transform\0" . as_ptr () as * const c_char) ; table . get_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . get_hdr = (gd_api . godot_method_bind_get_method) (class_name , "get_hdr\0" . as_ptr () as * const c_char) ; table . get_keep_3d_linear = (gd_api . godot_method_bind_get_method) (class_name , "get_keep_3d_linear\0" . as_ptr () as * const c_char) ; table . get_modal_stack_top = (gd_api . godot_method_bind_get_method) (class_name , "get_modal_stack_top\0" . as_ptr () as * const c_char) ; table . get_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_position\0" . as_ptr () as * const c_char) ; table . get_msaa = (gd_api . godot_method_bind_get_method) (class_name , "get_msaa\0" . as_ptr () as * const c_char) ; table . get_physics_object_picking = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_object_picking\0" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\0" . as_ptr () as * const c_char) ; table . get_shadow_atlas_quadrant_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_atlas_quadrant_subdiv\0" . as_ptr () as * const c_char) ; table . get_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_size_override = (gd_api . godot_method_bind_get_method) (class_name , "get_size_override\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_update_mode\0" . as_ptr () as * const c_char) ; table . get_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_usage\0" . as_ptr () as * const c_char) ; table . get_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "get_use_debanding\0" . as_ptr () as * const c_char) ; table . get_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "get_use_fxaa\0" . as_ptr () as * const c_char) ; table . get_vflip = (gd_api . godot_method_bind_get_method) (class_name , "get_vflip\0" . as_ptr () as * const c_char) ; table . get_viewport_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_rid\0" . as_ptr () as * const c_char) ; table . get_visible_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_rect\0" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\0" . as_ptr () as * const c_char) ; table . get_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_world_2d\0" . as_ptr () as * const c_char) ; table . gui_get_drag_data = (gd_api . godot_method_bind_get_method) (class_name , "gui_get_drag_data\0" . as_ptr () as * const c_char) ; table . gui_has_modal_stack = (gd_api . godot_method_bind_get_method) (class_name , "gui_has_modal_stack\0" . as_ptr () as * const c_char) ; table . gui_is_dragging = (gd_api . godot_method_bind_get_method) (class_name , "gui_is_dragging\0" . as_ptr () as * const c_char) ; table . has_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "has_transparent_background\0" . as_ptr () as * const c_char) ; table . input = (gd_api . godot_method_bind_get_method) (class_name , "input\0" . as_ptr () as * const c_char) ; table . is_3d_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_3d_disabled\0" . as_ptr () as * const c_char) ; table . is_audio_listener = (gd_api . godot_method_bind_get_method) (class_name , "is_audio_listener\0" . as_ptr () as * const c_char) ; table . is_audio_listener_2d = (gd_api . godot_method_bind_get_method) (class_name , "is_audio_listener_2d\0" . as_ptr () as * const c_char) ; table . is_handling_input_locally = (gd_api . godot_method_bind_get_method) (class_name , "is_handling_input_locally\0" . as_ptr () as * const c_char) ; table . is_input_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_disabled\0" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\0" . as_ptr () as * const c_char) ; table . is_size_override_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_size_override_enabled\0" . as_ptr () as * const c_char) ; table . is_size_override_stretch_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_size_override_stretch_enabled\0" . as_ptr () as * const c_char) ; table . is_snap_controls_to_pixels_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_snap_controls_to_pixels_enabled\0" . as_ptr () as * const c_char) ; table . is_using_own_world = (gd_api . godot_method_bind_get_method) (class_name , "is_using_own_world\0" . as_ptr () as * const c_char) ; table . is_using_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_using_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . set_as_audio_listener = (gd_api . godot_method_bind_get_method) (class_name , "set_as_audio_listener\0" . as_ptr () as * const c_char) ; table . set_as_audio_listener_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_as_audio_listener_2d\0" . as_ptr () as * const c_char) ; table . set_attach_to_screen_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_attach_to_screen_rect\0" . as_ptr () as * const c_char) ; table . set_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_canvas_transform\0" . as_ptr () as * const c_char) ; table . set_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_mode\0" . as_ptr () as * const c_char) ; table . set_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_draw\0" . as_ptr () as * const c_char) ; table . set_disable_3d = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_3d\0" . as_ptr () as * const c_char) ; table . set_disable_input = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_input\0" . as_ptr () as * const c_char) ; table . set_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . set_handle_input_locally = (gd_api . godot_method_bind_get_method) (class_name , "set_handle_input_locally\0" . as_ptr () as * const c_char) ; table . set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_hdr\0" . as_ptr () as * const c_char) ; table . set_input_as_handled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_handled\0" . as_ptr () as * const c_char) ; table . set_keep_3d_linear = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_3d_linear\0" . as_ptr () as * const c_char) ; table . set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "set_msaa\0" . as_ptr () as * const c_char) ; table . set_physics_object_picking = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_object_picking\0" . as_ptr () as * const c_char) ; table . set_shadow_atlas_quadrant_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_atlas_quadrant_subdiv\0" . as_ptr () as * const c_char) ; table . set_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\0" . as_ptr () as * const c_char) ; table . set_size_override_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override_stretch\0" . as_ptr () as * const c_char) ; table . set_snap_controls_to_pixels = (gd_api . godot_method_bind_get_method) (class_name , "set_snap_controls_to_pixels\0" . as_ptr () as * const c_char) ; table . set_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "set_transparent_background\0" . as_ptr () as * const c_char) ; table . set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_update_mode\0" . as_ptr () as * const c_char) ; table . set_usage = (gd_api . godot_method_bind_get_method) (class_name , "set_usage\0" . as_ptr () as * const c_char) ; table . set_use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_arvr\0" . as_ptr () as * const c_char) ; table . set_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "set_use_debanding\0" . as_ptr () as * const c_char) ; table . set_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "set_use_fxaa\0" . as_ptr () as * const c_char) ; table . set_use_own_world = (gd_api . godot_method_bind_get_method) (class_name , "set_use_own_world\0" . as_ptr () as * const c_char) ; table . set_use_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "set_use_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "set_vflip\0" . as_ptr () as * const c_char) ; table . set_world = (gd_api . godot_method_bind_get_method) (class_name , "set_world\0" . as_ptr () as * const c_char) ; table . set_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_world_2d\0" . as_ptr () as * const c_char) ; table . unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "unhandled_input\0" . as_ptr () as * const c_char) ; table . update_worlds = (gd_api . godot_method_bind_get_method) (class_name , "update_worlds\0" . as_ptr () as * const c_char) ; table . use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "use_arvr\0" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:430:7452 [INFO] [stdout] | [INFO] [stdout] 430 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 430 | # [doc = "`core class World` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_world.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWorld inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct World { this : RawObject < Self > , } impl World { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WorldMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Direct access to the world's physics 3D space state. Used for querying current and potential collisions. Must only be accessed from within `_physics_process(delta)`."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_direct_space_state :: PhysicsDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The World's [Environment]."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The World's fallback_environment will be used if the World's [Environment] fails or is missing."] # [doc = ""] # [inline] pub fn fallback_environment (& self) -> Option < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_fallback_environment ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: environment :: Environment , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The World's visual scenario."] # [doc = ""] # [inline] pub fn scenario (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_scenario ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The World's physics space."] # [doc = ""] # [inline] pub fn space (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_space ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "The World's [Environment]."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } # [doc = "The World's fallback_environment will be used if the World's [Environment] fails or is missing."] # [doc = ""] # [inline] pub fn set_fallback_environment (& self , env : impl AsArg < crate :: generated :: environment :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_fallback_environment ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for World { } unsafe impl GodotObject for World { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World" } } impl std :: ops :: Deref for World { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for World { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for World { } unsafe impl SubClass < crate :: generated :: object :: Object > for World { } impl Instanciable for World { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { World :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WorldMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_direct_space_state : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_fallback_environment : * mut sys :: godot_method_bind , pub get_scenario : * mut sys :: godot_method_bind , pub get_space : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_fallback_environment : * mut sys :: godot_method_bind } impl WorldMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WorldMethodTable = WorldMethodTable { class_constructor : None , get_direct_space_state : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_fallback_environment : 0 as * mut sys :: godot_method_bind , get_scenario : 0 as * mut sys :: godot_method_bind , get_space : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_fallback_environment : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WorldMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "World\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_direct_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_direct_space_state\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_environment\0" . as_ptr () as * const c_char) ; table . get_scenario = (gd_api . godot_method_bind_get_method) (class_name , "get_scenario\0" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback_environment\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:436:4494 [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 PanoramaSky` inherits `Sky` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_panoramasky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPanoramaSky inherits methods from:\n - [Sky](struct.Sky.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PanoramaSky { this : RawObject < Self > , } impl PanoramaSky { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanoramaSkyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn panorama (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . get_panorama ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "[Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn set_panorama (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . set_panorama ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PanoramaSky { } unsafe impl GodotObject for PanoramaSky { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PanoramaSky" } } impl std :: ops :: Deref for PanoramaSky { type Target = crate :: generated :: sky :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanoramaSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sky :: Sky > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: object :: Object > for PanoramaSky { } impl Instanciable for PanoramaSky { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PanoramaSky :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanoramaSkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_panorama : * mut sys :: godot_method_bind , pub set_panorama : * mut sys :: godot_method_bind } impl PanoramaSkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanoramaSkyMethodTable = PanoramaSkyMethodTable { class_constructor : None , get_panorama : 0 as * mut sys :: godot_method_bind , set_panorama : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PanoramaSkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PanoramaSky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_panorama = (gd_api . godot_method_bind_get_method) (class_name , "get_panorama\0" . as_ptr () as * const c_char) ; table . set_panorama = (gd_api . godot_method_bind_get_method) (class_name , "set_panorama\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:442:28818 [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 singleton class AudioServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nAudioServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpeakerMode (pub i64) ; impl SpeakerMode { pub const MODE_STEREO : SpeakerMode = SpeakerMode (0i64) ; pub const SURROUND_31 : SpeakerMode = SpeakerMode (1i64) ; pub const SURROUND_51 : SpeakerMode = SpeakerMode (2i64) ; pub const SURROUND_71 : SpeakerMode = SpeakerMode (3i64) ; } impl From < i64 > for SpeakerMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpeakerMode > for i64 { # [inline] fn from (v : SpeakerMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioServer { pub const SPEAKER_MODE_STEREO : i64 = 0i64 ; pub const SPEAKER_SURROUND_31 : i64 = 1i64 ; pub const SPEAKER_SURROUND_51 : i64 = 2i64 ; pub const SPEAKER_SURROUND_71 : i64 = 3i64 ; } impl AudioServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("AudioServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a bus at `at_position`.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_bus (& self , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . add_bus ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , at_position) ; } } # [doc = "Adds an [AudioEffect] effect to the bus `bus_idx` at `at_position`.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_bus_effect (& self , bus_idx : i64 , effect : impl AsArg < crate :: generated :: audio_effect :: AudioEffect > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . add_bus_effect ; let ret = crate :: icalls :: icallptr_void_i64_obj_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect . as_arg_ptr () , at_position) ; } } # [doc = "Name of the current device for audio input (see [method capture_get_device_list])."] # [doc = ""] # [inline] pub fn capture_get_device (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_get_device ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the names of all audio input devices detected on the system."] # [doc = ""] # [inline] pub fn capture_get_device_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_get_device_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets which audio input device is used for audio capture."] # [doc = ""] # [inline] pub fn capture_set_device (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_set_device ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Generates an [AudioBusLayout] using the available buses and effects."] # [doc = ""] # [inline] pub fn generate_bus_layout (& self) -> Option < Ref < crate :: generated :: audio_bus_layout :: AudioBusLayout , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . generate_bus_layout ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_bus_layout :: AudioBusLayout , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the amount of channels of the bus at index `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_channels (& self , bus_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_channels ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Number of available audio buses."] # [doc = ""] # [inline] pub fn bus_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioEffect] at position `effect_idx` in bus `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_effect (& self , bus_idx : i64 , effect_idx : i64) -> Option < Ref < crate :: generated :: audio_effect :: AudioEffect , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_effect :: AudioEffect , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of effects on the bus at `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_effect_count (& self , bus_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect_count ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).\n# Default Arguments\n* `channel` - `0`"] # [doc = ""] # [inline] pub fn get_bus_effect_instance (& self , bus_idx : i64 , effect_idx : i64 , channel : i64) -> Option < Ref < crate :: generated :: audio_effect_instance :: AudioEffectInstance , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect_instance ; let ret = crate :: icalls :: icallptr_obj_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , channel) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_effect_instance :: AudioEffectInstance , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the index of the bus with the name `bus_name`."] # [doc = ""] # [inline] pub fn get_bus_index (& self , bus_name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_index ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bus_name . into ()) ; ret as _ } } # [doc = "Returns the name of the bus with the index `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_name (& self , bus_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the peak volume of the left speaker at bus index `bus_idx` and channel index `channel`."] # [doc = ""] # [inline] pub fn get_bus_peak_volume_left_db (& self , bus_idx : i64 , channel : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_peak_volume_left_db ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , channel) ; ret as _ } } # [doc = "Returns the peak volume of the right speaker at bus index `bus_idx` and channel index `channel`."] # [doc = ""] # [inline] pub fn get_bus_peak_volume_right_db (& self , bus_idx : i64 , channel : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_peak_volume_right_db ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , channel) ; ret as _ } } # [doc = "Returns the name of the bus that the bus at index `bus_idx` sends to."] # [doc = ""] # [inline] pub fn get_bus_send (& self , bus_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_send ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the volume of the bus at index `bus_idx` in dB."] # [doc = ""] # [inline] pub fn get_bus_volume_db (& self , bus_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_volume_db ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Name of the current device for audio output (see [method get_device_list])."] # [doc = ""] # [inline] pub fn device (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the names of all audio devices detected on the system."] # [doc = ""] # [inline] pub fn get_device_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_device_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played twice as fast)."] # [doc = ""] # [inline] pub fn global_rate_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_global_rate_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the sample rate at the output of the [AudioServer]."] # [doc = ""] # [inline] pub fn get_mix_rate (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_mix_rate ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the audio driver's output latency."] # [doc = ""] # [inline] pub fn get_output_latency (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_output_latency ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the speaker configuration."] # [doc = ""] # [inline] pub fn get_speaker_mode (& self) -> crate :: generated :: audio_server :: SpeakerMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_speaker_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_server :: SpeakerMode (ret) } } # [doc = "Returns the relative time since the last mix occurred."] # [doc = ""] # [inline] pub fn get_time_since_last_mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_time_since_last_mix ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the relative time until the next mix occurs."] # [doc = ""] # [inline] pub fn get_time_to_next_mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_time_to_next_mix ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the bus at index `bus_idx` is bypassing effects."] # [doc = ""] # [inline] pub fn is_bus_bypassing_effects (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_bypassing_effects ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "If `true`, the effect at index `effect_idx` on the bus at index `bus_idx` is enabled."] # [doc = ""] # [inline] pub fn is_bus_effect_enabled (& self , bus_idx : i64 , effect_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_effect_enabled ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; ret as _ } } # [doc = "If `true`, the bus at index `bus_idx` is muted."] # [doc = ""] # [inline] pub fn is_bus_mute (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_mute ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "If `true`, the bus at index `bus_idx` is in solo mode."] # [doc = ""] # [inline] pub fn is_bus_solo (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_solo ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx) ; ret as _ } } # [doc = "Locks the audio driver's main loop.\n**Note:** Remember to unlock it afterwards."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Moves the bus from index `index` to index `to_index`."] # [doc = ""] # [inline] pub fn move_bus (& self , index : i64 , to_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . move_bus ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , index , to_index) ; } } # [doc = "Removes the bus at index `index`."] # [doc = ""] # [inline] pub fn remove_bus (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . remove_bus ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Removes the effect at index `effect_idx` from the bus at index `bus_idx`."] # [doc = ""] # [inline] pub fn remove_bus_effect (& self , bus_idx : i64 , effect_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . remove_bus_effect ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx) ; } } # [doc = "If `true`, the bus at index `bus_idx` is bypassing effects."] # [doc = ""] # [inline] pub fn set_bus_bypass_effects (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_bypass_effects ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [doc = "Number of available audio buses."] # [doc = ""] # [inline] pub fn set_bus_count (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, the effect at index `effect_idx` on the bus at index `bus_idx` is enabled."] # [doc = ""] # [inline] pub fn set_bus_effect_enabled (& self , bus_idx : i64 , effect_idx : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_effect_enabled ; let ret = crate :: icalls :: icallptr_void_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , enabled) ; } } # [doc = "Overwrites the currently used [AudioBusLayout]."] # [doc = ""] # [inline] pub fn set_bus_layout (& self , bus_layout : impl AsArg < crate :: generated :: audio_bus_layout :: AudioBusLayout >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_layout ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , bus_layout . as_arg_ptr ()) ; } } # [doc = "If `true`, the bus at index `bus_idx` is muted."] # [doc = ""] # [inline] pub fn set_bus_mute (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_mute ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [doc = "Sets the name of the bus at index `bus_idx` to `name`."] # [doc = ""] # [inline] pub fn set_bus_name (& self , bus_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_name ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx , name . into ()) ; } } # [doc = "Connects the output of the bus at `bus_idx` to the bus named `send`."] # [doc = ""] # [inline] pub fn set_bus_send (& self , bus_idx : i64 , send : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_send ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx , send . into ()) ; } } # [doc = "If `true`, the bus at index `bus_idx` is in solo mode."] # [doc = ""] # [inline] pub fn set_bus_solo (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_solo ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx , enable) ; } } # [doc = "Sets the volume of the bus at index `bus_idx` to `volume_db`."] # [doc = ""] # [inline] pub fn set_bus_volume_db (& self , bus_idx : i64 , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_volume_db ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , bus_idx , volume_db) ; } } # [doc = "Name of the current device for audio output (see [method get_device_list])."] # [doc = ""] # [inline] pub fn set_device (& self , device : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , device . into ()) ; } } # [doc = "Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played twice as fast)."] # [doc = ""] # [inline] pub fn set_global_rate_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_global_rate_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Swaps the position of two effects in bus `bus_idx`."] # [doc = ""] # [inline] pub fn swap_bus_effects (& self , bus_idx : i64 , effect_idx : i64 , by_effect_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . swap_bus_effects ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx , effect_idx , by_effect_idx) ; } } # [doc = "Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)"] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioServer { } unsafe impl GodotObject for AudioServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioServer" } } impl std :: ops :: Deref for AudioServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioServer { } unsafe impl Send for AudioServer { } unsafe impl Sync for AudioServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bus : * mut sys :: godot_method_bind , pub add_bus_effect : * mut sys :: godot_method_bind , pub capture_get_device : * mut sys :: godot_method_bind , pub capture_get_device_list : * mut sys :: godot_method_bind , pub capture_set_device : * mut sys :: godot_method_bind , pub generate_bus_layout : * mut sys :: godot_method_bind , pub get_bus_channels : * mut sys :: godot_method_bind , pub get_bus_count : * mut sys :: godot_method_bind , pub get_bus_effect : * mut sys :: godot_method_bind , pub get_bus_effect_count : * mut sys :: godot_method_bind , pub get_bus_effect_instance : * mut sys :: godot_method_bind , pub get_bus_index : * mut sys :: godot_method_bind , pub get_bus_name : * mut sys :: godot_method_bind , pub get_bus_peak_volume_left_db : * mut sys :: godot_method_bind , pub get_bus_peak_volume_right_db : * mut sys :: godot_method_bind , pub get_bus_send : * mut sys :: godot_method_bind , pub get_bus_volume_db : * mut sys :: godot_method_bind , pub get_device : * mut sys :: godot_method_bind , pub get_device_list : * mut sys :: godot_method_bind , pub get_global_rate_scale : * mut sys :: godot_method_bind , pub get_mix_rate : * mut sys :: godot_method_bind , pub get_output_latency : * mut sys :: godot_method_bind , pub get_speaker_mode : * mut sys :: godot_method_bind , pub get_time_since_last_mix : * mut sys :: godot_method_bind , pub get_time_to_next_mix : * mut sys :: godot_method_bind , pub is_bus_bypassing_effects : * mut sys :: godot_method_bind , pub is_bus_effect_enabled : * mut sys :: godot_method_bind , pub is_bus_mute : * mut sys :: godot_method_bind , pub is_bus_solo : * mut sys :: godot_method_bind , pub lock : * mut sys :: godot_method_bind , pub move_bus : * mut sys :: godot_method_bind , pub remove_bus : * mut sys :: godot_method_bind , pub remove_bus_effect : * mut sys :: godot_method_bind , pub set_bus_bypass_effects : * mut sys :: godot_method_bind , pub set_bus_count : * mut sys :: godot_method_bind , pub set_bus_effect_enabled : * mut sys :: godot_method_bind , pub set_bus_layout : * mut sys :: godot_method_bind , pub set_bus_mute : * mut sys :: godot_method_bind , pub set_bus_name : * mut sys :: godot_method_bind , pub set_bus_send : * mut sys :: godot_method_bind , pub set_bus_solo : * mut sys :: godot_method_bind , pub set_bus_volume_db : * mut sys :: godot_method_bind , pub set_device : * mut sys :: godot_method_bind , pub set_global_rate_scale : * mut sys :: godot_method_bind , pub swap_bus_effects : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl AudioServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioServerMethodTable = AudioServerMethodTable { class_constructor : None , add_bus : 0 as * mut sys :: godot_method_bind , add_bus_effect : 0 as * mut sys :: godot_method_bind , capture_get_device : 0 as * mut sys :: godot_method_bind , capture_get_device_list : 0 as * mut sys :: godot_method_bind , capture_set_device : 0 as * mut sys :: godot_method_bind , generate_bus_layout : 0 as * mut sys :: godot_method_bind , get_bus_channels : 0 as * mut sys :: godot_method_bind , get_bus_count : 0 as * mut sys :: godot_method_bind , get_bus_effect : 0 as * mut sys :: godot_method_bind , get_bus_effect_count : 0 as * mut sys :: godot_method_bind , get_bus_effect_instance : 0 as * mut sys :: godot_method_bind , get_bus_index : 0 as * mut sys :: godot_method_bind , get_bus_name : 0 as * mut sys :: godot_method_bind , get_bus_peak_volume_left_db : 0 as * mut sys :: godot_method_bind , get_bus_peak_volume_right_db : 0 as * mut sys :: godot_method_bind , get_bus_send : 0 as * mut sys :: godot_method_bind , get_bus_volume_db : 0 as * mut sys :: godot_method_bind , get_device : 0 as * mut sys :: godot_method_bind , get_device_list : 0 as * mut sys :: godot_method_bind , get_global_rate_scale : 0 as * mut sys :: godot_method_bind , get_mix_rate : 0 as * mut sys :: godot_method_bind , get_output_latency : 0 as * mut sys :: godot_method_bind , get_speaker_mode : 0 as * mut sys :: godot_method_bind , get_time_since_last_mix : 0 as * mut sys :: godot_method_bind , get_time_to_next_mix : 0 as * mut sys :: godot_method_bind , is_bus_bypassing_effects : 0 as * mut sys :: godot_method_bind , is_bus_effect_enabled : 0 as * mut sys :: godot_method_bind , is_bus_mute : 0 as * mut sys :: godot_method_bind , is_bus_solo : 0 as * mut sys :: godot_method_bind , lock : 0 as * mut sys :: godot_method_bind , move_bus : 0 as * mut sys :: godot_method_bind , remove_bus : 0 as * mut sys :: godot_method_bind , remove_bus_effect : 0 as * mut sys :: godot_method_bind , set_bus_bypass_effects : 0 as * mut sys :: godot_method_bind , set_bus_count : 0 as * mut sys :: godot_method_bind , set_bus_effect_enabled : 0 as * mut sys :: godot_method_bind , set_bus_layout : 0 as * mut sys :: godot_method_bind , set_bus_mute : 0 as * mut sys :: godot_method_bind , set_bus_name : 0 as * mut sys :: godot_method_bind , set_bus_send : 0 as * mut sys :: godot_method_bind , set_bus_solo : 0 as * mut sys :: godot_method_bind , set_bus_volume_db : 0 as * mut sys :: godot_method_bind , set_device : 0 as * mut sys :: godot_method_bind , set_global_rate_scale : 0 as * mut sys :: godot_method_bind , swap_bus_effects : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bus = (gd_api . godot_method_bind_get_method) (class_name , "add_bus\0" . as_ptr () as * const c_char) ; table . add_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "add_bus_effect\0" . as_ptr () as * const c_char) ; table . capture_get_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_get_device\0" . as_ptr () as * const c_char) ; table . capture_get_device_list = (gd_api . godot_method_bind_get_method) (class_name , "capture_get_device_list\0" . as_ptr () as * const c_char) ; table . capture_set_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_set_device\0" . as_ptr () as * const c_char) ; table . generate_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "generate_bus_layout\0" . as_ptr () as * const c_char) ; table . get_bus_channels = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_channels\0" . as_ptr () as * const c_char) ; table . get_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_count\0" . as_ptr () as * const c_char) ; table . get_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect\0" . as_ptr () as * const c_char) ; table . get_bus_effect_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect_count\0" . as_ptr () as * const c_char) ; table . get_bus_effect_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect_instance\0" . as_ptr () as * const c_char) ; table . get_bus_index = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_index\0" . as_ptr () as * const c_char) ; table . get_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_name\0" . as_ptr () as * const c_char) ; table . get_bus_peak_volume_left_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_peak_volume_left_db\0" . as_ptr () as * const c_char) ; table . get_bus_peak_volume_right_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_peak_volume_right_db\0" . as_ptr () as * const c_char) ; table . get_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_send\0" . as_ptr () as * const c_char) ; table . get_bus_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_volume_db\0" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\0" . as_ptr () as * const c_char) ; table . get_device_list = (gd_api . godot_method_bind_get_method) (class_name , "get_device_list\0" . as_ptr () as * const c_char) ; table . get_global_rate_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rate_scale\0" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\0" . as_ptr () as * const c_char) ; table . get_output_latency = (gd_api . godot_method_bind_get_method) (class_name , "get_output_latency\0" . as_ptr () as * const c_char) ; table . get_speaker_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_speaker_mode\0" . as_ptr () as * const c_char) ; table . get_time_since_last_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_time_since_last_mix\0" . as_ptr () as * const c_char) ; table . get_time_to_next_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_time_to_next_mix\0" . as_ptr () as * const c_char) ; table . is_bus_bypassing_effects = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_bypassing_effects\0" . as_ptr () as * const c_char) ; table . is_bus_effect_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_effect_enabled\0" . as_ptr () as * const c_char) ; table . is_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_mute\0" . as_ptr () as * const c_char) ; table . is_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_solo\0" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . move_bus = (gd_api . godot_method_bind_get_method) (class_name , "move_bus\0" . as_ptr () as * const c_char) ; table . remove_bus = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus\0" . as_ptr () as * const c_char) ; table . remove_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus_effect\0" . as_ptr () as * const c_char) ; table . set_bus_bypass_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_bypass_effects\0" . as_ptr () as * const c_char) ; table . set_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_count\0" . as_ptr () as * const c_char) ; table . set_bus_effect_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_effect_enabled\0" . as_ptr () as * const c_char) ; table . set_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_layout\0" . as_ptr () as * const c_char) ; table . set_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_mute\0" . as_ptr () as * const c_char) ; table . set_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_name\0" . as_ptr () as * const c_char) ; table . set_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_send\0" . as_ptr () as * const c_char) ; table . set_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_solo\0" . as_ptr () as * const c_char) ; table . set_bus_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_volume_db\0" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\0" . as_ptr () as * const c_char) ; table . set_global_rate_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rate_scale\0" . as_ptr () as * const c_char) ; table . swap_bus_effects = (gd_api . godot_method_bind_get_method) (class_name , "swap_bus_effects\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:448:5076 [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 RayShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_rayshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRayShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayShape { this : RawObject < Self > , } impl RayShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn slips_on_slope (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . get_slips_on_slope ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn set_slips_on_slope (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . set_slips_on_slope ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayShape { } unsafe impl GodotObject for RayShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RayShape" } } impl std :: ops :: Deref for RayShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for RayShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RayShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RayShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayShape { } impl Instanciable for RayShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RayShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_length : * mut sys :: godot_method_bind , pub get_slips_on_slope : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_slips_on_slope : * mut sys :: godot_method_bind } impl RayShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayShapeMethodTable = RayShapeMethodTable { class_constructor : None , get_length : 0 as * mut sys :: godot_method_bind , get_slips_on_slope : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_slips_on_slope : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RayShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "get_slips_on_slope\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "set_slips_on_slope\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:454:9922 [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 Texture` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTexture inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Texture { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : Flags = Flags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : Flags = Flags (8i64) ; pub const FLAG_CONVERT_TO_LINEAR : Flags = Flags (16i64) ; pub const FLAG_MIRRORED_REPEAT : Flags = Flags (32i64) ; pub const FLAG_VIDEO_SURFACE : Flags = Flags (2048i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Texture { pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const FLAG_VIDEO_SURFACE : i64 = 2048i64 ; } impl Texture { # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified `position`. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at `position` and the size of this [Texture].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw (& self , canvas_item : Rid , position : Vector2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_rid_vec2_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , position , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_rect (& self , canvas_item : Rid , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect ; let ret = crate :: icalls :: icallptr_void_rid_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , tile , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`\n* `clip_uv` - `true`"] # [doc = ""] # [inline] pub fn draw_rect_region (& self , canvas_item : Rid , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect_region ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , src_rect , modulate , transpose , normal_map . as_arg_ptr () , clip_uv) ; } } # [doc = "Returns an [Image] that is a copy of data from this [Texture]. [Image]s can be accessed and manipulated directly."] # [doc = ""] # [inline] pub fn get_data (& self) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the texture height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the texture size."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the texture width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this [Texture] has an alpha channel."] # [doc = ""] # [inline] pub fn has_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . has_alpha ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture { } unsafe impl GodotObject for Texture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture" } } impl std :: ops :: Deref for Texture { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Texture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Texture { } unsafe impl SubClass < crate :: generated :: object :: Object > for Texture { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub draw_rect : * mut sys :: godot_method_bind , pub draw_rect_region : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_flags : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub has_alpha : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind } impl TextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureMethodTable = TextureMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , draw_rect : 0 as * mut sys :: godot_method_bind , draw_rect_region : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_flags : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , has_alpha : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Texture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\0" . as_ptr () as * const c_char) ; table . draw_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect_region\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_alpha = (gd_api . godot_method_bind_get_method) (class_name , "has_alpha\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:466:4144 [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 CSGPrimitive` inherits `CSGShape` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgprimitive.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCSGPrimitive inherits methods from:\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGPrimitive { this : RawObject < Self > , } impl CSGPrimitive { # [doc = ""] # [doc = ""] # [inline] pub fn is_inverting_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPrimitiveMethodTable :: get (get_api ()) . is_inverting_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_invert_faces (& self , invert_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPrimitiveMethodTable :: get (get_api ()) . set_invert_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert_faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPrimitive { } unsafe impl GodotObject for CSGPrimitive { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGPrimitive" } } impl QueueFree for CSGPrimitive { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGPrimitive { type Target = crate :: generated :: csg_shape :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPrimitive { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGPrimitive { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGPrimitiveMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_inverting_faces : * mut sys :: godot_method_bind , pub set_invert_faces : * mut sys :: godot_method_bind } impl CSGPrimitiveMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGPrimitiveMethodTable = CSGPrimitiveMethodTable { class_constructor : None , is_inverting_faces : 0 as * mut sys :: godot_method_bind , set_invert_faces : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CSGPrimitiveMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGPrimitive\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_inverting_faces = (gd_api . godot_method_bind_get_method) (class_name , "is_inverting_faces\0" . as_ptr () as * const c_char) ; table . set_invert_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_faces\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:472:13632 [INFO] [stdout] | [INFO] [stdout] 472 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 472 | # [doc = "`core class MeshLibrary` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_meshlibrary.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshLibrary inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshLibrary { this : RawObject < Self > , } impl MeshLibrary { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshLibraryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the library."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a new item in the library with the given ID.\nYou can get an unused ID from [method get_last_unused_item_id]."] # [doc = ""] # [inline] pub fn create_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . create_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Returns the first item with the given name."] # [doc = ""] # [inline] pub fn find_item_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . find_item_by_name ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the list of item IDs in use."] # [doc = ""] # [inline] pub fn get_item_list (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_list ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the item's mesh."] # [doc = ""] # [inline] pub fn get_item_mesh (& self , id : i64) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_mesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the item's name."] # [doc = ""] # [inline] pub fn get_item_name (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh (& self , id : i64) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the transform applied to the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh_transform (& self , id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh_transform ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture] if no preview was manually set in a running project."] # [doc = ""] # [inline] pub fn get_item_preview (& self , id : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_preview ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an item's collision shapes.\nThe array consists of each [Shape] followed by its [Transform]."] # [doc = ""] # [inline] pub fn get_item_shapes (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an unused ID for a new item."] # [doc = ""] # [inline] pub fn get_last_unused_item_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_last_unused_item_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes the item."] # [doc = ""] # [inline] pub fn remove_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the item's mesh."] # [doc = ""] # [inline] pub fn set_item_mesh (& self , id : i64 , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_mesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , mesh . as_arg_ptr ()) ; } } # [doc = "Sets the item's name.\nThis name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]."] # [doc = ""] # [inline] pub fn set_item_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_name ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , name . into ()) ; } } # [doc = "Sets the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh (& self , id : i64 , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , navmesh . as_arg_ptr ()) ; } } # [doc = "Sets the transform to apply to the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh_transform (& self , id : i64 , navmesh : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , id , navmesh) ; } } # [doc = "Sets a texture to use as the item's preview icon in the editor."] # [doc = ""] # [inline] pub fn set_item_preview (& self , id : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_preview ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , texture . as_arg_ptr ()) ; } } # [doc = "Sets an item's collision shapes.\nThe array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]."] # [doc = ""] # [inline] pub fn set_item_shapes (& self , id : i64 , shapes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_shapes ; let ret = crate :: icalls :: icallptr_void_i64_arr (method_bind , self . this . sys () . as_ptr () , id , shapes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshLibrary { } unsafe impl GodotObject for MeshLibrary { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshLibrary" } } impl std :: ops :: Deref for MeshLibrary { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshLibrary { } impl Instanciable for MeshLibrary { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MeshLibrary :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshLibraryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub create_item : * mut sys :: godot_method_bind , pub find_item_by_name : * mut sys :: godot_method_bind , pub get_item_list : * mut sys :: godot_method_bind , pub get_item_mesh : * mut sys :: godot_method_bind , pub get_item_name : * mut sys :: godot_method_bind , pub get_item_navmesh : * mut sys :: godot_method_bind , pub get_item_navmesh_transform : * mut sys :: godot_method_bind , pub get_item_preview : * mut sys :: godot_method_bind , pub get_item_shapes : * mut sys :: godot_method_bind , pub get_last_unused_item_id : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub set_item_mesh : * mut sys :: godot_method_bind , pub set_item_name : * mut sys :: godot_method_bind , pub set_item_navmesh : * mut sys :: godot_method_bind , pub set_item_navmesh_transform : * mut sys :: godot_method_bind , pub set_item_preview : * mut sys :: godot_method_bind , pub set_item_shapes : * mut sys :: godot_method_bind } impl MeshLibraryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshLibraryMethodTable = MeshLibraryMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , create_item : 0 as * mut sys :: godot_method_bind , find_item_by_name : 0 as * mut sys :: godot_method_bind , get_item_list : 0 as * mut sys :: godot_method_bind , get_item_mesh : 0 as * mut sys :: godot_method_bind , get_item_name : 0 as * mut sys :: godot_method_bind , get_item_navmesh : 0 as * mut sys :: godot_method_bind , get_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , get_item_preview : 0 as * mut sys :: godot_method_bind , get_item_shapes : 0 as * mut sys :: godot_method_bind , get_last_unused_item_id : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , set_item_mesh : 0 as * mut sys :: godot_method_bind , set_item_name : 0 as * mut sys :: godot_method_bind , set_item_navmesh : 0 as * mut sys :: godot_method_bind , set_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , set_item_preview : 0 as * mut sys :: godot_method_bind , set_item_shapes : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MeshLibraryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshLibrary\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\0" . as_ptr () as * const c_char) ; table . find_item_by_name = (gd_api . godot_method_bind_get_method) (class_name , "find_item_by_name\0" . as_ptr () as * const c_char) ; table . get_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_item_list\0" . as_ptr () as * const c_char) ; table . get_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh\0" . as_ptr () as * const c_char) ; table . get_item_name = (gd_api . godot_method_bind_get_method) (class_name , "get_item_name\0" . as_ptr () as * const c_char) ; table . get_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh\0" . as_ptr () as * const c_char) ; table . get_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . get_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_item_preview\0" . as_ptr () as * const c_char) ; table . get_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shapes\0" . as_ptr () as * const c_char) ; table . get_last_unused_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_last_unused_item_id\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . set_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh\0" . as_ptr () as * const c_char) ; table . set_item_name = (gd_api . godot_method_bind_get_method) (class_name , "set_item_name\0" . as_ptr () as * const c_char) ; table . set_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh\0" . as_ptr () as * const c_char) ; table . set_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . set_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_item_preview\0" . as_ptr () as * const c_char) ; table . set_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shapes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:478:6196 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:484:4444 [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 AudioEffectSpectrumAnalyzerInstance` inherits `AudioEffectInstance` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectspectrumanalyzerinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectSpectrumAnalyzerInstance inherits methods from:\n - [AudioEffectInstance](struct.AudioEffectInstance.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectSpectrumAnalyzerInstance { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MagnitudeMode (pub i64) ; impl MagnitudeMode { pub const AVERAGE : MagnitudeMode = MagnitudeMode (0i64) ; pub const MAX : MagnitudeMode = MagnitudeMode (1i64) ; } impl From < i64 > for MagnitudeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MagnitudeMode > for i64 { # [inline] fn from (v : MagnitudeMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectSpectrumAnalyzerInstance { pub const MAGNITUDE_AVERAGE : i64 = 0i64 ; pub const MAGNITUDE_MAX : i64 = 1i64 ; } impl AudioEffectSpectrumAnalyzerInstance { # [doc = "\n# Default Arguments\n* `mode` - `1`"] # [doc = ""] # [inline] pub fn get_magnitude_for_frequency_range (& self , from_hz : f64 , to_hz : f64 , mode : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerInstanceMethodTable :: get (get_api ()) . get_magnitude_for_frequency_range ; let ret = crate :: icalls :: icallptr_vec2_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , from_hz , to_hz , mode) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectSpectrumAnalyzerInstance { } unsafe impl GodotObject for AudioEffectSpectrumAnalyzerInstance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectSpectrumAnalyzerInstance" } } impl std :: ops :: Deref for AudioEffectSpectrumAnalyzerInstance { type Target = crate :: generated :: audio_effect_instance :: AudioEffectInstance ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_instance :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectSpectrumAnalyzerInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_instance :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_instance :: AudioEffectInstance > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectSpectrumAnalyzerInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectSpectrumAnalyzerInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_magnitude_for_frequency_range : * mut sys :: godot_method_bind } impl AudioEffectSpectrumAnalyzerInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectSpectrumAnalyzerInstanceMethodTable = AudioEffectSpectrumAnalyzerInstanceMethodTable { class_constructor : None , get_magnitude_for_frequency_range : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectSpectrumAnalyzerInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectSpectrumAnalyzerInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_magnitude_for_frequency_range = (gd_api . godot_method_bind_get_method) (class_name , "get_magnitude_for_frequency_range\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:490:16432 [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 = "`tools class EditorFileDialog` inherits `ConfirmationDialog` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorfiledialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileDialog inherits methods from:\n - [ConfirmationDialog](struct.ConfirmationDialog.html)\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileDialog { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Access (pub i64) ; impl Access { pub const RESOURCES : Access = Access (0i64) ; pub const USERDATA : Access = Access (1i64) ; pub const FILESYSTEM : Access = Access (2i64) ; } impl From < i64 > for Access { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Access > for i64 { # [inline] fn from (v : Access) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DisplayMode (pub i64) ; impl DisplayMode { pub const THUMBNAILS : DisplayMode = DisplayMode (0i64) ; pub const LIST : DisplayMode = DisplayMode (1i64) ; } impl From < i64 > for DisplayMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DisplayMode > for i64 { # [inline] fn from (v : DisplayMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const OPEN_FILE : Mode = Mode (0i64) ; pub const OPEN_FILES : Mode = Mode (1i64) ; pub const OPEN_DIR : Mode = Mode (2i64) ; pub const OPEN_ANY : Mode = Mode (3i64) ; pub const SAVE_FILE : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorFileDialog { pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const DISPLAY_LIST : i64 = 1i64 ; pub const DISPLAY_THUMBNAILS : i64 = 0i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; pub const MODE_SAVE_FILE : i64 = 4i64 ; } impl EditorFileDialog { # [doc = "Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label.\nFor example, `\"*.tscn, *.scn; Scenes\"` results in filter text \"Scenes (*.tscn, *.scn)\"."] # [doc = ""] # [inline] pub fn add_filter (& self , filter : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . add_filter ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , filter . into ()) ; } } # [doc = "Removes all filters except for \"All Files (*)\"."] # [doc = ""] # [inline] pub fn clear_filters (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . clear_filters ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The location from which the user may select a file, including `res://`, `user://`, and the local file system."] # [doc = ""] # [inline] pub fn access (& self) -> crate :: generated :: editor_file_dialog :: Access { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_access ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: Access (ret) } } # [doc = "The currently occupied directory."] # [doc = ""] # [inline] pub fn current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The currently selected file."] # [doc = ""] # [inline] pub fn current_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The file system path in the address bar."] # [doc = ""] # [inline] pub fn current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The view format in which the [EditorFileDialog] displays resources to the user."] # [doc = ""] # [inline] pub fn display_mode (& self) -> crate :: generated :: editor_file_dialog :: DisplayMode { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_display_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: DisplayMode (ret) } } # [doc = "The purpose of the [EditorFileDialog], which defines the allowed behaviors."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: editor_file_dialog :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: editor_file_dialog :: Mode (ret) } } # [doc = "Returns the `VBoxContainer` used to display the file system."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vbox_container :: VBoxContainer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update."] # [doc = ""] # [inline] pub fn invalidate (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . invalidate ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [EditorFileDialog] will not warn the user before overwriting files."] # [doc = ""] # [inline] pub fn is_overwrite_warning_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . is_overwrite_warning_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, hidden files and directories will be visible in the [EditorFileDialog]."] # [doc = ""] # [inline] pub fn is_showing_hidden_files (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . is_showing_hidden_files ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The location from which the user may select a file, including `res://`, `user://`, and the local file system."] # [doc = ""] # [inline] pub fn set_access (& self , access : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_access ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , access) ; } } # [doc = "The currently occupied directory."] # [doc = ""] # [inline] pub fn set_current_dir (& self , dir : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_dir ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , dir . into ()) ; } } # [doc = "The currently selected file."] # [doc = ""] # [inline] pub fn set_current_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "The file system path in the address bar."] # [doc = ""] # [inline] pub fn set_current_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the [EditorFileDialog] will not warn the user before overwriting files."] # [doc = ""] # [inline] pub fn set_disable_overwrite_warning (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_disable_overwrite_warning ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disable) ; } } # [doc = "The view format in which the [EditorFileDialog] displays resources to the user."] # [doc = ""] # [inline] pub fn set_display_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_display_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The purpose of the [EditorFileDialog], which defines the allowed behaviors."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, hidden files and directories will be visible in the [EditorFileDialog]."] # [doc = ""] # [inline] pub fn set_show_hidden_files (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_show_hidden_files ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileDialog { } unsafe impl GodotObject for EditorFileDialog { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileDialog" } } impl QueueFree for EditorFileDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorFileDialog { type Target = crate :: generated :: confirmation_dialog :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: confirmation_dialog :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: confirmation_dialog :: ConfirmationDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: accept_dialog :: AcceptDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: window_dialog :: WindowDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: popup :: Popup > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorFileDialog { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_filter : * mut sys :: godot_method_bind , pub clear_filters : * mut sys :: godot_method_bind , pub get_access : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_file : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_display_mode : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_vbox : * mut sys :: godot_method_bind , pub invalidate : * mut sys :: godot_method_bind , pub is_overwrite_warning_disabled : * mut sys :: godot_method_bind , pub is_showing_hidden_files : * mut sys :: godot_method_bind , pub set_access : * mut sys :: godot_method_bind , pub set_current_dir : * mut sys :: godot_method_bind , pub set_current_file : * mut sys :: godot_method_bind , pub set_current_path : * mut sys :: godot_method_bind , pub set_disable_overwrite_warning : * mut sys :: godot_method_bind , pub set_display_mode : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_show_hidden_files : * mut sys :: godot_method_bind } impl EditorFileDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileDialogMethodTable = EditorFileDialogMethodTable { class_constructor : None , add_filter : 0 as * mut sys :: godot_method_bind , clear_filters : 0 as * mut sys :: godot_method_bind , get_access : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_file : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_display_mode : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_vbox : 0 as * mut sys :: godot_method_bind , invalidate : 0 as * mut sys :: godot_method_bind , is_overwrite_warning_disabled : 0 as * mut sys :: godot_method_bind , is_showing_hidden_files : 0 as * mut sys :: godot_method_bind , set_access : 0 as * mut sys :: godot_method_bind , set_current_dir : 0 as * mut sys :: godot_method_bind , set_current_file : 0 as * mut sys :: godot_method_bind , set_current_path : 0 as * mut sys :: godot_method_bind , set_disable_overwrite_warning : 0 as * mut sys :: godot_method_bind , set_display_mode : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_show_hidden_files : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorFileDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_filter = (gd_api . godot_method_bind_get_method) (class_name , "add_filter\0" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\0" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_display_mode\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\0" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\0" . as_ptr () as * const c_char) ; table . is_overwrite_warning_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_overwrite_warning_disabled\0" . as_ptr () as * const c_char) ; table . is_showing_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "is_showing_hidden_files\0" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\0" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\0" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\0" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\0" . as_ptr () as * const c_char) ; table . set_disable_overwrite_warning = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_overwrite_warning\0" . as_ptr () as * const c_char) ; table . set_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_display_mode\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_show_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "set_show_hidden_files\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:496:25426 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:502:4565 [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 VisualScriptEmitSignal` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptemitsignal.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptEmitSignal inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEmitSignal { this : RawObject < Self > , } impl VisualScriptEmitSignal { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptEmitSignalMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn signal (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEmitSignalMethodTable :: get (get_api ()) . get_signal ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEmitSignalMethodTable :: get (get_api ()) . set_signal ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEmitSignal { } unsafe impl GodotObject for VisualScriptEmitSignal { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptEmitSignal" } } impl std :: ops :: Deref for VisualScriptEmitSignal { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEmitSignal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEmitSignal { } impl Instanciable for VisualScriptEmitSignal { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptEmitSignal :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEmitSignalMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_signal : * mut sys :: godot_method_bind , pub set_signal : * mut sys :: godot_method_bind } impl VisualScriptEmitSignalMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEmitSignalMethodTable = VisualScriptEmitSignalMethodTable { class_constructor : None , get_signal : 0 as * mut sys :: godot_method_bind , set_signal : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptEmitSignalMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptEmitSignal\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_signal\0" . as_ptr () as * const c_char) ; table . set_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_signal\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:508:4190 [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 VisualShaderNodeUniform` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeUniform inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeUniform { this : RawObject < Self > , } impl VisualShaderNodeUniform { # [doc = "Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties."] # [doc = ""] # [inline] pub fn uniform_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformMethodTable :: get (get_api ()) . get_uniform_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties."] # [doc = ""] # [inline] pub fn set_uniform_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformMethodTable :: get (get_api ()) . set_uniform_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeUniform { } unsafe impl GodotObject for VisualShaderNodeUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeUniform" } } impl std :: ops :: Deref for VisualShaderNodeUniform { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeUniform { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_uniform_name : * mut sys :: godot_method_bind , pub set_uniform_name : * mut sys :: godot_method_bind } impl VisualShaderNodeUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeUniformMethodTable = VisualShaderNodeUniformMethodTable { class_constructor : None , get_uniform_name : 0 as * mut sys :: godot_method_bind , set_uniform_name : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeUniform\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:514:10770 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:520:9547 [INFO] [stdout] | [INFO] [stdout] 520 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 520 | # [doc = "`core class ImageTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_imagetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nImageTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ImageTexture { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Storage (pub i64) ; impl Storage { pub const RAW : Storage = Storage (0i64) ; pub const COMPRESS_LOSSY : Storage = Storage (1i64) ; pub const COMPRESS_LOSSLESS : Storage = Storage (2i64) ; } impl From < i64 > for Storage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Storage > for i64 { # [inline] fn from (v : Storage) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ImageTexture { pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const STORAGE_RAW : i64 = 0i64 ; } impl ImageTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ImageTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Create a new [ImageTexture] with `width` and `height`.\n`format` is a value from [enum Image.Format], `flags` is any combination of [enum Texture.Flags].\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , format : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , format , flags) ; } } # [doc = "Create a new [ImageTexture] from an [Image] with `flags` from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn create_from_image (& self , image : impl AsArg < crate :: generated :: image :: Image > , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . create_from_image ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags) ; } } # [doc = "Returns the format of the [ImageTexture], one of [enum Image.Format]."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [doc = "The storage quality for [constant STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn lossy_storage_quality (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_lossy_storage_quality ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The storage type (raw, lossy, or compressed)."] # [doc = ""] # [inline] pub fn storage (& self) -> crate :: generated :: image_texture :: Storage { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_storage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image_texture :: Storage (ret) } } # [doc = "Load an [ImageTexture] from a file path."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sets the [Image] of this [ImageTexture]."] # [doc = ""] # [inline] pub fn set_data (& self , image : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr ()) ; } } # [doc = "The storage quality for [constant STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn set_lossy_storage_quality (& self , quality : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_lossy_storage_quality ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , quality) ; } } # [doc = "Resizes the [ImageTexture] to the specified dimensions."] # [doc = ""] # [inline] pub fn set_size_override (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_size_override ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The storage type (raw, lossy, or compressed)."] # [doc = ""] # [inline] pub fn set_storage (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_storage ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ImageTexture { } unsafe impl GodotObject for ImageTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ImageTexture" } } impl std :: ops :: Deref for ImageTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ImageTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ImageTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ImageTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ImageTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ImageTexture { } impl Instanciable for ImageTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ImageTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ImageTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind , pub create_from_image : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_lossy_storage_quality : * mut sys :: godot_method_bind , pub get_storage : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_lossy_storage_quality : * mut sys :: godot_method_bind , pub set_size_override : * mut sys :: godot_method_bind , pub set_storage : * mut sys :: godot_method_bind } impl ImageTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ImageTextureMethodTable = ImageTextureMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind , create_from_image : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , get_storage : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , set_size_override : 0 as * mut sys :: godot_method_bind , set_storage : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ImageTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ImageTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_image = (gd_api . godot_method_bind_get_method) (class_name , "create_from_image\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\0" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:526:8647 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:532:5943 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:538:18076 [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 RayCast` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_raycast.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RayCast` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRayCast inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayCast { this : RawObject < Self > , } impl RayCast { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayCastMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified node."] # [doc = ""] # [inline] pub fn add_exception (& self , node : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified [RID]."] # [doc = ""] # [inline] pub fn add_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . add_exception_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Removes all collision exceptions for this ray."] # [doc = ""] # [inline] pub fn clear_exceptions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . clear_exceptions ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the collision information for the ray.\nUse this method to update the collision information immediately instead of waiting for the next `_physics_process` call, for example if the ray or its parent has changed state.\n**Note:** `enabled` is not required for this to work."] # [doc = ""] # [inline] pub fn force_raycast_update (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . force_raycast_update ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn cast_to (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_cast_to ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the bit index passed is turned on.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "Returns the normal of the intersecting object's shape at the collision point."] # [doc = ""] # [inline] pub fn get_collision_normal (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the collision point at which the ray intersects the closest object.\n**Note:** This point is in the **global** coordinate system."] # [doc = ""] # [inline] pub fn get_collision_point (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, collisions will be ignored for this RayCast's immediate parent."] # [doc = ""] # [inline] pub fn exclude_parent_body (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_exclude_parent_body ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [Area]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collision with [PhysicsBody]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether any object is intersecting with the ray's vector (considering the vector length)."] # [doc = ""] # [inline] pub fn is_colliding (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_colliding ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a collision exception so the ray does report collisions with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception so the ray does report collisions with the specified [RID]."] # [doc = ""] # [inline] pub fn remove_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . remove_exception_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn set_cast_to (& self , local_point : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_cast_to ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; } } # [doc = "If `true`, collision with [Area]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, collision with [PhysicsBody]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Sets the bit index passed to the `value` passed.\n**Note:** Bit indexes range from 0-19."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, collisions will be ignored for this RayCast's immediate parent."] # [doc = ""] # [inline] pub fn set_exclude_parent_body (& self , mask : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_exclude_parent_body ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mask) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayCast { } unsafe impl GodotObject for RayCast { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RayCast" } } impl QueueFree for RayCast { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RayCast { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RayCast { } unsafe impl SubClass < crate :: generated :: node :: Node > for RayCast { } unsafe impl SubClass < crate :: generated :: object :: Object > for RayCast { } impl Instanciable for RayCast { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RayCast :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayCastMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_exception : * mut sys :: godot_method_bind , pub add_exception_rid : * mut sys :: godot_method_bind , pub clear_exceptions : * mut sys :: godot_method_bind , pub force_raycast_update : * mut sys :: godot_method_bind , pub get_cast_to : * mut sys :: godot_method_bind , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_exclude_parent_body : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub is_colliding : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub remove_exception : * mut sys :: godot_method_bind , pub remove_exception_rid : * mut sys :: godot_method_bind , pub set_cast_to : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_exclude_parent_body : * mut sys :: godot_method_bind } impl RayCastMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayCastMethodTable = RayCastMethodTable { class_constructor : None , add_exception : 0 as * mut sys :: godot_method_bind , add_exception_rid : 0 as * mut sys :: godot_method_bind , clear_exceptions : 0 as * mut sys :: godot_method_bind , force_raycast_update : 0 as * mut sys :: godot_method_bind , get_cast_to : 0 as * mut sys :: godot_method_bind , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_exclude_parent_body : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , is_colliding : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , remove_exception : 0 as * mut sys :: godot_method_bind , remove_exception_rid : 0 as * mut sys :: godot_method_bind , set_cast_to : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_exclude_parent_body : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RayCastMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayCast\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:544:14839 [INFO] [stdout] | [INFO] [stdout] 544 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 544 | # [doc = "`core class SkeletonIK` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_skeletonik.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SkeletonIK` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeletonIK inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SkeletonIK { this : RawObject < Self > , } impl SkeletonIK { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkeletonIKMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn interpolation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_interpolation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn magnet_position (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_magnet_position ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn max_iterations (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_max_iterations ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_min_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_parent_skeleton (& self) -> Option < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_parent_skeleton ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn root_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_root_bone ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn target_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_node ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn target_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn tip_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_tip_bone ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_override_tip_basis (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_override_tip_basis ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_running (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_running ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_magnet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_using_magnet ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_interpolation (& self , interpolation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_interpolation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , interpolation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_magnet_position (& self , local_position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_magnet_position ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , local_position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_max_iterations (& self , iterations : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_max_iterations ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , iterations) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_min_distance (& self , min_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_min_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min_distance) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_override_tip_basis (& self , _override : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_override_tip_basis ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_root_bone (& self , root_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_root_bone ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , root_bone . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_target_node (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_node ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_target_transform (& self , target : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_transform ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , target) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_tip_bone (& self , tip_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_tip_bone ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , tip_bone . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_magnet (& self , _use : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_use_magnet ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _use) ; } } # [doc = "\n# Default Arguments\n* `one_time` - `false`"] # [doc = ""] # [inline] pub fn start (& self , one_time : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , one_time) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SkeletonIK { } unsafe impl GodotObject for SkeletonIK { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SkeletonIK" } } impl QueueFree for SkeletonIK { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SkeletonIK { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkeletonIK { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for SkeletonIK { } unsafe impl SubClass < crate :: generated :: object :: Object > for SkeletonIK { } impl Instanciable for SkeletonIK { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SkeletonIK :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkeletonIKMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_interpolation : * mut sys :: godot_method_bind , pub get_magnet_position : * mut sys :: godot_method_bind , pub get_max_iterations : * mut sys :: godot_method_bind , pub get_min_distance : * mut sys :: godot_method_bind , pub get_parent_skeleton : * mut sys :: godot_method_bind , pub get_root_bone : * mut sys :: godot_method_bind , pub get_target_node : * mut sys :: godot_method_bind , pub get_target_transform : * mut sys :: godot_method_bind , pub get_tip_bone : * mut sys :: godot_method_bind , pub is_override_tip_basis : * mut sys :: godot_method_bind , pub is_running : * mut sys :: godot_method_bind , pub is_using_magnet : * mut sys :: godot_method_bind , pub set_interpolation : * mut sys :: godot_method_bind , pub set_magnet_position : * mut sys :: godot_method_bind , pub set_max_iterations : * mut sys :: godot_method_bind , pub set_min_distance : * mut sys :: godot_method_bind , pub set_override_tip_basis : * mut sys :: godot_method_bind , pub set_root_bone : * mut sys :: godot_method_bind , pub set_target_node : * mut sys :: godot_method_bind , pub set_target_transform : * mut sys :: godot_method_bind , pub set_tip_bone : * mut sys :: godot_method_bind , pub set_use_magnet : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl SkeletonIKMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkeletonIKMethodTable = SkeletonIKMethodTable { class_constructor : None , get_interpolation : 0 as * mut sys :: godot_method_bind , get_magnet_position : 0 as * mut sys :: godot_method_bind , get_max_iterations : 0 as * mut sys :: godot_method_bind , get_min_distance : 0 as * mut sys :: godot_method_bind , get_parent_skeleton : 0 as * mut sys :: godot_method_bind , get_root_bone : 0 as * mut sys :: godot_method_bind , get_target_node : 0 as * mut sys :: godot_method_bind , get_target_transform : 0 as * mut sys :: godot_method_bind , get_tip_bone : 0 as * mut sys :: godot_method_bind , is_override_tip_basis : 0 as * mut sys :: godot_method_bind , is_running : 0 as * mut sys :: godot_method_bind , is_using_magnet : 0 as * mut sys :: godot_method_bind , set_interpolation : 0 as * mut sys :: godot_method_bind , set_magnet_position : 0 as * mut sys :: godot_method_bind , set_max_iterations : 0 as * mut sys :: godot_method_bind , set_min_distance : 0 as * mut sys :: godot_method_bind , set_override_tip_basis : 0 as * mut sys :: godot_method_bind , set_root_bone : 0 as * mut sys :: godot_method_bind , set_target_node : 0 as * mut sys :: godot_method_bind , set_target_transform : 0 as * mut sys :: godot_method_bind , set_tip_bone : 0 as * mut sys :: godot_method_bind , set_use_magnet : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SkeletonIKMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SkeletonIK\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_interpolation\0" . as_ptr () as * const c_char) ; table . get_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "get_magnet_position\0" . as_ptr () as * const c_char) ; table . get_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "get_max_iterations\0" . as_ptr () as * const c_char) ; table . get_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_min_distance\0" . as_ptr () as * const c_char) ; table . get_parent_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_skeleton\0" . as_ptr () as * const c_char) ; table . get_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_root_bone\0" . as_ptr () as * const c_char) ; table . get_target_node = (gd_api . godot_method_bind_get_method) (class_name , "get_target_node\0" . as_ptr () as * const c_char) ; table . get_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_target_transform\0" . as_ptr () as * const c_char) ; table . get_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_tip_bone\0" . as_ptr () as * const c_char) ; table . is_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "is_override_tip_basis\0" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\0" . as_ptr () as * const c_char) ; table . is_using_magnet = (gd_api . godot_method_bind_get_method) (class_name , "is_using_magnet\0" . as_ptr () as * const c_char) ; table . set_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation\0" . as_ptr () as * const c_char) ; table . set_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "set_magnet_position\0" . as_ptr () as * const c_char) ; table . set_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_max_iterations\0" . as_ptr () as * const c_char) ; table . set_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_min_distance\0" . as_ptr () as * const c_char) ; table . set_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "set_override_tip_basis\0" . as_ptr () as * const c_char) ; table . set_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_root_bone\0" . as_ptr () as * const c_char) ; table . set_target_node = (gd_api . godot_method_bind_get_method) (class_name , "set_target_node\0" . as_ptr () as * const c_char) ; table . set_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_target_transform\0" . as_ptr () as * const c_char) ; table . set_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_tip_bone\0" . as_ptr () as * const c_char) ; table . set_use_magnet = (gd_api . godot_method_bind_get_method) (class_name , "set_use_magnet\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:550:27266 [INFO] [stdout] | [INFO] [stdout] 550 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 550 | # [doc = "`core class NavigationMesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_navigationmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNavigationMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMesh { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NavigationMesh { pub const PARSED_GEOMETRY_BOTH : i64 = 2i64 ; pub const PARSED_GEOMETRY_MESH_INSTANCES : i64 = 0i64 ; pub const PARSED_GEOMETRY_STATIC_COLLIDERS : i64 = 1i64 ; pub const SAMPLE_PARTITION_LAYERS : i64 = 2i64 ; pub const SAMPLE_PARTITION_MONOTONE : i64 = 1i64 ; pub const SAMPLE_PARTITION_WATERSHED : i64 = 0i64 ; } impl NavigationMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_polygon (& self , polygon : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . add_polygon ; let ret = crate :: icalls :: icallptr_void_i32arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_polygons (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . clear_polygons ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn create_from_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . create_from_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn agent_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn agent_max_climb (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_max_climb ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn agent_max_slope (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_max_slope ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn agent_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_cell_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn detail_sample_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_detail_sample_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn detail_sample_max_error (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_detail_sample_max_error ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn edge_max_error (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_edge_max_error ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn edge_max_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_edge_max_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn filter_ledge_spans (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_ledge_spans ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn filter_low_hanging_obstacles (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_low_hanging_obstacles ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn filter_walkable_low_height_spans (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_walkable_low_height_spans ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn parsed_geometry_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_parsed_geometry_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_polygon (& self , idx : i64) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_i32arr_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Int32Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_polygon_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_polygon_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn region_merge_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_region_merge_size ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn region_min_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_region_min_size ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn sample_partition_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_sample_partition_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn source_geometry_mode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_source_geometry_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn source_group_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_source_group_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn vertices (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_vertices ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn verts_per_poly (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_verts_per_poly ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_agent_height (& self , agent_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_agent_max_climb (& self , agent_max_climb : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_max_climb ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_max_climb) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_agent_max_slope (& self , agent_max_slope : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_max_slope ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_max_slope) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_agent_radius (& self , agent_radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , agent_radius) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_height (& self , cell_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_cell_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cell_height) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_size (& self , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cell_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_detail_sample_distance (& self , detail_sample_dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_detail_sample_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_dist) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_detail_sample_max_error (& self , detail_sample_max_error : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_detail_sample_max_error ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_max_error) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_edge_max_error (& self , edge_max_error : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_edge_max_error ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , edge_max_error) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_edge_max_length (& self , edge_max_length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_edge_max_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , edge_max_length) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_filter_ledge_spans (& self , filter_ledge_spans : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_ledge_spans ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_ledge_spans) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_filter_low_hanging_obstacles (& self , filter_low_hanging_obstacles : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_low_hanging_obstacles ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_low_hanging_obstacles) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_filter_walkable_low_height_spans (& self , filter_walkable_low_height_spans : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_walkable_low_height_spans ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , filter_walkable_low_height_spans) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_parsed_geometry_type (& self , geometry_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_parsed_geometry_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , geometry_type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_region_merge_size (& self , region_merge_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_region_merge_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , region_merge_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_region_min_size (& self , region_min_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_region_min_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , region_min_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sample_partition_type (& self , sample_partition_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_sample_partition_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , sample_partition_type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_source_geometry_mode (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_source_geometry_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_source_group_name (& self , mask : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_source_group_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , mask . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_vertices (& self , vertices : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_vertices ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , vertices) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_verts_per_poly (& self , verts_per_poly : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_verts_per_poly ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , verts_per_poly) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMesh { } unsafe impl GodotObject for NavigationMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NavigationMesh" } } impl std :: ops :: Deref for NavigationMesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for NavigationMesh { } impl Instanciable for NavigationMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NavigationMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_polygon : * mut sys :: godot_method_bind , pub clear_polygons : * mut sys :: godot_method_bind , pub create_from_mesh : * mut sys :: godot_method_bind , pub get_agent_height : * mut sys :: godot_method_bind , pub get_agent_max_climb : * mut sys :: godot_method_bind , pub get_agent_max_slope : * mut sys :: godot_method_bind , pub get_agent_radius : * mut sys :: godot_method_bind , pub get_cell_height : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_detail_sample_distance : * mut sys :: godot_method_bind , pub get_detail_sample_max_error : * mut sys :: godot_method_bind , pub get_edge_max_error : * mut sys :: godot_method_bind , pub get_edge_max_length : * mut sys :: godot_method_bind , pub get_filter_ledge_spans : * mut sys :: godot_method_bind , pub get_filter_low_hanging_obstacles : * mut sys :: godot_method_bind , pub get_filter_walkable_low_height_spans : * mut sys :: godot_method_bind , pub get_parsed_geometry_type : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygon_count : * mut sys :: godot_method_bind , pub get_region_merge_size : * mut sys :: godot_method_bind , pub get_region_min_size : * mut sys :: godot_method_bind , pub get_sample_partition_type : * mut sys :: godot_method_bind , pub get_source_geometry_mode : * mut sys :: godot_method_bind , pub get_source_group_name : * mut sys :: godot_method_bind , pub get_vertices : * mut sys :: godot_method_bind , pub get_verts_per_poly : * mut sys :: godot_method_bind , pub set_agent_height : * mut sys :: godot_method_bind , pub set_agent_max_climb : * mut sys :: godot_method_bind , pub set_agent_max_slope : * mut sys :: godot_method_bind , pub set_agent_radius : * mut sys :: godot_method_bind , pub set_cell_height : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_detail_sample_distance : * mut sys :: godot_method_bind , pub set_detail_sample_max_error : * mut sys :: godot_method_bind , pub set_edge_max_error : * mut sys :: godot_method_bind , pub set_edge_max_length : * mut sys :: godot_method_bind , pub set_filter_ledge_spans : * mut sys :: godot_method_bind , pub set_filter_low_hanging_obstacles : * mut sys :: godot_method_bind , pub set_filter_walkable_low_height_spans : * mut sys :: godot_method_bind , pub set_parsed_geometry_type : * mut sys :: godot_method_bind , pub set_region_merge_size : * mut sys :: godot_method_bind , pub set_region_min_size : * mut sys :: godot_method_bind , pub set_sample_partition_type : * mut sys :: godot_method_bind , pub set_source_geometry_mode : * mut sys :: godot_method_bind , pub set_source_group_name : * mut sys :: godot_method_bind , pub set_vertices : * mut sys :: godot_method_bind , pub set_verts_per_poly : * mut sys :: godot_method_bind } impl NavigationMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshMethodTable = NavigationMeshMethodTable { class_constructor : None , add_polygon : 0 as * mut sys :: godot_method_bind , clear_polygons : 0 as * mut sys :: godot_method_bind , create_from_mesh : 0 as * mut sys :: godot_method_bind , get_agent_height : 0 as * mut sys :: godot_method_bind , get_agent_max_climb : 0 as * mut sys :: godot_method_bind , get_agent_max_slope : 0 as * mut sys :: godot_method_bind , get_agent_radius : 0 as * mut sys :: godot_method_bind , get_cell_height : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_detail_sample_distance : 0 as * mut sys :: godot_method_bind , get_detail_sample_max_error : 0 as * mut sys :: godot_method_bind , get_edge_max_error : 0 as * mut sys :: godot_method_bind , get_edge_max_length : 0 as * mut sys :: godot_method_bind , get_filter_ledge_spans : 0 as * mut sys :: godot_method_bind , get_filter_low_hanging_obstacles : 0 as * mut sys :: godot_method_bind , get_filter_walkable_low_height_spans : 0 as * mut sys :: godot_method_bind , get_parsed_geometry_type : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygon_count : 0 as * mut sys :: godot_method_bind , get_region_merge_size : 0 as * mut sys :: godot_method_bind , get_region_min_size : 0 as * mut sys :: godot_method_bind , get_sample_partition_type : 0 as * mut sys :: godot_method_bind , get_source_geometry_mode : 0 as * mut sys :: godot_method_bind , get_source_group_name : 0 as * mut sys :: godot_method_bind , get_vertices : 0 as * mut sys :: godot_method_bind , get_verts_per_poly : 0 as * mut sys :: godot_method_bind , set_agent_height : 0 as * mut sys :: godot_method_bind , set_agent_max_climb : 0 as * mut sys :: godot_method_bind , set_agent_max_slope : 0 as * mut sys :: godot_method_bind , set_agent_radius : 0 as * mut sys :: godot_method_bind , set_cell_height : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_detail_sample_distance : 0 as * mut sys :: godot_method_bind , set_detail_sample_max_error : 0 as * mut sys :: godot_method_bind , set_edge_max_error : 0 as * mut sys :: godot_method_bind , set_edge_max_length : 0 as * mut sys :: godot_method_bind , set_filter_ledge_spans : 0 as * mut sys :: godot_method_bind , set_filter_low_hanging_obstacles : 0 as * mut sys :: godot_method_bind , set_filter_walkable_low_height_spans : 0 as * mut sys :: godot_method_bind , set_parsed_geometry_type : 0 as * mut sys :: godot_method_bind , set_region_merge_size : 0 as * mut sys :: godot_method_bind , set_region_min_size : 0 as * mut sys :: godot_method_bind , set_sample_partition_type : 0 as * mut sys :: godot_method_bind , set_source_geometry_mode : 0 as * mut sys :: godot_method_bind , set_source_group_name : 0 as * mut sys :: godot_method_bind , set_vertices : 0 as * mut sys :: godot_method_bind , set_verts_per_poly : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { NavigationMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "add_polygon\0" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\0" . as_ptr () as * const c_char) ; table . create_from_mesh = (gd_api . godot_method_bind_get_method) (class_name , "create_from_mesh\0" . as_ptr () as * const c_char) ; table . get_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_height\0" . as_ptr () as * const c_char) ; table . get_agent_max_climb = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_max_climb\0" . as_ptr () as * const c_char) ; table . get_agent_max_slope = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_max_slope\0" . as_ptr () as * const c_char) ; table . get_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_radius\0" . as_ptr () as * const c_char) ; table . get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_height\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_detail_sample_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_sample_distance\0" . as_ptr () as * const c_char) ; table . get_detail_sample_max_error = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_sample_max_error\0" . as_ptr () as * const c_char) ; table . get_edge_max_error = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_max_error\0" . as_ptr () as * const c_char) ; table . get_edge_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_max_length\0" . as_ptr () as * const c_char) ; table . get_filter_ledge_spans = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_ledge_spans\0" . as_ptr () as * const c_char) ; table . get_filter_low_hanging_obstacles = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_low_hanging_obstacles\0" . as_ptr () as * const c_char) ; table . get_filter_walkable_low_height_spans = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_walkable_low_height_spans\0" . as_ptr () as * const c_char) ; table . get_parsed_geometry_type = (gd_api . godot_method_bind_get_method) (class_name , "get_parsed_geometry_type\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\0" . as_ptr () as * const c_char) ; table . get_region_merge_size = (gd_api . godot_method_bind_get_method) (class_name , "get_region_merge_size\0" . as_ptr () as * const c_char) ; table . get_region_min_size = (gd_api . godot_method_bind_get_method) (class_name , "get_region_min_size\0" . as_ptr () as * const c_char) ; table . get_sample_partition_type = (gd_api . godot_method_bind_get_method) (class_name , "get_sample_partition_type\0" . as_ptr () as * const c_char) ; table . get_source_geometry_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_source_geometry_mode\0" . as_ptr () as * const c_char) ; table . get_source_group_name = (gd_api . godot_method_bind_get_method) (class_name , "get_source_group_name\0" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\0" . as_ptr () as * const c_char) ; table . get_verts_per_poly = (gd_api . godot_method_bind_get_method) (class_name , "get_verts_per_poly\0" . as_ptr () as * const c_char) ; table . set_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_height\0" . as_ptr () as * const c_char) ; table . set_agent_max_climb = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_max_climb\0" . as_ptr () as * const c_char) ; table . set_agent_max_slope = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_max_slope\0" . as_ptr () as * const c_char) ; table . set_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_radius\0" . as_ptr () as * const c_char) ; table . set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_height\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_detail_sample_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_sample_distance\0" . as_ptr () as * const c_char) ; table . set_detail_sample_max_error = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_sample_max_error\0" . as_ptr () as * const c_char) ; table . set_edge_max_error = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_max_error\0" . as_ptr () as * const c_char) ; table . set_edge_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_max_length\0" . as_ptr () as * const c_char) ; table . set_filter_ledge_spans = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_ledge_spans\0" . as_ptr () as * const c_char) ; table . set_filter_low_hanging_obstacles = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_low_hanging_obstacles\0" . as_ptr () as * const c_char) ; table . set_filter_walkable_low_height_spans = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_walkable_low_height_spans\0" . as_ptr () as * const c_char) ; table . set_parsed_geometry_type = (gd_api . godot_method_bind_get_method) (class_name , "set_parsed_geometry_type\0" . as_ptr () as * const c_char) ; table . set_region_merge_size = (gd_api . godot_method_bind_get_method) (class_name , "set_region_merge_size\0" . as_ptr () as * const c_char) ; table . set_region_min_size = (gd_api . godot_method_bind_get_method) (class_name , "set_region_min_size\0" . as_ptr () as * const c_char) ; table . set_sample_partition_type = (gd_api . godot_method_bind_get_method) (class_name , "set_sample_partition_type\0" . as_ptr () as * const c_char) ; table . set_source_geometry_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_source_geometry_mode\0" . as_ptr () as * const c_char) ; table . set_source_group_name = (gd_api . godot_method_bind_get_method) (class_name , "set_source_group_name\0" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\0" . as_ptr () as * const c_char) ; table . set_verts_per_poly = (gd_api . godot_method_bind_get_method) (class_name , "set_verts_per_poly\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:556:3398 [INFO] [stdout] | [INFO] [stdout] 556 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 556 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:562:5601 [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 GDNative` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDNative inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDNative { this : RawObject < Self > , } impl GDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_native (& self , calling_type : impl Into < GodotString > , procedure_name : impl Into < GodotString > , arguments : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . call_native ; let ret = crate :: icalls :: icallptr_var_str_str_arr (method_bind , self . this . sys () . as_ptr () , calling_type . into () , procedure_name . into () , arguments) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn initialize (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: gdnative_library :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn terminate (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . terminate ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for GDNative { } unsafe impl GodotObject for GDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDNative" } } impl std :: ops :: Deref for GDNative { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDNative { } impl Instanciable for GDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { GDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub call_native : * mut sys :: godot_method_bind , pub get_library : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub set_library : * mut sys :: godot_method_bind , pub terminate : * mut sys :: godot_method_bind } impl GDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDNativeMethodTable = GDNativeMethodTable { class_constructor : None , call_native : 0 as * mut sys :: godot_method_bind , get_library : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , set_library : 0 as * mut sys :: godot_method_bind , terminate : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_native = (gd_api . godot_method_bind_get_method) (class_name , "call_native\0" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\0" . as_ptr () as * const c_char) ; table . terminate = (gd_api . godot_method_bind_get_method) (class_name , "terminate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:568:4726 [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 AnimationNodeBlend2` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblend2.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlend2 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlend2 { this : RawObject < Self > , } impl AnimationNodeBlend2 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlend2MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend2MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend2MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend2 { } unsafe impl GodotObject for AnimationNodeBlend2 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend2" } } impl std :: ops :: Deref for AnimationNodeBlend2 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlend2 { } impl Instanciable for AnimationNodeBlend2 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlend2 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlend2MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeBlend2MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlend2MethodTable = AnimationNodeBlend2MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeBlend2MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlend2\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:574:6872 [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 Joint` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_joint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJoint inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Joint { this : RawObject < Self > , } impl Joint { # [doc = "If `true`, the two bodies of the nodes are not able to collide with each other."] # [doc = ""] # [inline] pub fn exclude_nodes_from_collision (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node attached to the first side (A) of the joint."] # [doc = ""] # [inline] pub fn node_a (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_node_a ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The node attached to the second side (B) of the joint."] # [doc = ""] # [inline] pub fn node_b (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_node_b ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority."] # [doc = ""] # [inline] pub fn solver_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_solver_priority ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the two bodies of the nodes are not able to collide with each other."] # [doc = ""] # [inline] pub fn set_exclude_nodes_from_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The node attached to the first side (A) of the joint."] # [doc = ""] # [inline] pub fn set_node_a (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_node_a ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The node attached to the second side (B) of the joint."] # [doc = ""] # [inline] pub fn set_node_b (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_node_b ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority."] # [doc = ""] # [inline] pub fn set_solver_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_solver_priority ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Joint { } unsafe impl GodotObject for Joint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Joint" } } impl QueueFree for Joint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Joint { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Joint { } unsafe impl SubClass < crate :: generated :: node :: Node > for Joint { } unsafe impl SubClass < crate :: generated :: object :: Object > for Joint { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub get_node_a : * mut sys :: godot_method_bind , pub get_node_b : * mut sys :: godot_method_bind , pub get_solver_priority : * mut sys :: godot_method_bind , pub set_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub set_node_a : * mut sys :: godot_method_bind , pub set_node_b : * mut sys :: godot_method_bind , pub set_solver_priority : * mut sys :: godot_method_bind } impl JointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JointMethodTable = JointMethodTable { class_constructor : None , get_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , get_node_a : 0 as * mut sys :: godot_method_bind , get_node_b : 0 as * mut sys :: godot_method_bind , get_solver_priority : 0 as * mut sys :: godot_method_bind , set_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , set_node_a : 0 as * mut sys :: godot_method_bind , set_node_b : 0 as * mut sys :: godot_method_bind , set_solver_priority : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { JointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Joint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\0" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\0" . as_ptr () as * const c_char) ; table . get_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_solver_priority\0" . as_ptr () as * const c_char) ; table . set_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\0" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\0" . as_ptr () as * const c_char) ; table . set_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_solver_priority\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:580:10866 [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 = "`tools class EditorSpatialGizmo` inherits `SpatialGizmo` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorspatialgizmo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSpatialGizmo inherits methods from:\n - [SpatialGizmo](struct.SpatialGizmo.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSpatialGizmo { this : RawObject < Self > , } impl EditorSpatialGizmo { # [doc = "Adds the specified `segments` to the gizmo's collision shape for picking. Call this function during [method redraw]."] # [doc = ""] # [inline] pub fn add_collision_segments (& self , segments : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_segments ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]."] # [doc = ""] # [inline] pub fn add_collision_triangles (& self , triangles : impl AsArg < crate :: generated :: triangle_mesh :: TriangleMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_triangles ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , triangles . as_arg_ptr ()) ; } } # [doc = "Adds a list of handles (points) which can be used to deform the object being edited.\nThere are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].\n# Default Arguments\n* `billboard` - `false`\n* `secondary` - `false`"] # [doc = ""] # [inline] pub fn add_handles (& self , handles : Vector3Array , material : impl AsArg < crate :: generated :: material :: Material > , billboard : bool , secondary : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_handles ; let ret = crate :: icalls :: icallptr_void_vec3arr_obj_bool_bool (method_bind , self . this . sys () . as_ptr () , handles , material . as_arg_ptr () , billboard , secondary) ; } } # [doc = "Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].\n# Default Arguments\n* `billboard` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn add_lines (& self , lines : Vector3Array , material : impl AsArg < crate :: generated :: material :: Material > , billboard : bool , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_lines ; let ret = crate :: icalls :: icallptr_void_vec3arr_obj_bool_color (method_bind , self . this . sys () . as_ptr () , lines , material . as_arg_ptr () , billboard , modulate) ; } } # [doc = "Adds a mesh to the gizmo with the specified `billboard` state, `skeleton` and `material`. If `billboard` is `true`, the mesh will rotate to always face the camera. Call this function during [method redraw].\n# Default Arguments\n* `billboard` - `false`\n* `skeleton` - `null`\n* `material` - `null`"] # [doc = ""] # [inline] pub fn add_mesh (& self , mesh : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh > , billboard : bool , skeleton : impl AsArg < crate :: generated :: skin_reference :: SkinReference > , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_mesh ; let ret = crate :: icalls :: icallptr_void_obj_bool_obj_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , billboard , skeleton . as_arg_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Adds an unscaled billboard for visualization. Call this function during [method redraw].\n# Default Arguments\n* `default_scale` - `1`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn add_unscaled_billboard (& self , material : impl AsArg < crate :: generated :: material :: Material > , default_scale : f64 , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_unscaled_billboard ; let ret = crate :: icalls :: icallptr_void_obj_f64_color (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr () , default_scale , modulate) ; } } # [doc = "Removes everything in the gizmo including meshes, collisions and handles."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material]."] # [doc = ""] # [inline] pub fn get_plugin (& self) -> Option < Ref < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_plugin ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the Spatial node associated with this gizmo."] # [doc = ""] # [inline] pub fn get_spatial_node (& self) -> Option < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_spatial_node ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial :: Spatial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets the gizmo's hidden state. If `true`, the gizmo will be hidden. If `false`, it will be shown."] # [doc = ""] # [inline] pub fn set_hidden (& self , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . set_hidden ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , hidden) ; } } # [doc = "Sets the reference [Spatial] node for the gizmo. `node` must inherit from [Spatial]."] # [doc = ""] # [inline] pub fn set_spatial_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . set_spatial_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpatialGizmo { } unsafe impl GodotObject for EditorSpatialGizmo { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmo" } } impl std :: ops :: Deref for EditorSpatialGizmo { type Target = crate :: generated :: spatial_gizmo :: SpatialGizmo ; # [inline] fn deref (& self) -> & crate :: generated :: spatial_gizmo :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial_gizmo :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial_gizmo :: SpatialGizmo > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorSpatialGizmo { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSpatialGizmoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_segments : * mut sys :: godot_method_bind , pub add_collision_triangles : * mut sys :: godot_method_bind , pub add_handles : * mut sys :: godot_method_bind , pub add_lines : * mut sys :: godot_method_bind , pub add_mesh : * mut sys :: godot_method_bind , pub add_unscaled_billboard : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_plugin : * mut sys :: godot_method_bind , pub get_spatial_node : * mut sys :: godot_method_bind , pub set_hidden : * mut sys :: godot_method_bind , pub set_spatial_node : * mut sys :: godot_method_bind } impl EditorSpatialGizmoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSpatialGizmoMethodTable = EditorSpatialGizmoMethodTable { class_constructor : None , add_collision_segments : 0 as * mut sys :: godot_method_bind , add_collision_triangles : 0 as * mut sys :: godot_method_bind , add_handles : 0 as * mut sys :: godot_method_bind , add_lines : 0 as * mut sys :: godot_method_bind , add_mesh : 0 as * mut sys :: godot_method_bind , add_unscaled_billboard : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_plugin : 0 as * mut sys :: godot_method_bind , get_spatial_node : 0 as * mut sys :: godot_method_bind , set_hidden : 0 as * mut sys :: godot_method_bind , set_spatial_node : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorSpatialGizmoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSpatialGizmo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_segments = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_segments\0" . as_ptr () as * const c_char) ; table . add_collision_triangles = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_triangles\0" . as_ptr () as * const c_char) ; table . add_handles = (gd_api . godot_method_bind_get_method) (class_name , "add_handles\0" . as_ptr () as * const c_char) ; table . add_lines = (gd_api . godot_method_bind_get_method) (class_name , "add_lines\0" . as_ptr () as * const c_char) ; table . add_mesh = (gd_api . godot_method_bind_get_method) (class_name , "add_mesh\0" . as_ptr () as * const c_char) ; table . add_unscaled_billboard = (gd_api . godot_method_bind_get_method) (class_name , "add_unscaled_billboard\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_plugin = (gd_api . godot_method_bind_get_method) (class_name , "get_plugin\0" . as_ptr () as * const c_char) ; table . get_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "get_spatial_node\0" . as_ptr () as * const c_char) ; table . set_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_hidden\0" . as_ptr () as * const c_char) ; table . set_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "set_spatial_node\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:586:4298 [INFO] [stdout] | [INFO] [stdout] 586 | ...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] 586 | # [doc = "`core class ARVRCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ARVRCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVRCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRCamera { this : RawObject < Self > , } impl ARVRCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRCamera { } unsafe impl GodotObject for ARVRCamera { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRCamera" } } impl QueueFree for ARVRCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVRCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRCamera { } impl Instanciable for ARVRCamera { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ARVRCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRCameraMethodTable = ARVRCameraMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ARVRCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRCamera\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:592:32579 [INFO] [stdout] | [INFO] [stdout] 592 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 592 | # [doc = "`core 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:598:7979 [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 BitMap` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_bitmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBitMap inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BitMap { this : RawObject < Self > , } impl BitMap { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BitMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Creates a bitmap with the specified size, filled with `false`."] # [doc = ""] # [inline] pub fn create (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to `false` if the alpha value of the image at that position is equal to `threshold` or less, and `true` in other case.\n# Default Arguments\n* `threshold` - `0.1`"] # [doc = ""] # [inline] pub fn create_from_image_alpha (& self , image : impl AsArg < crate :: generated :: image :: Image > , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . create_from_image_alpha ; let ret = crate :: icalls :: icallptr_void_obj_f64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , threshold) ; } } # [doc = "Returns bitmap's value at the specified position."] # [doc = ""] # [inline] pub fn get_bit (& self , position : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_bit ; let ret = crate :: icalls :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [doc = "Returns bitmap's dimensions."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the amount of bitmap elements that are set to `true`."] # [doc = ""] # [inline] pub fn get_true_bit_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_true_bit_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied."] # [doc = ""] # [inline] pub fn grow_mask (& self , pixels : i64 , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . grow_mask ; let ret = crate :: icalls :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , pixels , rect) ; } } # [doc = "\n# Default Arguments\n* `epsilon` - `2.0`"] # [doc = ""] # [inline] pub fn opaque_to_polygons (& self , rect : Rect2 , epsilon : f64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . opaque_to_polygons ; let ret = crate :: icalls :: icallvar__rect2_f64 (method_bind , self . this . sys () . as_ptr () , rect , epsilon) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the bitmap's element at the specified position, to the specified value."] # [doc = ""] # [inline] pub fn set_bit (& self , position : Vector2 , bit : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . set_bit ; let ret = crate :: icalls :: icallptr_void_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , bit) ; } } # [doc = "Sets a rectangular portion of the bitmap to the specified value."] # [doc = ""] # [inline] pub fn set_bit_rect (& self , rect : Rect2 , bit : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . set_bit_rect ; let ret = crate :: icalls :: icallptr_void_rect2_bool (method_bind , self . this . sys () . as_ptr () , rect , bit) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BitMap { } unsafe impl GodotObject for BitMap { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BitMap" } } impl std :: ops :: Deref for BitMap { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BitMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BitMap { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BitMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for BitMap { } impl Instanciable for BitMap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BitMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BitMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind , pub create_from_image_alpha : * mut sys :: godot_method_bind , pub get_bit : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_true_bit_count : * mut sys :: godot_method_bind , pub grow_mask : * mut sys :: godot_method_bind , pub opaque_to_polygons : * mut sys :: godot_method_bind , pub set_bit : * mut sys :: godot_method_bind , pub set_bit_rect : * mut sys :: godot_method_bind } impl BitMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BitMapMethodTable = BitMapMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind , create_from_image_alpha : 0 as * mut sys :: godot_method_bind , get_bit : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_true_bit_count : 0 as * mut sys :: godot_method_bind , grow_mask : 0 as * mut sys :: godot_method_bind , opaque_to_polygons : 0 as * mut sys :: godot_method_bind , set_bit : 0 as * mut sys :: godot_method_bind , set_bit_rect : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { BitMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BitMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_image_alpha = (gd_api . godot_method_bind_get_method) (class_name , "create_from_image_alpha\0" . as_ptr () as * const c_char) ; table . get_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_bit\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_true_bit_count = (gd_api . godot_method_bind_get_method) (class_name , "get_true_bit_count\0" . as_ptr () as * const c_char) ; table . grow_mask = (gd_api . godot_method_bind_get_method) (class_name , "grow_mask\0" . as_ptr () as * const c_char) ; table . opaque_to_polygons = (gd_api . godot_method_bind_get_method) (class_name , "opaque_to_polygons\0" . as_ptr () as * const c_char) ; table . set_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_bit\0" . as_ptr () as * const c_char) ; table . set_bit_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_bit_rect\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:604:17552 [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 CSGPolygon` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgpolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGPolygon` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGPolygon inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGPolygon { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const DEPTH : Mode = Mode (0i64) ; pub const SPIN : Mode = Mode (1i64) ; pub const PATH : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PathRotation (pub i64) ; impl PathRotation { pub const POLYGON : PathRotation = PathRotation (0i64) ; pub const PATH : PathRotation = PathRotation (1i64) ; pub const PATH_FOLLOW : PathRotation = PathRotation (2i64) ; } impl From < i64 > for PathRotation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PathRotation > for i64 { # [inline] fn from (v : PathRotation) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CSGPolygon { pub const MODE_DEPTH : i64 = 0i64 ; pub const MODE_PATH : i64 = 2i64 ; pub const MODE_SPIN : i64 = 1i64 ; pub const PATH_ROTATION_PATH : i64 = 1i64 ; pub const PATH_ROTATION_PATH_FOLLOW : i64 = 2i64 ; pub const PATH_ROTATION_POLYGON : i64 = 0i64 ; } impl CSGPolygon { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGPolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: csg_polygon :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: csg_polygon :: Mode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn path_interval (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_interval ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn path_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_node ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn path_rotation (& self) -> crate :: generated :: csg_polygon :: PathRotation { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_rotation ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: csg_polygon :: PathRotation (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn spin_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_spin_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn spin_sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_spin_sides ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_continuous_u (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_continuous_u ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_joined (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_joined ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_local (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_local ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , depth) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_continuous_u (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_continuous_u ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_interval (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_interval ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_joined (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_joined ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_local (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_local ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_node ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_rotation (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_rotation ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth_faces) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_spin_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_spin_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_spin_sides (& self , spin_sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_spin_sides ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , spin_sides) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPolygon { } unsafe impl GodotObject for CSGPolygon { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGPolygon" } } impl QueueFree for CSGPolygon { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGPolygon { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGPolygon { } impl Instanciable for CSGPolygon { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGPolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGPolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_path_interval : * mut sys :: godot_method_bind , pub get_path_node : * mut sys :: godot_method_bind , pub get_path_rotation : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub get_spin_degrees : * mut sys :: godot_method_bind , pub get_spin_sides : * mut sys :: godot_method_bind , pub is_path_continuous_u : * mut sys :: godot_method_bind , pub is_path_joined : * mut sys :: godot_method_bind , pub is_path_local : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_path_continuous_u : * mut sys :: godot_method_bind , pub set_path_interval : * mut sys :: godot_method_bind , pub set_path_joined : * mut sys :: godot_method_bind , pub set_path_local : * mut sys :: godot_method_bind , pub set_path_node : * mut sys :: godot_method_bind , pub set_path_rotation : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind , pub set_spin_degrees : * mut sys :: godot_method_bind , pub set_spin_sides : * mut sys :: godot_method_bind } impl CSGPolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGPolygonMethodTable = CSGPolygonMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_path_interval : 0 as * mut sys :: godot_method_bind , get_path_node : 0 as * mut sys :: godot_method_bind , get_path_rotation : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , get_spin_degrees : 0 as * mut sys :: godot_method_bind , get_spin_sides : 0 as * mut sys :: godot_method_bind , is_path_continuous_u : 0 as * mut sys :: godot_method_bind , is_path_joined : 0 as * mut sys :: godot_method_bind , is_path_local : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_path_continuous_u : 0 as * mut sys :: godot_method_bind , set_path_interval : 0 as * mut sys :: godot_method_bind , set_path_joined : 0 as * mut sys :: godot_method_bind , set_path_local : 0 as * mut sys :: godot_method_bind , set_path_node : 0 as * mut sys :: godot_method_bind , set_path_rotation : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind , set_spin_degrees : 0 as * mut sys :: godot_method_bind , set_spin_sides : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CSGPolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGPolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_path_interval\0" . as_ptr () as * const c_char) ; table . get_path_node = (gd_api . godot_method_bind_get_method) (class_name , "get_path_node\0" . as_ptr () as * const c_char) ; table . get_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_path_rotation\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . get_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_degrees\0" . as_ptr () as * const c_char) ; table . get_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_sides\0" . as_ptr () as * const c_char) ; table . is_path_continuous_u = (gd_api . godot_method_bind_get_method) (class_name , "is_path_continuous_u\0" . as_ptr () as * const c_char) ; table . is_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "is_path_joined\0" . as_ptr () as * const c_char) ; table . is_path_local = (gd_api . godot_method_bind_get_method) (class_name , "is_path_local\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_path_continuous_u = (gd_api . godot_method_bind_get_method) (class_name , "set_path_continuous_u\0" . as_ptr () as * const c_char) ; table . set_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_path_interval\0" . as_ptr () as * const c_char) ; table . set_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "set_path_joined\0" . as_ptr () as * const c_char) ; table . set_path_local = (gd_api . godot_method_bind_get_method) (class_name , "set_path_local\0" . as_ptr () as * const c_char) ; table . set_path_node = (gd_api . godot_method_bind_get_method) (class_name , "set_path_node\0" . as_ptr () as * const c_char) ; table . set_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_path_rotation\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_degrees\0" . as_ptr () as * const c_char) ; table . set_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_sides\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:610:10063 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:616:13975 [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 ConfigFile` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_configfile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConfigFile inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConfigFile { this : RawObject < Self > , } impl ConfigFile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConfigFileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist."] # [doc = ""] # [inline] pub fn erase_section (& self , section : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . erase_section ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; } } # [doc = "Deletes the specified key in a section. Raises an error if either the section or the key do not exist."] # [doc = ""] # [inline] pub fn erase_section_key (& self , section : impl Into < GodotString > , key : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . erase_section_key ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , section . into () , key . into ()) ; } } # [doc = "Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist."] # [doc = ""] # [inline] pub fn get_section_keys (& self , section : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_section_keys ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns an array of all defined section identifiers."] # [doc = ""] # [inline] pub fn get_sections (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_sections ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback `default` value. If `default` is not specified or set to `null`, an error is also raised.\n# Default Arguments\n* `default` - `null`"] # [doc = ""] # [inline] pub fn get_value (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , default : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_value ; let ret = crate :: icalls :: icallptr_var_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; Variant :: from_sys (ret) } } # [doc = "Returns `true` if the specified section exists."] # [doc = ""] # [inline] pub fn has_section (& self , section : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . has_section ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; ret as _ } } # [doc = "Returns `true` if the specified section-key pair exists."] # [doc = ""] # [inline] pub fn has_section_key (& self , section : impl Into < GodotString > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . has_section_key ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , section . into () , key . into ()) ; ret as _ } } # [doc = "Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads the encrypted config file specified as a parameter, using the provided `key` to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load_encrypted (& self , path : impl Into < GodotString > , key : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load_encrypted ; let ret = crate :: icalls :: icallptr_i64_str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads the encrypted config file specified as a parameter, using the provided `password` to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load_encrypted_pass (& self , path : impl Into < GodotString > , password : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load_encrypted_pass ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Parses the the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn parse (& self , data : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , data . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided `key` to encrypt it. The output file uses an INI-style structure.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save_encrypted (& self , path : impl Into < GodotString > , key : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save_encrypted ; let ret = crate :: icalls :: icallptr_i64_str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided `password` to encrypt it. The output file uses an INI-style structure.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save_encrypted_pass (& self , path : impl Into < GodotString > , password : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save_encrypted_pass ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a `null` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed."] # [doc = ""] # [inline] pub fn set_value (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . set_value ; let ret = crate :: icalls :: icallptr_void_str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConfigFile { } unsafe impl GodotObject for ConfigFile { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConfigFile" } } impl std :: ops :: Deref for ConfigFile { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConfigFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConfigFile { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConfigFile { } impl Instanciable for ConfigFile { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConfigFile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConfigFileMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub erase_section : * mut sys :: godot_method_bind , pub erase_section_key : * mut sys :: godot_method_bind , pub get_section_keys : * mut sys :: godot_method_bind , pub get_sections : * mut sys :: godot_method_bind , pub get_value : * mut sys :: godot_method_bind , pub has_section : * mut sys :: godot_method_bind , pub has_section_key : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_encrypted : * mut sys :: godot_method_bind , pub load_encrypted_pass : * mut sys :: godot_method_bind , pub parse : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind , pub save_encrypted : * mut sys :: godot_method_bind , pub save_encrypted_pass : * mut sys :: godot_method_bind , pub set_value : * mut sys :: godot_method_bind } impl ConfigFileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConfigFileMethodTable = ConfigFileMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , erase_section : 0 as * mut sys :: godot_method_bind , erase_section_key : 0 as * mut sys :: godot_method_bind , get_section_keys : 0 as * mut sys :: godot_method_bind , get_sections : 0 as * mut sys :: godot_method_bind , get_value : 0 as * mut sys :: godot_method_bind , has_section : 0 as * mut sys :: godot_method_bind , has_section_key : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_encrypted : 0 as * mut sys :: godot_method_bind , load_encrypted_pass : 0 as * mut sys :: godot_method_bind , parse : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind , save_encrypted : 0 as * mut sys :: godot_method_bind , save_encrypted_pass : 0 as * mut sys :: godot_method_bind , set_value : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ConfigFileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConfigFile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . erase_section = (gd_api . godot_method_bind_get_method) (class_name , "erase_section\0" . as_ptr () as * const c_char) ; table . erase_section_key = (gd_api . godot_method_bind_get_method) (class_name , "erase_section_key\0" . as_ptr () as * const c_char) ; table . get_section_keys = (gd_api . godot_method_bind_get_method) (class_name , "get_section_keys\0" . as_ptr () as * const c_char) ; table . get_sections = (gd_api . godot_method_bind_get_method) (class_name , "get_sections\0" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\0" . as_ptr () as * const c_char) ; table . has_section = (gd_api . godot_method_bind_get_method) (class_name , "has_section\0" . as_ptr () as * const c_char) ; table . has_section_key = (gd_api . godot_method_bind_get_method) (class_name , "has_section_key\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted\0" . as_ptr () as * const c_char) ; table . load_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted_pass\0" . as_ptr () as * const c_char) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted\0" . as_ptr () as * const c_char) ; table . save_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted_pass\0" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:622:282238 [INFO] [stdout] | [INFO] [stdout] 622 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 622 | # [doc = "`core singleton class VisualServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const FORMAT_VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const FORMAT_NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const FORMAT_TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const FORMAT_COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const FORMAT_TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const FORMAT_TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const FORMAT_BONES : ArrayFormat = ArrayFormat (64i64) ; pub const FORMAT_WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const FORMAT_INDEX : ArrayFormat = ArrayFormat (256i64) ; pub const COMPRESS_VERTEX : ArrayFormat = ArrayFormat (512i64) ; pub const COMPRESS_NORMAL : ArrayFormat = ArrayFormat (1024i64) ; pub const COMPRESS_TANGENT : ArrayFormat = ArrayFormat (2048i64) ; pub const COMPRESS_COLOR : ArrayFormat = ArrayFormat (4096i64) ; pub const COMPRESS_TEX_UV : ArrayFormat = ArrayFormat (8192i64) ; pub const COMPRESS_TEX_UV2 : ArrayFormat = ArrayFormat (16384i64) ; pub const COMPRESS_BONES : ArrayFormat = ArrayFormat (32768i64) ; pub const COMPRESS_WEIGHTS : ArrayFormat = ArrayFormat (65536i64) ; pub const COMPRESS_DEFAULT : ArrayFormat = ArrayFormat (97280i64) ; pub const COMPRESS_INDEX : ArrayFormat = ArrayFormat (131072i64) ; pub const FLAG_USE_2D_VERTICES : ArrayFormat = ArrayFormat (262144i64) ; pub const FLAG_USE_16_BIT_BONES : ArrayFormat = ArrayFormat (524288i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendShapeMode (pub i64) ; impl BlendShapeMode { pub const NORMALIZED : BlendShapeMode = BlendShapeMode (0i64) ; pub const RELATIVE : BlendShapeMode = BlendShapeMode (1i64) ; } impl From < i64 > for BlendShapeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendShapeMode > for i64 { # [inline] fn from (v : BlendShapeMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasLightMode (pub i64) ; impl CanvasLightMode { pub const ADD : CanvasLightMode = CanvasLightMode (0i64) ; pub const SUB : CanvasLightMode = CanvasLightMode (1i64) ; pub const MIX : CanvasLightMode = CanvasLightMode (2i64) ; pub const MASK : CanvasLightMode = CanvasLightMode (3i64) ; } impl From < i64 > for CanvasLightMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasLightMode > for i64 { # [inline] fn from (v : CanvasLightMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasLightShadowFilter (pub i64) ; impl CanvasLightShadowFilter { pub const NONE : CanvasLightShadowFilter = CanvasLightShadowFilter (0i64) ; pub const PCF3 : CanvasLightShadowFilter = CanvasLightShadowFilter (1i64) ; pub const PCF5 : CanvasLightShadowFilter = CanvasLightShadowFilter (2i64) ; pub const PCF7 : CanvasLightShadowFilter = CanvasLightShadowFilter (3i64) ; pub const PCF9 : CanvasLightShadowFilter = CanvasLightShadowFilter (4i64) ; pub const PCF13 : CanvasLightShadowFilter = CanvasLightShadowFilter (5i64) ; } impl From < i64 > for CanvasLightShadowFilter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasLightShadowFilter > for i64 { # [inline] fn from (v : CanvasLightShadowFilter) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasOccluderPolygonCullMode (pub i64) ; impl CanvasOccluderPolygonCullMode { pub const DISABLED : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (0i64) ; pub const CLOCKWISE : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (1i64) ; pub const COUNTER_CLOCKWISE : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (2i64) ; } impl From < i64 > for CanvasOccluderPolygonCullMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasOccluderPolygonCullMode > for i64 { # [inline] fn from (v : CanvasOccluderPolygonCullMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CubeMapSide (pub i64) ; impl CubeMapSide { pub const LEFT : CubeMapSide = CubeMapSide (0i64) ; pub const RIGHT : CubeMapSide = CubeMapSide (1i64) ; pub const BOTTOM : CubeMapSide = CubeMapSide (2i64) ; pub const TOP : CubeMapSide = CubeMapSide (3i64) ; pub const FRONT : CubeMapSide = CubeMapSide (4i64) ; pub const BACK : CubeMapSide = CubeMapSide (5i64) ; } impl From < i64 > for CubeMapSide { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CubeMapSide > for i64 { # [inline] fn from (v : CubeMapSide) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentBg (pub i64) ; impl EnvironmentBg { pub const CLEAR_COLOR : EnvironmentBg = EnvironmentBg (0i64) ; pub const COLOR : EnvironmentBg = EnvironmentBg (1i64) ; pub const SKY : EnvironmentBg = EnvironmentBg (2i64) ; pub const COLOR_SKY : EnvironmentBg = EnvironmentBg (3i64) ; pub const CANVAS : EnvironmentBg = EnvironmentBg (4i64) ; pub const KEEP : EnvironmentBg = EnvironmentBg (5i64) ; pub const MAX : EnvironmentBg = EnvironmentBg (7i64) ; } impl From < i64 > for EnvironmentBg { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentBg > for i64 { # [inline] fn from (v : EnvironmentBg) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentDofBlurQuality (pub i64) ; impl EnvironmentDofBlurQuality { pub const LOW : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (0i64) ; pub const MEDIUM : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (1i64) ; pub const HIGH : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (2i64) ; } impl From < i64 > for EnvironmentDofBlurQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentDofBlurQuality > for i64 { # [inline] fn from (v : EnvironmentDofBlurQuality) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentGlowBlendMode (pub i64) ; impl EnvironmentGlowBlendMode { pub const ADDITIVE : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (0i64) ; pub const SCREEN : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (1i64) ; pub const SOFTLIGHT : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (2i64) ; pub const REPLACE : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (3i64) ; } impl From < i64 > for EnvironmentGlowBlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentGlowBlendMode > for i64 { # [inline] fn from (v : EnvironmentGlowBlendMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentSsaoBlur (pub i64) ; impl EnvironmentSsaoBlur { pub const DISABLED : EnvironmentSsaoBlur = EnvironmentSsaoBlur (0i64) ; pub const _1X1 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (1i64) ; pub const _2X2 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (2i64) ; pub const _3X3 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (3i64) ; } impl From < i64 > for EnvironmentSsaoBlur { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentSsaoBlur > for i64 { # [inline] fn from (v : EnvironmentSsaoBlur) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentSsaoQuality (pub i64) ; impl EnvironmentSsaoQuality { pub const LOW : EnvironmentSsaoQuality = EnvironmentSsaoQuality (0i64) ; pub const MEDIUM : EnvironmentSsaoQuality = EnvironmentSsaoQuality (1i64) ; pub const HIGH : EnvironmentSsaoQuality = EnvironmentSsaoQuality (2i64) ; } impl From < i64 > for EnvironmentSsaoQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentSsaoQuality > for i64 { # [inline] fn from (v : EnvironmentSsaoQuality) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentToneMapper (pub i64) ; impl EnvironmentToneMapper { pub const LINEAR : EnvironmentToneMapper = EnvironmentToneMapper (0i64) ; pub const REINHARD : EnvironmentToneMapper = EnvironmentToneMapper (1i64) ; pub const FILMIC : EnvironmentToneMapper = EnvironmentToneMapper (2i64) ; pub const ACES : EnvironmentToneMapper = EnvironmentToneMapper (3i64) ; } impl From < i64 > for EnvironmentToneMapper { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentToneMapper > for i64 { # [inline] fn from (v : EnvironmentToneMapper) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Features (pub i64) ; impl Features { pub const SHADERS : Features = Features (0i64) ; pub const MULTITHREADED : Features = Features (1i64) ; } impl From < i64 > for Features { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Features > for i64 { # [inline] fn from (v : Features) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InstanceFlags (pub i64) ; impl InstanceFlags { pub const USE_BAKED_LIGHT : InstanceFlags = InstanceFlags (0i64) ; pub const DRAW_NEXT_FRAME_IF_VISIBLE : InstanceFlags = InstanceFlags (1i64) ; pub const MAX : InstanceFlags = InstanceFlags (2i64) ; } impl From < i64 > for InstanceFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InstanceFlags > for i64 { # [inline] fn from (v : InstanceFlags) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InstanceType (pub i64) ; impl InstanceType { pub const NONE : InstanceType = InstanceType (0i64) ; pub const MESH : InstanceType = InstanceType (1i64) ; pub const MULTIMESH : InstanceType = InstanceType (2i64) ; pub const IMMEDIATE : InstanceType = InstanceType (3i64) ; pub const PARTICLES : InstanceType = InstanceType (4i64) ; pub const LIGHT : InstanceType = InstanceType (5i64) ; pub const REFLECTION_PROBE : InstanceType = InstanceType (6i64) ; pub const GI_PROBE : InstanceType = InstanceType (7i64) ; pub const LIGHTMAP_CAPTURE : InstanceType = InstanceType (8i64) ; pub const MAX : InstanceType = InstanceType (9i64) ; pub const GEOMETRY_MASK : InstanceType = InstanceType (30i64) ; } impl From < i64 > for InstanceType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InstanceType > for i64 { # [inline] fn from (v : InstanceType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightBakeMode (pub i64) ; impl LightBakeMode { pub const DISABLED : LightBakeMode = LightBakeMode (0i64) ; pub const INDIRECT : LightBakeMode = LightBakeMode (1i64) ; pub const ALL : LightBakeMode = LightBakeMode (2i64) ; } impl From < i64 > for LightBakeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightBakeMode > for i64 { # [inline] fn from (v : LightBakeMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightDirectionalShadowDepthRangeMode (pub i64) ; impl LightDirectionalShadowDepthRangeMode { pub const STABLE : LightDirectionalShadowDepthRangeMode = LightDirectionalShadowDepthRangeMode (0i64) ; pub const OPTIMIZED : LightDirectionalShadowDepthRangeMode = LightDirectionalShadowDepthRangeMode (1i64) ; } impl From < i64 > for LightDirectionalShadowDepthRangeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightDirectionalShadowDepthRangeMode > for i64 { # [inline] fn from (v : LightDirectionalShadowDepthRangeMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightDirectionalShadowMode (pub i64) ; impl LightDirectionalShadowMode { pub const ORTHOGONAL : LightDirectionalShadowMode = LightDirectionalShadowMode (0i64) ; pub const PARALLEL_2_SPLITS : LightDirectionalShadowMode = LightDirectionalShadowMode (1i64) ; pub const PARALLEL_4_SPLITS : LightDirectionalShadowMode = LightDirectionalShadowMode (2i64) ; } impl From < i64 > for LightDirectionalShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightDirectionalShadowMode > for i64 { # [inline] fn from (v : LightDirectionalShadowMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightOmniShadowDetail (pub i64) ; impl LightOmniShadowDetail { pub const VERTICAL : LightOmniShadowDetail = LightOmniShadowDetail (0i64) ; pub const HORIZONTAL : LightOmniShadowDetail = LightOmniShadowDetail (1i64) ; } impl From < i64 > for LightOmniShadowDetail { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightOmniShadowDetail > for i64 { # [inline] fn from (v : LightOmniShadowDetail) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightOmniShadowMode (pub i64) ; impl LightOmniShadowMode { pub const DUAL_PARABOLOID : LightOmniShadowMode = LightOmniShadowMode (0i64) ; pub const CUBE : LightOmniShadowMode = LightOmniShadowMode (1i64) ; } impl From < i64 > for LightOmniShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightOmniShadowMode > for i64 { # [inline] fn from (v : LightOmniShadowMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightParam (pub i64) ; impl LightParam { pub const ENERGY : LightParam = LightParam (0i64) ; pub const SPECULAR : LightParam = LightParam (2i64) ; pub const RANGE : LightParam = LightParam (3i64) ; pub const ATTENUATION : LightParam = LightParam (4i64) ; pub const SPOT_ANGLE : LightParam = LightParam (5i64) ; pub const SPOT_ATTENUATION : LightParam = LightParam (6i64) ; pub const CONTACT_SHADOW_SIZE : LightParam = LightParam (7i64) ; pub const SHADOW_MAX_DISTANCE : LightParam = LightParam (8i64) ; pub const SHADOW_SPLIT_1_OFFSET : LightParam = LightParam (9i64) ; pub const SHADOW_SPLIT_2_OFFSET : LightParam = LightParam (10i64) ; pub const SHADOW_SPLIT_3_OFFSET : LightParam = LightParam (11i64) ; pub const SHADOW_NORMAL_BIAS : LightParam = LightParam (12i64) ; pub const SHADOW_BIAS : LightParam = LightParam (13i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : LightParam = LightParam (14i64) ; pub const MAX : LightParam = LightParam (15i64) ; } impl From < i64 > for LightParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightParam > for i64 { # [inline] fn from (v : LightParam) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightType (pub i64) ; impl LightType { pub const DIRECTIONAL : LightType = LightType (0i64) ; pub const OMNI : LightType = LightType (1i64) ; pub const SPOT : LightType = LightType (2i64) ; } impl From < i64 > for LightType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightType > for i64 { # [inline] fn from (v : LightType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshColorFormat (pub i64) ; impl MultimeshColorFormat { pub const NONE : MultimeshColorFormat = MultimeshColorFormat (0i64) ; pub const _8BIT : MultimeshColorFormat = MultimeshColorFormat (1i64) ; pub const FLOAT : MultimeshColorFormat = MultimeshColorFormat (2i64) ; } impl From < i64 > for MultimeshColorFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshColorFormat > for i64 { # [inline] fn from (v : MultimeshColorFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshCustomDataFormat (pub i64) ; impl MultimeshCustomDataFormat { pub const NONE : MultimeshCustomDataFormat = MultimeshCustomDataFormat (0i64) ; pub const _8BIT : MultimeshCustomDataFormat = MultimeshCustomDataFormat (1i64) ; pub const FLOAT : MultimeshCustomDataFormat = MultimeshCustomDataFormat (2i64) ; } impl From < i64 > for MultimeshCustomDataFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshCustomDataFormat > for i64 { # [inline] fn from (v : MultimeshCustomDataFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshTransformFormat (pub i64) ; impl MultimeshTransformFormat { pub const _2D : MultimeshTransformFormat = MultimeshTransformFormat (0i64) ; pub const _3D : MultimeshTransformFormat = MultimeshTransformFormat (1i64) ; } impl From < i64 > for MultimeshTransformFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshTransformFormat > for i64 { # [inline] fn from (v : MultimeshTransformFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct NinePatchAxisMode (pub i64) ; impl NinePatchAxisMode { pub const STRETCH : NinePatchAxisMode = NinePatchAxisMode (0i64) ; pub const TILE : NinePatchAxisMode = NinePatchAxisMode (1i64) ; pub const TILE_FIT : NinePatchAxisMode = NinePatchAxisMode (2i64) ; } impl From < i64 > for NinePatchAxisMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < NinePatchAxisMode > for i64 { # [inline] fn from (v : NinePatchAxisMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ParticlesDrawOrder (pub i64) ; impl ParticlesDrawOrder { pub const INDEX : ParticlesDrawOrder = ParticlesDrawOrder (0i64) ; pub const LIFETIME : ParticlesDrawOrder = ParticlesDrawOrder (1i64) ; pub const VIEW_DEPTH : ParticlesDrawOrder = ParticlesDrawOrder (2i64) ; } impl From < i64 > for ParticlesDrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ParticlesDrawOrder > for i64 { # [inline] fn from (v : ParticlesDrawOrder) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PrimitiveType (pub i64) ; impl PrimitiveType { pub const POINTS : PrimitiveType = PrimitiveType (0i64) ; pub const LINES : PrimitiveType = PrimitiveType (1i64) ; pub const LINE_STRIP : PrimitiveType = PrimitiveType (2i64) ; pub const LINE_LOOP : PrimitiveType = PrimitiveType (3i64) ; pub const TRIANGLES : PrimitiveType = PrimitiveType (4i64) ; pub const TRIANGLE_STRIP : PrimitiveType = PrimitiveType (5i64) ; pub const TRIANGLE_FAN : PrimitiveType = PrimitiveType (6i64) ; pub const MAX : PrimitiveType = PrimitiveType (7i64) ; } impl From < i64 > for PrimitiveType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PrimitiveType > for i64 { # [inline] fn from (v : PrimitiveType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ReflectionProbeUpdateMode (pub i64) ; impl ReflectionProbeUpdateMode { pub const ONCE : ReflectionProbeUpdateMode = ReflectionProbeUpdateMode (0i64) ; pub const ALWAYS : ReflectionProbeUpdateMode = ReflectionProbeUpdateMode (1i64) ; } impl From < i64 > for ReflectionProbeUpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ReflectionProbeUpdateMode > for i64 { # [inline] fn from (v : ReflectionProbeUpdateMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RenderInfo (pub i64) ; impl RenderInfo { pub const OBJECTS_IN_FRAME : RenderInfo = RenderInfo (0i64) ; pub const VERTICES_IN_FRAME : RenderInfo = RenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : RenderInfo = RenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : RenderInfo = RenderInfo (3i64) ; pub const SURFACE_CHANGES_IN_FRAME : RenderInfo = RenderInfo (4i64) ; pub const DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (5i64) ; pub const _2D_ITEMS_IN_FRAME : RenderInfo = RenderInfo (6i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (7i64) ; pub const USAGE_VIDEO_MEM_TOTAL : RenderInfo = RenderInfo (8i64) ; pub const VIDEO_MEM_USED : RenderInfo = RenderInfo (9i64) ; pub const TEXTURE_MEM_USED : RenderInfo = RenderInfo (10i64) ; pub const VERTEX_MEM_USED : RenderInfo = RenderInfo (11i64) ; } impl From < i64 > for RenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RenderInfo > for i64 { # [inline] fn from (v : RenderInfo) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ScenarioDebugMode (pub i64) ; impl ScenarioDebugMode { pub const DISABLED : ScenarioDebugMode = ScenarioDebugMode (0i64) ; pub const WIREFRAME : ScenarioDebugMode = ScenarioDebugMode (1i64) ; pub const OVERDRAW : ScenarioDebugMode = ScenarioDebugMode (2i64) ; pub const SHADELESS : ScenarioDebugMode = ScenarioDebugMode (3i64) ; } impl From < i64 > for ScenarioDebugMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ScenarioDebugMode > for i64 { # [inline] fn from (v : ScenarioDebugMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShaderMode (pub i64) ; impl ShaderMode { pub const SPATIAL : ShaderMode = ShaderMode (0i64) ; pub const CANVAS_ITEM : ShaderMode = ShaderMode (1i64) ; pub const PARTICLES : ShaderMode = ShaderMode (2i64) ; pub const MAX : ShaderMode = ShaderMode (3i64) ; } impl From < i64 > for ShaderMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShaderMode > for i64 { # [inline] fn from (v : ShaderMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowCastingSetting (pub i64) ; impl ShadowCastingSetting { pub const OFF : ShadowCastingSetting = ShadowCastingSetting (0i64) ; pub const ON : ShadowCastingSetting = ShadowCastingSetting (1i64) ; pub const DOUBLE_SIDED : ShadowCastingSetting = ShadowCastingSetting (2i64) ; pub const SHADOWS_ONLY : ShadowCastingSetting = ShadowCastingSetting (3i64) ; } impl From < i64 > for ShadowCastingSetting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowCastingSetting > for i64 { # [inline] fn from (v : ShadowCastingSetting) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureFlags (pub i64) ; impl TextureFlags { pub const FLAG_MIPMAPS : TextureFlags = TextureFlags (1i64) ; pub const FLAG_REPEAT : TextureFlags = TextureFlags (2i64) ; pub const FLAG_FILTER : TextureFlags = TextureFlags (4i64) ; pub const FLAGS_DEFAULT : TextureFlags = TextureFlags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : TextureFlags = TextureFlags (8i64) ; pub const FLAG_CONVERT_TO_LINEAR : TextureFlags = TextureFlags (16i64) ; pub const FLAG_MIRRORED_REPEAT : TextureFlags = TextureFlags (32i64) ; pub const FLAG_USED_FOR_STREAMING : TextureFlags = TextureFlags (2048i64) ; } impl From < i64 > for TextureFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureFlags > for i64 { # [inline] fn from (v : TextureFlags) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const _2D : TextureType = TextureType (0i64) ; pub const CUBEMAP : TextureType = TextureType (2i64) ; pub const _2D_ARRAY : TextureType = TextureType (3i64) ; pub const _3D : TextureType = TextureType (4i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportClearMode (pub i64) ; impl ViewportClearMode { pub const ALWAYS : ViewportClearMode = ViewportClearMode (0i64) ; pub const NEVER : ViewportClearMode = ViewportClearMode (1i64) ; pub const ONLY_NEXT_FRAME : ViewportClearMode = ViewportClearMode (2i64) ; } impl From < i64 > for ViewportClearMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportClearMode > for i64 { # [inline] fn from (v : ViewportClearMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportDebugDraw (pub i64) ; impl ViewportDebugDraw { pub const DISABLED : ViewportDebugDraw = ViewportDebugDraw (0i64) ; pub const UNSHADED : ViewportDebugDraw = ViewportDebugDraw (1i64) ; pub const OVERDRAW : ViewportDebugDraw = ViewportDebugDraw (2i64) ; pub const WIREFRAME : ViewportDebugDraw = ViewportDebugDraw (3i64) ; } impl From < i64 > for ViewportDebugDraw { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportDebugDraw > for i64 { # [inline] fn from (v : ViewportDebugDraw) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportMsaa (pub i64) ; impl ViewportMsaa { pub const DISABLED : ViewportMsaa = ViewportMsaa (0i64) ; pub const _2X : ViewportMsaa = ViewportMsaa (1i64) ; pub const _4X : ViewportMsaa = ViewportMsaa (2i64) ; pub const _8X : ViewportMsaa = ViewportMsaa (3i64) ; pub const _16X : ViewportMsaa = ViewportMsaa (4i64) ; pub const EXT_2X : ViewportMsaa = ViewportMsaa (5i64) ; pub const EXT_4X : ViewportMsaa = ViewportMsaa (6i64) ; } impl From < i64 > for ViewportMsaa { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportMsaa > for i64 { # [inline] fn from (v : ViewportMsaa) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportRenderInfo (pub i64) ; impl ViewportRenderInfo { pub const OBJECTS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (0i64) ; pub const VERTICES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (3i64) ; pub const SURFACE_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (4i64) ; pub const DRAW_CALLS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (5i64) ; pub const _2D_ITEMS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (6i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (7i64) ; pub const MAX : ViewportRenderInfo = ViewportRenderInfo (8i64) ; } impl From < i64 > for ViewportRenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportRenderInfo > for i64 { # [inline] fn from (v : ViewportRenderInfo) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportUpdateMode (pub i64) ; impl ViewportUpdateMode { pub const DISABLED : ViewportUpdateMode = ViewportUpdateMode (0i64) ; pub const ONCE : ViewportUpdateMode = ViewportUpdateMode (1i64) ; pub const WHEN_VISIBLE : ViewportUpdateMode = ViewportUpdateMode (2i64) ; pub const ALWAYS : ViewportUpdateMode = ViewportUpdateMode (3i64) ; } impl From < i64 > for ViewportUpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportUpdateMode > for i64 { # [inline] fn from (v : ViewportUpdateMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportUsage (pub i64) ; impl ViewportUsage { pub const _2D : ViewportUsage = ViewportUsage (0i64) ; pub const _2D_NO_SAMPLING : ViewportUsage = ViewportUsage (1i64) ; pub const _3D : ViewportUsage = ViewportUsage (2i64) ; pub const _3D_NO_EFFECTS : ViewportUsage = ViewportUsage (3i64) ; } impl From < i64 > for ViewportUsage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportUsage > for i64 { # [inline] fn from (v : ViewportUsage) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualServer { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 97280i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const CANVAS_ITEM_Z_MAX : i64 = 4096i64 ; pub const CANVAS_ITEM_Z_MIN : i64 = - 4096i64 ; pub const CANVAS_LIGHT_FILTER_NONE : i64 = 0i64 ; pub const CANVAS_LIGHT_FILTER_PCF13 : i64 = 5i64 ; pub const CANVAS_LIGHT_FILTER_PCF3 : i64 = 1i64 ; pub const CANVAS_LIGHT_FILTER_PCF5 : i64 = 2i64 ; pub const CANVAS_LIGHT_FILTER_PCF7 : i64 = 3i64 ; pub const CANVAS_LIGHT_FILTER_PCF9 : i64 = 4i64 ; pub const CANVAS_LIGHT_MODE_ADD : i64 = 0i64 ; pub const CANVAS_LIGHT_MODE_MASK : i64 = 3i64 ; pub const CANVAS_LIGHT_MODE_MIX : i64 = 2i64 ; pub const CANVAS_LIGHT_MODE_SUB : i64 = 1i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE : i64 = 1i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE : i64 = 2i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_DISABLED : i64 = 0i64 ; pub const CUBEMAP_BACK : i64 = 5i64 ; pub const CUBEMAP_BOTTOM : i64 = 2i64 ; pub const CUBEMAP_FRONT : i64 = 4i64 ; pub const CUBEMAP_LEFT : i64 = 0i64 ; pub const CUBEMAP_RIGHT : i64 = 1i64 ; pub const CUBEMAP_TOP : i64 = 3i64 ; pub const ENV_BG_CANVAS : i64 = 4i64 ; pub const ENV_BG_CLEAR_COLOR : i64 = 0i64 ; pub const ENV_BG_COLOR : i64 = 1i64 ; pub const ENV_BG_COLOR_SKY : i64 = 3i64 ; pub const ENV_BG_KEEP : i64 = 5i64 ; pub const ENV_BG_MAX : i64 = 7i64 ; pub const ENV_BG_SKY : i64 = 2i64 ; pub const ENV_DOF_BLUR_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_DOF_BLUR_QUALITY_LOW : i64 = 0i64 ; pub const ENV_DOF_BLUR_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_SSAO_BLUR_1x1 : i64 = 1i64 ; pub const ENV_SSAO_BLUR_2x2 : i64 = 2i64 ; pub const ENV_SSAO_BLUR_3x3 : i64 = 3i64 ; pub const ENV_SSAO_BLUR_DISABLED : i64 = 0i64 ; pub const ENV_SSAO_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_SSAO_QUALITY_LOW : i64 = 0i64 ; pub const ENV_SSAO_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_TONE_MAPPER_ACES : i64 = 3i64 ; pub const ENV_TONE_MAPPER_FILMIC : i64 = 2i64 ; pub const ENV_TONE_MAPPER_LINEAR : i64 = 0i64 ; pub const ENV_TONE_MAPPER_REINHARD : i64 = 1i64 ; pub const FEATURE_MULTITHREADED : i64 = 1i64 ; pub const FEATURE_SHADERS : i64 = 0i64 ; pub const GLOW_BLEND_MODE_ADDITIVE : i64 = 0i64 ; pub const GLOW_BLEND_MODE_REPLACE : i64 = 3i64 ; pub const GLOW_BLEND_MODE_SCREEN : i64 = 1i64 ; pub const GLOW_BLEND_MODE_SOFTLIGHT : i64 = 2i64 ; pub const INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const INFO_TEXTURE_MEM_USED : i64 = 10i64 ; pub const INFO_USAGE_VIDEO_MEM_TOTAL : i64 = 8i64 ; pub const INFO_VERTEX_MEM_USED : i64 = 11i64 ; pub const INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const INFO_VIDEO_MEM_USED : i64 = 9i64 ; pub const INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const INSTANCE_FLAG_MAX : i64 = 2i64 ; pub const INSTANCE_FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const INSTANCE_GEOMETRY_MASK : i64 = 30i64 ; pub const INSTANCE_GI_PROBE : i64 = 7i64 ; pub const INSTANCE_IMMEDIATE : i64 = 3i64 ; pub const INSTANCE_LIGHT : i64 = 5i64 ; pub const INSTANCE_LIGHTMAP_CAPTURE : i64 = 8i64 ; pub const INSTANCE_MAX : i64 = 9i64 ; pub const INSTANCE_MESH : i64 = 1i64 ; pub const INSTANCE_MULTIMESH : i64 = 2i64 ; pub const INSTANCE_NONE : i64 = 0i64 ; pub const INSTANCE_PARTICLES : i64 = 4i64 ; pub const INSTANCE_REFLECTION_PROBE : i64 = 6i64 ; pub const LIGHT_BAKE_ALL : i64 = 2i64 ; pub const LIGHT_BAKE_DISABLED : i64 = 0i64 ; pub const LIGHT_BAKE_INDIRECT : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS : i64 = 2i64 ; pub const LIGHT_OMNI : i64 = 1i64 ; pub const LIGHT_OMNI_SHADOW_CUBE : i64 = 1i64 ; pub const LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL : i64 = 1i64 ; pub const LIGHT_OMNI_SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const LIGHT_OMNI_SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; pub const LIGHT_PARAM_ATTENUATION : i64 = 4i64 ; pub const LIGHT_PARAM_CONTACT_SHADOW_SIZE : i64 = 7i64 ; pub const LIGHT_PARAM_ENERGY : i64 = 0i64 ; pub const LIGHT_PARAM_MAX : i64 = 15i64 ; pub const LIGHT_PARAM_RANGE : i64 = 3i64 ; pub const LIGHT_PARAM_SHADOW_BIAS : i64 = 13i64 ; pub const LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 14i64 ; pub const LIGHT_PARAM_SHADOW_MAX_DISTANCE : i64 = 8i64 ; pub const LIGHT_PARAM_SHADOW_NORMAL_BIAS : i64 = 12i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 9i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 10i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 11i64 ; pub const LIGHT_PARAM_SPECULAR : i64 = 2i64 ; pub const LIGHT_PARAM_SPOT_ANGLE : i64 = 5i64 ; pub const LIGHT_PARAM_SPOT_ATTENUATION : i64 = 6i64 ; pub const LIGHT_SPOT : i64 = 2i64 ; pub const MATERIAL_RENDER_PRIORITY_MAX : i64 = 127i64 ; pub const MATERIAL_RENDER_PRIORITY_MIN : i64 = - 128i64 ; pub const MAX_CURSORS : i64 = 8i64 ; pub const MAX_GLOW_LEVELS : i64 = 7i64 ; pub const MULTIMESH_COLOR_8BIT : i64 = 1i64 ; pub const MULTIMESH_COLOR_FLOAT : i64 = 2i64 ; pub const MULTIMESH_COLOR_NONE : i64 = 0i64 ; pub const MULTIMESH_CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const MULTIMESH_CUSTOM_DATA_FLOAT : i64 = 2i64 ; pub const MULTIMESH_CUSTOM_DATA_NONE : i64 = 0i64 ; pub const MULTIMESH_TRANSFORM_2D : i64 = 0i64 ; pub const MULTIMESH_TRANSFORM_3D : i64 = 1i64 ; pub const NINE_PATCH_STRETCH : i64 = 0i64 ; pub const NINE_PATCH_TILE : i64 = 1i64 ; pub const NINE_PATCH_TILE_FIT : i64 = 2i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; pub const PARTICLES_DRAW_ORDER_INDEX : i64 = 0i64 ; pub const PARTICLES_DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const PARTICLES_DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const PRIMITIVE_MAX : i64 = 7i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; pub const REFLECTION_PROBE_UPDATE_ALWAYS : i64 = 1i64 ; pub const REFLECTION_PROBE_UPDATE_ONCE : i64 = 0i64 ; pub const SCENARIO_DEBUG_DISABLED : i64 = 0i64 ; pub const SCENARIO_DEBUG_OVERDRAW : i64 = 2i64 ; pub const SCENARIO_DEBUG_SHADELESS : i64 = 3i64 ; pub const SCENARIO_DEBUG_WIREFRAME : i64 = 1i64 ; pub const SHADER_CANVAS_ITEM : i64 = 1i64 ; pub const SHADER_MAX : i64 = 3i64 ; pub const SHADER_PARTICLES : i64 = 2i64 ; pub const SHADER_SPATIAL : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; pub const TEXTURE_FLAGS_DEFAULT : i64 = 7i64 ; pub const TEXTURE_FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const TEXTURE_FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const TEXTURE_FLAG_FILTER : i64 = 4i64 ; pub const TEXTURE_FLAG_MIPMAPS : i64 = 1i64 ; pub const TEXTURE_FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const TEXTURE_FLAG_REPEAT : i64 = 2i64 ; pub const TEXTURE_FLAG_USED_FOR_STREAMING : i64 = 2048i64 ; pub const TEXTURE_TYPE_2D : i64 = 0i64 ; pub const TEXTURE_TYPE_2D_ARRAY : i64 = 3i64 ; pub const TEXTURE_TYPE_3D : i64 = 4i64 ; pub const TEXTURE_TYPE_CUBEMAP : i64 = 2i64 ; pub const VIEWPORT_CLEAR_ALWAYS : i64 = 0i64 ; pub const VIEWPORT_CLEAR_NEVER : i64 = 1i64 ; pub const VIEWPORT_CLEAR_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const VIEWPORT_DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const VIEWPORT_DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const VIEWPORT_DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const VIEWPORT_DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const VIEWPORT_MSAA_16X : i64 = 4i64 ; pub const VIEWPORT_MSAA_2X : i64 = 1i64 ; pub const VIEWPORT_MSAA_4X : i64 = 2i64 ; pub const VIEWPORT_MSAA_8X : i64 = 3i64 ; pub const VIEWPORT_MSAA_DISABLED : i64 = 0i64 ; pub const VIEWPORT_MSAA_EXT_2X : i64 = 5i64 ; pub const VIEWPORT_MSAA_EXT_4X : i64 = 6i64 ; pub const VIEWPORT_RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const VIEWPORT_RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const VIEWPORT_RENDER_INFO_MAX : i64 = 8i64 ; pub const VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const VIEWPORT_UPDATE_ALWAYS : i64 = 3i64 ; pub const VIEWPORT_UPDATE_DISABLED : i64 = 0i64 ; pub const VIEWPORT_UPDATE_ONCE : i64 = 1i64 ; pub const VIEWPORT_UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const VIEWPORT_USAGE_2D : i64 = 0i64 ; pub const VIEWPORT_USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const VIEWPORT_USAGE_3D : i64 = 2i64 ; pub const VIEWPORT_USAGE_3D_NO_EFFECTS : i64 = 3i64 ; } impl VisualServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Sets images to be rendered in the window margin."] # [doc = ""] # [inline] pub fn black_bars_set_images (& self , left : Rid , top : Rid , right : Rid , bottom : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . black_bars_set_images ; let ret = crate :: icalls :: icallptr_void_rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , left , top , right , bottom) ; } } # [doc = "Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered."] # [doc = ""] # [inline] pub fn black_bars_set_margins (& self , left : i64 , top : i64 , right : i64 , bottom : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . black_bars_set_margins ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , left , top , right , bottom) ; } } # [doc = "Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn camera_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera.cull_mask]."] # [doc = ""] # [inline] pub fn camera_set_cull_mask (& self , camera : Rid , layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_cull_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , camera , layers) ; } } # [doc = "Sets the environment used by this camera. Equivalent to [member Camera.environment]."] # [doc = ""] # [inline] pub fn camera_set_environment (& self , camera : Rid , env : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_environment ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , camera , env) ; } } # [doc = "Sets camera to use frustum projection. This mode allows adjusting the `offset` argument to create \"tilted frustum\" effects."] # [doc = ""] # [inline] pub fn camera_set_frustum (& self , camera : Rid , size : f64 , offset : Vector2 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_frustum ; let ret = crate :: icalls :: icallptr_void_rid_f64_vec2_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size , offset , z_near , z_far) ; } } # [doc = "Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are."] # [doc = ""] # [inline] pub fn camera_set_orthogonal (& self , camera : Rid , size : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_orthogonal ; let ret = crate :: icalls :: icallptr_void_rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size , z_near , z_far) ; } } # [doc = "Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away."] # [doc = ""] # [inline] pub fn camera_set_perspective (& self , camera : Rid , fovy_degrees : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_perspective ; let ret = crate :: icalls :: icallptr_void_rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , fovy_degrees , z_near , z_far) ; } } # [doc = "Sets [Transform] of camera."] # [doc = ""] # [inline] pub fn camera_set_transform (& self , camera : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , camera , transform) ; } } # [doc = "If `true`, preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If `false`, preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]."] # [doc = ""] # [inline] pub fn camera_set_use_vertical_aspect (& self , camera : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_use_vertical_aspect ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , camera , enable) ; } } # [doc = "Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Adds a circle command to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub fn canvas_item_add_circle (& self , item : Rid , pos : Vector2 , radius : f64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_circle ; let ret = crate :: icalls :: icallptr_void_rid_vec2_f64_color (method_bind , self . this . sys () . as_ptr () , item , pos , radius , color) ; } } # [doc = "If ignore is `true`, the VisualServer does not perform clipping."] # [doc = ""] # [inline] pub fn canvas_item_add_clip_ignore (& self , item : Rid , ignore : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_clip_ignore ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , ignore) ; } } # [doc = "Adds a line command to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_line (& self , item : Rid , from : Vector2 , to : Vector2 , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_line ; let ret = crate :: icalls :: icallptr_void_rid_vec2_vec2_color_f64_bool (method_bind , self . this . sys () . as_ptr () , item , from , to , color , width , antialiased) ; } } # [doc = "Adds a mesh command to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn canvas_item_add_mesh (& self , item : Rid , mesh : Rid , transform : Transform2D , modulate : Color , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_mesh ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D_color_rid_rid (method_bind , self . this . sys () . as_ptr () , item , mesh , transform , modulate , texture , normal_map) ; } } # [doc = "Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment."] # [doc = ""] # [inline] pub fn canvas_item_add_multimesh (& self , item : Rid , mesh : Rid , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_multimesh ; let ret = crate :: icalls :: icallptr_void_rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , item , mesh , texture , normal_map) ; } } # [doc = "Adds a nine patch image to the [CanvasItem]'s draw commands.\nSee [NinePatchRect] for more explanation.\n# Default Arguments\n* `x_axis_mode` - `0`\n* `y_axis_mode` - `0`\n* `draw_center` - `true`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn canvas_item_add_nine_patch (& self , item : Rid , rect : Rect2 , source : Rect2 , texture : Rid , topleft : Vector2 , bottomright : Vector2 , x_axis_mode : i64 , y_axis_mode : i64 , draw_center : bool , modulate : Color , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_nine_patch ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rect2_rid_vec2_vec2_i64_i64_bool_color_rid (method_bind , self . this . sys () . as_ptr () , item , rect , source , texture , topleft , bottomright , x_axis_mode , y_axis_mode , draw_center , modulate , normal_map) ; } } # [doc = "Adds a particle system to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub fn canvas_item_add_particles (& self , item : Rid , particles : Rid , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_particles ; let ret = crate :: icalls :: icallptr_void_rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , item , particles , texture , normal_map) ; } } # [doc = "Adds a polygon to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `uvs` - `PoolVector2Array( )`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_polygon (& self , item : Rid , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , texture : Rid , normal_map : Rid , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_polygon ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr_colorarr_vec2arr_rid_rid_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , normal_map , antialiased) ; } } # [doc = "Adds a polyline, which is a line from multiple points with a width, to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_polyline (& self , item : Rid , points : Vector2Array , colors : ColorArray , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_polyline ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , width , antialiased) ; } } # [doc = "Adds a primitive to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`"] # [doc = ""] # [inline] pub fn canvas_item_add_primitive (& self , item : Rid , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , texture : Rid , width : f64 , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_primitive ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr_colorarr_vec2arr_rid_f64_rid (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , width , normal_map) ; } } # [doc = "Adds a rectangle to the [CanvasItem]'s draw commands."] # [doc = ""] # [inline] pub fn canvas_item_add_rect (& self , item : Rid , rect : Rect2 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_rect ; let ret = crate :: icalls :: icallptr_void_rid_rect2_color (method_bind , self . this . sys () . as_ptr () , item , rect , color) ; } } # [doc = "Adds a [Transform2D] command to the [CanvasItem]'s draw commands.\nThis sets the extra_matrix uniform when executed. This affects the later commands of the canvas item."] # [doc = ""] # [inline] pub fn canvas_item_add_set_transform (& self , item : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Adds a textured rect to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `tile` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_texture_rect (& self , item : Rid , rect : Rect2 , texture : Rid , tile : bool , modulate : Color , transpose : bool , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_texture_rect ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rid_bool_color_bool_rid (method_bind , self . this . sys () . as_ptr () , item , rect , texture , tile , modulate , transpose , normal_map) ; } } # [doc = "Adds a texture rect with region setting to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `clip_uv` - `true`"] # [doc = ""] # [inline] pub fn canvas_item_add_texture_rect_region (& self , item : Rid , rect : Rect2 , texture : Rid , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : Rid , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_texture_rect_region ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rid_rect2_color_bool_rid_bool (method_bind , self . this . sys () . as_ptr () , item , rect , texture , src_rect , modulate , transpose , normal_map , clip_uv) ; } } # [doc = "Adds a triangle array to the [CanvasItem]'s draw commands.\n# Default Arguments\n* `uvs` - `PoolVector2Array( )`\n* `bones` - `PoolIntArray( )`\n* `weights` - `PoolRealArray( )`\n* `count` - `-1`\n* `antialiased` - `false`\n* `antialiasing_use_indices` - `false`"] # [doc = ""] # [inline] pub fn canvas_item_add_triangle_array (& self , item : Rid , indices : Int32Array , points : Vector2Array , colors : ColorArray , uvs : Vector2Array , bones : Int32Array , weights : Float32Array , texture : Rid , count : i64 , normal_map : Rid , antialiased : bool , antialiasing_use_indices : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_triangle_array ; let ret = crate :: icalls :: icallptr_void_rid_i32arr_vec2arr_colorarr_vec2arr_i32arr_f32arr_rid_i64_rid_bool_bool (method_bind , self . this . sys () . as_ptr () , item , indices , points , colors , uvs , bones , weights , texture , count , normal_map , antialiased , antialiasing_use_indices) ; } } # [doc = "Clears the [CanvasItem] and removes all commands in it."] # [doc = ""] # [inline] pub fn canvas_item_clear (& self , item : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_clear ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , item) ; } } # [doc = "Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_item_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_item_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets clipping for the [CanvasItem]."] # [doc = ""] # [inline] pub fn canvas_item_set_clip (& self , item : Rid , clip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_clip ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , clip) ; } } # [doc = "Sets the [CanvasItem] to copy a rect to the backbuffer."] # [doc = ""] # [inline] pub fn canvas_item_set_copy_to_backbuffer (& self , item : Rid , enabled : bool , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_copy_to_backbuffer ; let ret = crate :: icalls :: icallptr_void_rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , enabled , rect) ; } } # [doc = "Defines a custom drawing rectangle for the [CanvasItem].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`"] # [doc = ""] # [inline] pub fn canvas_item_set_custom_rect (& self , item : Rid , use_custom_rect : bool , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_custom_rect ; let ret = crate :: icalls :: icallptr_void_rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , use_custom_rect , rect) ; } } # [doc = "Enables the use of distance fields for GUI elements that are rendering distance field based fonts."] # [doc = ""] # [inline] pub fn canvas_item_set_distance_field_mode (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_distance_field_mode ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets [CanvasItem] to be drawn behind its parent."] # [doc = ""] # [inline] pub fn canvas_item_set_draw_behind_parent (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_draw_behind_parent ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the index for the [CanvasItem]."] # [doc = ""] # [inline] pub fn canvas_item_set_draw_index (& self , item : Rid , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_draw_index ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , index) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub fn canvas_item_set_light_mask (& self , item : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_light_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , mask) ; } } # [doc = "Sets a new material to the [CanvasItem]."] # [doc = ""] # [inline] pub fn canvas_item_set_material (& self , item : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_material ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , item , material) ; } } # [doc = "Sets the color that modulates the [CanvasItem] and its children."] # [doc = ""] # [inline] pub fn canvas_item_set_modulate (& self , item : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_modulate ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport."] # [doc = ""] # [inline] pub fn canvas_item_set_parent (& self , item : Rid , parent : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_parent ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , item , parent) ; } } # [doc = "Sets the color that modulates the [CanvasItem] without children."] # [doc = ""] # [inline] pub fn canvas_item_set_self_modulate (& self , item : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_self_modulate ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets if [CanvasItem]'s children should be sorted by y-position."] # [doc = ""] # [inline] pub fn canvas_item_set_sort_children_by_y (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_sort_children_by_y ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the [CanvasItem]'s [Transform2D]."] # [doc = ""] # [inline] pub fn canvas_item_set_transform (& self , item : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Sets if the [CanvasItem] uses its parent's material."] # [doc = ""] # [inline] pub fn canvas_item_set_use_parent_material (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_use_parent_material ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets if the canvas item (including its children) is visible."] # [doc = ""] # [inline] pub fn canvas_item_set_visible (& self , item : Rid , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_visible ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , visible) ; } } # [doc = "If this is enabled, the Z index of the parent will be added to the children's Z index."] # [doc = ""] # [inline] pub fn canvas_item_set_z_as_relative_to_parent (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_z_as_relative_to_parent ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled) ; } } # [doc = "Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first)."] # [doc = ""] # [inline] pub fn canvas_item_set_z_index (& self , item : Rid , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_z_index ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , item , z_index) ; } } # [doc = "Attaches the canvas light to the canvas. Removes it from its previous canvas."] # [doc = ""] # [inline] pub fn canvas_light_attach_to_canvas (& self , light : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_attach_to_canvas ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , light , canvas) ; } } # [doc = "Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Attaches a light occluder to the canvas. Removes it from its previous canvas."] # [doc = ""] # [inline] pub fn canvas_light_occluder_attach_to_canvas (& self , occluder : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_attach_to_canvas ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , occluder , canvas) ; } } # [doc = "Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_ocluder_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_light_occluder_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Enables or disables light occluder."] # [doc = ""] # [inline] pub fn canvas_light_occluder_set_enabled (& self , occluder : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_enabled ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , occluder , enabled) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub fn canvas_light_occluder_set_light_mask (& self , occluder : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_light_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder , mask) ; } } # [doc = "Sets a light occluder's polygon."] # [doc = ""] # [inline] pub fn canvas_light_occluder_set_polygon (& self , occluder : Rid , polygon : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_polygon ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , occluder , polygon) ; } } # [doc = "Sets a light occluder's [Transform2D]."] # [doc = ""] # [inline] pub fn canvas_light_occluder_set_transform (& self , occluder : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , occluder , transform) ; } } # [doc = "Sets the color for a light."] # [doc = ""] # [inline] pub fn canvas_light_set_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables a canvas light."] # [doc = ""] # [inline] pub fn canvas_light_set_enabled (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_enabled ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets a canvas light's energy."] # [doc = ""] # [inline] pub fn canvas_light_set_energy (& self , light : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_energy ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , energy) ; } } # [doc = "Sets a canvas light's height."] # [doc = ""] # [inline] pub fn canvas_light_set_height (& self , light : Rid , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_height ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , height) ; } } # [doc = "The light mask. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub fn canvas_light_set_item_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_item_cull_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks."] # [doc = ""] # [inline] pub fn canvas_light_set_item_shadow_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_item_shadow_cull_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "The layer range that gets rendered with this light."] # [doc = ""] # [inline] pub fn canvas_light_set_layer_range (& self , light : Rid , min_layer : i64 , max_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_layer_range ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_layer , max_layer) ; } } # [doc = "The mode of the light, see [enum CanvasLightMode] constants."] # [doc = ""] # [inline] pub fn canvas_light_set_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [doc = "Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]."] # [doc = ""] # [inline] pub fn canvas_light_set_scale (& self , light : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_scale ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , scale) ; } } # [doc = "Sets the width of the shadow buffer, size gets scaled to the next power of two for this."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_buffer_size (& self , light : Rid , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_buffer_size ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , size) ; } } # [doc = "Sets the color of the canvas light's shadow."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables the canvas light's shadow."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_enabled (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_enabled ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_filter (& self , light : Rid , filter : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_filter ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , filter) ; } } # [doc = "Sets the length of the shadow's gradient."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_gradient_length (& self , light : Rid , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_gradient_length ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , length) ; } } # [doc = "Smoothens the shadow. The lower, the smoother."] # [doc = ""] # [inline] pub fn canvas_light_set_shadow_smooth (& self , light : Rid , smooth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_smooth ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , light , smooth) ; } } # [doc = "Sets texture to be used by light. Equivalent to [member Light2D.texture]."] # [doc = ""] # [inline] pub fn canvas_light_set_texture (& self , light : Rid , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_texture ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , light , texture) ; } } # [doc = "Sets the offset of the light's texture. Equivalent to [member Light2D.offset]."] # [doc = ""] # [inline] pub fn canvas_light_set_texture_offset (& self , light : Rid , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_texture_offset ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , light , offset) ; } } # [doc = "Sets the canvas light's [Transform2D]."] # [doc = ""] # [inline] pub fn canvas_light_set_transform (& self , light : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , light , transform) ; } } # [doc = "Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]."] # [doc = ""] # [inline] pub fn canvas_light_set_z_range (& self , light : Rid , min_z : i64 , max_z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_z_range ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_z , max_z) ; } } # [doc = "Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_occluder_polygon_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_set_cull_mode (& self , occluder_polygon : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_cull_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder_polygon , mode) ; } } # [doc = "Sets the shape of the occluder polygon."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_set_shape (& self , occluder_polygon : Rid , shape : Vector2Array , closed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr_bool (method_bind , self . this . sys () . as_ptr () , occluder_polygon , shape , closed) ; } } # [doc = "Sets the shape of the occluder polygon as lines."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_set_shape_as_lines (& self , occluder_polygon : Rid , shape : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape_as_lines ; let ret = crate :: icalls :: icallptr_void_rid_vec2arr (method_bind , self . this . sys () . as_ptr () , occluder_polygon , shape) ; } } # [doc = "A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2]."] # [doc = ""] # [inline] pub fn canvas_set_item_mirroring (& self , canvas : Rid , item : Rid , mirroring : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_set_item_mirroring ; let ret = crate :: icalls :: icallptr_void_rid_rid_vec2 (method_bind , self . this . sys () . as_ptr () , canvas , item , mirroring) ; } } # [doc = "Modulates all colors in the given canvas."] # [doc = ""] # [inline] pub fn canvas_set_modulate (& self , canvas : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_set_modulate ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , canvas , color) ; } } # [doc = "Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn directional_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . directional_light_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead.\n# Default Arguments\n* `swap_buffers` - `true`\n* `frame_step` - `0.0`"] # [doc = ""] # [inline] pub fn draw (& self , swap_buffers : bool , frame_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers , frame_step) ; } } # [doc = "Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `environment_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn environment_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the values to be used with the \"Adjustment\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_adjustment (& self , env : Rid , enable : bool , brightness : f64 , contrast : f64 , saturation : f64 , ramp : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_adjustment ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64_rid (method_bind , self . this . sys () . as_ptr () , env , enable , brightness , contrast , saturation , ramp) ; } } # [doc = "Sets the ambient light parameters. See [Environment] for more details.\n# Default Arguments\n* `energy` - `1.0`\n* `sky_contibution` - `0.0`"] # [doc = ""] # [inline] pub fn environment_set_ambient_light (& self , env : Rid , color : Color , energy : f64 , sky_contibution : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ambient_light ; let ret = crate :: icalls :: icallptr_void_rid_color_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , color , energy , sky_contibution) ; } } # [doc = "Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]."] # [doc = ""] # [inline] pub fn environment_set_background (& self , env : Rid , bg : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_background ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , env , bg) ; } } # [doc = "Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes)."] # [doc = ""] # [inline] pub fn environment_set_bg_color (& self , env : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_bg_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , env , color) ; } } # [doc = "Sets the intensity of the background color."] # [doc = ""] # [inline] pub fn environment_set_bg_energy (& self , env : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_bg_energy ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , env , energy) ; } } # [doc = "Sets the maximum layer to use if using Canvas background mode."] # [doc = ""] # [inline] pub fn environment_set_canvas_max_layer (& self , env : Rid , max_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_canvas_max_layer ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , env , max_layer) ; } } # [doc = "Sets the values to be used with the \"DoF Far Blur\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_dof_blur_far (& self , env : Rid , enable : bool , distance : f64 , transition : f64 , far_amount : f64 , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_dof_blur_far ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable , distance , transition , far_amount , quality) ; } } # [doc = "Sets the values to be used with the \"DoF Near Blur\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_dof_blur_near (& self , env : Rid , enable : bool , distance : f64 , transition : f64 , far_amount : f64 , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_dof_blur_near ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable , distance , transition , far_amount , quality) ; } } # [doc = "Sets the variables to be used with the scene fog. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_fog (& self , env : Rid , enable : bool , color : Color , sun_color : Color , sun_amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog ; let ret = crate :: icalls :: icallptr_void_rid_bool_color_color_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , color , sun_color , sun_amount) ; } } # [doc = "Sets the variables to be used with the fog depth effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_fog_depth (& self , env : Rid , enable : bool , depth_begin : f64 , depth_end : f64 , depth_curve : f64 , transmit : bool , transmit_curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog_depth ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64_bool_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , depth_begin , depth_end , depth_curve , transmit , transmit_curve) ; } } # [doc = "Sets the variables to be used with the fog height effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_fog_height (& self , env : Rid , enable : bool , min_height : f64 , max_height : f64 , height_curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog_height ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , min_height , max_height , height_curve) ; } } # [doc = "Sets the variables to be used with the \"glow\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_glow (& self , env : Rid , enable : bool , level_flags : i64 , intensity : f64 , strength : f64 , bloom_threshold : f64 , blend_mode : i64 , hdr_bleed_threshold : f64 , hdr_bleed_scale : f64 , hdr_luminance_cap : f64 , bicubic_upscale : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_glow ; let ret = crate :: icalls :: icallptr_void_rid_bool_i64_f64_f64_f64_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , env , enable , level_flags , intensity , strength , bloom_threshold , blend_mode , hdr_bleed_threshold , hdr_bleed_scale , hdr_luminance_cap , bicubic_upscale) ; } } # [doc = "Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]."] # [doc = ""] # [inline] pub fn environment_set_sky (& self , env : Rid , sky : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , env , sky) ; } } # [doc = "Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]."] # [doc = ""] # [inline] pub fn environment_set_sky_custom_fov (& self , env : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky_custom_fov ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , env , scale) ; } } # [doc = "Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]."] # [doc = ""] # [inline] pub fn environment_set_sky_orientation (& self , env : Rid , orientation : Basis) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky_orientation ; let ret = crate :: icalls :: icallptr_void_rid_basis (method_bind , self . this . sys () . as_ptr () , env , orientation) ; } } # [doc = "Sets the variables to be used with the \"Screen Space Ambient Occlusion (SSAO)\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_ssao (& self , env : Rid , enable : bool , radius : f64 , intensity : f64 , radius2 : f64 , intensity2 : f64 , bias : f64 , light_affect : f64 , ao_channel_affect : f64 , color : Color , quality : i64 , blur : i64 , bilateral_sharpness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ssao ; let ret = crate :: icalls :: icallptr_void_rid_bool_f64_f64_f64_f64_f64_f64_f64_color_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable , radius , intensity , radius2 , intensity2 , bias , light_affect , ao_channel_affect , color , quality , blur , bilateral_sharpness) ; } } # [doc = "Sets the variables to be used with the \"screen space reflections\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_ssr (& self , env : Rid , enable : bool , max_steps : i64 , fade_in : f64 , fade_out : f64 , depth_tolerance : f64 , roughness : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ssr ; let ret = crate :: icalls :: icallptr_void_rid_bool_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , env , enable , max_steps , fade_in , fade_out , depth_tolerance , roughness) ; } } # [doc = "Sets the variables to be used with the \"tonemap\" post-process effect. See [Environment] for more details."] # [doc = ""] # [inline] pub fn environment_set_tonemap (& self , env : Rid , tone_mapper : i64 , exposure : f64 , white : f64 , auto_exposure : bool , min_luminance : f64 , max_luminance : f64 , auto_exp_speed : f64 , auto_exp_grey : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_tonemap ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64_f64_bool_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , tone_mapper , exposure , white , auto_exposure , min_luminance , max_luminance , auto_exp_speed , auto_exp_grey) ; } } # [doc = "Removes buffers and clears testcubes."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution.\n# Default Arguments\n* `swap_buffers` - `true`\n* `frame_step` - `0.0`"] # [doc = ""] # [inline] pub fn force_draw (& self , swap_buffers : bool , frame_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . force_draw ; let ret = crate :: icalls :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers , frame_step) ; } } # [doc = "Synchronizes threads."] # [doc = ""] # [inline] pub fn force_sync (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . force_sync ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries to free an object in the VisualServer."] # [doc = ""] # [inline] pub fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns a certain information, see [enum RenderInfo] for options."] # [doc = ""] # [inline] pub fn get_render_info (& self , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_render_info ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , info) ; ret as _ } } # [doc = "Returns the id of the test cube. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_test_cube (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_test_cube ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the id of the test texture. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_test_texture (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_test_texture ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the name of the video adapter (e.g. \"GeForce GTX 1080/PCIe/SSE2\").\n**Note:** When running a headless or server binary, this function returns an empty string."] # [doc = ""] # [inline] pub fn get_video_adapter_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_video_adapter_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the vendor of the video adapter (e.g. \"NVIDIA Corporation\").\n**Note:** When running a headless or server binary, this function returns an empty string."] # [doc = ""] # [inline] pub fn get_video_adapter_vendor (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_video_adapter_vendor ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the id of a white texture. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_white_texture (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_white_texture ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `gi_probe_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn gi_probe_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]."] # [doc = ""] # [inline] pub fn gi_probe_get_bias (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_bias ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the axis-aligned bounding box that covers the full extent of the GI probe."] # [doc = ""] # [inline] pub fn gi_probe_get_bounds (& self , probe : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_bounds ; let ret = crate :: icalls :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , probe) ; mem :: transmute (ret) } } # [doc = "Returns the cell size set by [method gi_probe_set_cell_size]."] # [doc = ""] # [inline] pub fn gi_probe_get_cell_size (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_cell_size ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the data used by the GI probe."] # [doc = ""] # [inline] pub fn gi_probe_get_dynamic_data (& self , probe : Rid) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_dynamic_data ; let ret = crate :: icalls :: icallptr_i32arr_rid (method_bind , self . this . sys () . as_ptr () , probe) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]."] # [doc = ""] # [inline] pub fn gi_probe_get_dynamic_range (& self , probe : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_dynamic_range ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]."] # [doc = ""] # [inline] pub fn gi_probe_get_energy (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_energy ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]."] # [doc = ""] # [inline] pub fn gi_probe_get_normal_bias (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_normal_bias ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]."] # [doc = ""] # [inline] pub fn gi_probe_get_propagation (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_propagation ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns the Transform set by [method gi_probe_set_to_cell_xform]."] # [doc = ""] # [inline] pub fn gi_probe_get_to_cell_xform (& self , probe : Rid) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_to_cell_xform ; let ret = crate :: icalls :: icallptr_trans_rid (method_bind , self . this . sys () . as_ptr () , probe) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]."] # [doc = ""] # [inline] pub fn gi_probe_is_compressed (& self , probe : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_is_compressed ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Returns `true` if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]."] # [doc = ""] # [inline] pub fn gi_probe_is_interior (& self , probe : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_is_interior ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , probe) ; ret as _ } } # [doc = "Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]."] # [doc = ""] # [inline] pub fn gi_probe_set_bias (& self , probe : Rid , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_bias ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias) ; } } # [doc = "Sets the axis-aligned bounding box that covers the extent of the GI probe."] # [doc = ""] # [inline] pub fn gi_probe_set_bounds (& self , probe : Rid , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_bounds ; let ret = crate :: icalls :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , probe , bounds) ; } } # [doc = "Sets the size of individual cells within the GI probe."] # [doc = ""] # [inline] pub fn gi_probe_set_cell_size (& self , probe : Rid , range : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_cell_size ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , range) ; } } # [doc = "Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]."] # [doc = ""] # [inline] pub fn gi_probe_set_compress (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_compress ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself."] # [doc = ""] # [inline] pub fn gi_probe_set_dynamic_data (& self , probe : Rid , data : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_dynamic_data ; let ret = crate :: icalls :: icallptr_void_rid_i32arr (method_bind , self . this . sys () . as_ptr () , probe , data) ; } } # [doc = "Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]."] # [doc = ""] # [inline] pub fn gi_probe_set_dynamic_range (& self , probe : Rid , range : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_dynamic_range ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , range) ; } } # [doc = "Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]."] # [doc = ""] # [inline] pub fn gi_probe_set_energy (& self , probe : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_energy ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy) ; } } # [doc = "Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]."] # [doc = ""] # [inline] pub fn gi_probe_set_interior (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_interior ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]."] # [doc = ""] # [inline] pub fn gi_probe_set_normal_bias (& self , probe : Rid , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_normal_bias ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias) ; } } # [doc = "Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]."] # [doc = ""] # [inline] pub fn gi_probe_set_propagation (& self , probe : Rid , propagation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_propagation ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , propagation) ; } } # [doc = "Sets the to cell [Transform] for this GI probe."] # [doc = ""] # [inline] pub fn gi_probe_set_to_cell_xform (& self , probe : Rid , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_to_cell_xform ; let ret = crate :: icalls :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , probe , xform) ; } } # [doc = "Returns `true` if changes have been made to the VisualServer's data. [method draw] is usually called if this happens."] # [doc = ""] # [inline] pub fn has_changed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_changed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Not yet implemented. Always returns `false`."] # [doc = ""] # [inline] pub fn has_feature (& self , feature : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_feature ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , feature) ; ret as _ } } # [doc = "Returns `true` if the OS supports a certain feature. Features might be `s3tc`, `etc`, `etc2` and `pvrtc`."] # [doc = ""] # [inline] pub fn has_os_feature (& self , feature : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_os_feature ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , feature . into ()) ; ret as _ } } # [doc = "Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]."] # [doc = ""] # [inline] pub fn immediate_begin (& self , immediate : Rid , primitive : i64 , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_begin ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , immediate , primitive , texture) ; } } # [doc = "Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]."] # [doc = ""] # [inline] pub fn immediate_clear (& self , immediate : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_clear ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]."] # [doc = ""] # [inline] pub fn immediate_color (& self , immediate : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , immediate , color) ; } } # [doc = "Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `immediate_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn immediate_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]."] # [doc = ""] # [inline] pub fn immediate_end (& self , immediate : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_end ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Returns the material assigned to the [ImmediateGeometry]."] # [doc = ""] # [inline] pub fn immediate_get_material (& self , immediate : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_get_material ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , immediate) ; Rid :: from_sys (ret) } } # [doc = "Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]."] # [doc = ""] # [inline] pub fn immediate_normal (& self , immediate : Rid , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_normal ; let ret = crate :: icalls :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , immediate , normal) ; } } # [doc = "Sets the material to be used to draw the [ImmediateGeometry]."] # [doc = ""] # [inline] pub fn immediate_set_material (& self , immediate : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_set_material ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , immediate , material) ; } } # [doc = "Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]."] # [doc = ""] # [inline] pub fn immediate_tangent (& self , immediate : Rid , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_tangent ; let ret = crate :: icalls :: icallptr_void_rid_plane (method_bind , self . this . sys () . as_ptr () , immediate , tangent) ; } } # [doc = "Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]."] # [doc = ""] # [inline] pub fn immediate_uv (& self , immediate : Rid , tex_uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_uv ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , tex_uv) ; } } # [doc = "Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]."] # [doc = ""] # [inline] pub fn immediate_uv2 (& self , immediate : Rid , tex_uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_uv2 ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , tex_uv) ; } } # [doc = "Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]."] # [doc = ""] # [inline] pub fn immediate_vertex (& self , immediate : Rid , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_vertex ; let ret = crate :: icalls :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , immediate , vertex) ; } } # [doc = "Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]."] # [doc = ""] # [inline] pub fn immediate_vertex_2d (& self , immediate : Rid , vertex : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_vertex_2d ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , vertex) ; } } # [doc = "Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything."] # [doc = ""] # [inline] pub fn init (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . init ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]."] # [doc = ""] # [inline] pub fn instance_attach_object_instance_id (& self , instance : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_attach_object_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , id) ; } } # [doc = "Attaches a skeleton to an instance. Removes the previous skeleton from the instance."] # [doc = ""] # [inline] pub fn instance_attach_skeleton (& self , instance : Rid , skeleton : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_attach_skeleton ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , skeleton) ; } } # [doc = "Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nAn instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]."] # [doc = ""] # [inline] pub fn instance_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn instance_create2 (& self , base : Rid , scenario : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_create2 ; let ret = crate :: icalls :: icallptr_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , base , scenario) ; Rid :: from_sys (ret) } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn instance_geometry_set_as_instance_lod (& self , instance : Rid , as_lod_of_instance : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_as_instance_lod ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , as_lod_of_instance) ; } } # [doc = "Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]."] # [doc = ""] # [inline] pub fn instance_geometry_set_cast_shadows_setting (& self , instance : Rid , shadow_casting_setting : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_cast_shadows_setting ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , shadow_casting_setting) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn instance_geometry_set_draw_range (& self , instance : Rid , min : f64 , max : f64 , min_margin : f64 , max_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_draw_range ; let ret = crate :: icalls :: icallptr_void_rid_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , instance , min , max , min_margin , max_margin) ; } } # [doc = "Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details."] # [doc = ""] # [inline] pub fn instance_geometry_set_flag (& self , instance : Rid , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_flag ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , instance , flag , enabled) ; } } # [doc = "Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]."] # [doc = ""] # [inline] pub fn instance_geometry_set_material_override (& self , instance : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_material_override ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , material) ; } } # [doc = "Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario."] # [doc = ""] # [inline] pub fn instance_set_base (& self , instance : Rid , base : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_base ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , base) ; } } # [doc = "Sets the weight for a given blend shape associated with this instance."] # [doc = ""] # [inline] pub fn instance_set_blend_shape_weight (& self , instance : Rid , shape : i64 , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_blend_shape_weight ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , instance , shape , weight) ; } } # [doc = "Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]."] # [doc = ""] # [inline] pub fn instance_set_custom_aabb (& self , instance : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , instance , aabb) ; } } # [doc = "Function not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn instance_set_exterior (& self , instance : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_exterior ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , instance , enabled) ; } } # [doc = "Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]."] # [doc = ""] # [inline] pub fn instance_set_extra_visibility_margin (& self , instance : Rid , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_extra_visibility_margin ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , instance , margin) ; } } # [doc = "Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]."] # [doc = ""] # [inline] pub fn instance_set_layer_mask (& self , instance : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_layer_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , mask) ; } } # [doc = "Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in."] # [doc = ""] # [inline] pub fn instance_set_scenario (& self , instance : Rid , scenario : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_scenario ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , instance , scenario) ; } } # [doc = "Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]."] # [doc = ""] # [inline] pub fn instance_set_surface_material (& self , instance : Rid , surface : i64 , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_surface_material ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , instance , surface , material) ; } } # [doc = "Sets the world space transform of the instance. Equivalent to [member Spatial.transform]."] # [doc = ""] # [inline] pub fn instance_set_transform (& self , instance : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Sets the lightmap to use with this instance."] # [doc = ""] # [inline] pub fn instance_set_use_lightmap (& self , instance : Rid , lightmap_instance : Rid , lightmap : Rid , lightmap_slice : i64 , lightmap_uv_rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_use_lightmap ; let ret = crate :: icalls :: icallptr_void_rid_rid_rid_i64_rect2 (method_bind , self . this . sys () . as_ptr () , instance , lightmap_instance , lightmap , lightmap_slice , lightmap_uv_rect) ; } } # [doc = "Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]."] # [doc = ""] # [inline] pub fn instance_set_visible (& self , instance : Rid , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_visible ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , instance , visible) ; } } # [doc = "Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = ""] # [inline] pub fn instances_cull_aabb (& self , aabb : Aabb , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_aabb ; let ret = crate :: icalls :: icallvar__aabb_rid (method_bind , self . this . sys () . as_ptr () , aabb , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = ""] # [inline] pub fn instances_cull_convex (& self , convex : VariantArray , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_convex ; let ret = crate :: icalls :: icallvar__arr_rid (method_bind , self . this . sys () . as_ptr () , convex , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = ""] # [inline] pub fn instances_cull_ray (& self , from : Vector3 , to : Vector3 , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_ray ; let ret = crate :: icalls :: icallvar__vec3_vec3_rid (method_bind , self . this . sys () . as_ptr () , from , to , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `false`, disables rendering completely, but the engine logic is still being processed. You can call [method force_draw] to draw a frame even with rendering disabled."] # [doc = ""] # [inline] pub fn is_render_loop_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . is_render_loop_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]."] # [doc = ""] # [inline] pub fn light_directional_set_blend_splits (& self , light : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_blend_splits ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable) ; } } # [doc = "Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options."] # [doc = ""] # [inline] pub fn light_directional_set_shadow_depth_range_mode (& self , light : Rid , range_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_shadow_depth_range_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , range_mode) ; } } # [doc = "Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options."] # [doc = ""] # [inline] pub fn light_directional_set_shadow_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_shadow_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [doc = "Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]."] # [doc = ""] # [inline] pub fn light_omni_set_shadow_detail (& self , light : Rid , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_omni_set_shadow_detail ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , detail) ; } } # [doc = "Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode]."] # [doc = ""] # [inline] pub fn light_omni_set_shadow_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_omni_set_shadow_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn light_set_bake_mode (& self , light : Rid , bake_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_bake_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , bake_mode) ; } } # [doc = "Sets the color of the light. Equivalent to [member Light.light_color]."] # [doc = ""] # [inline] pub fn light_set_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]."] # [doc = ""] # [inline] pub fn light_set_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_cull_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask) ; } } # [doc = "If `true`, light will subtract light instead of adding light. Equivalent to [member Light.light_negative]."] # [doc = ""] # [inline] pub fn light_set_negative (& self , light : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_negative ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable) ; } } # [doc = "Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]."] # [doc = ""] # [inline] pub fn light_set_param (& self , light : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , light , param , value) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn light_set_projector (& self , light : Rid , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_projector ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , light , texture) ; } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]."] # [doc = ""] # [inline] pub fn light_set_reverse_cull_face_mode (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_reverse_cull_face_mode ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "If `true`, light will cast shadows. Equivalent to [member Light.shadow_enabled]."] # [doc = ""] # [inline] pub fn light_set_shadow (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_shadow ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]."] # [doc = ""] # [inline] pub fn light_set_shadow_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_shadow_color ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Sets whether GI probes capture light information from this light."] # [doc = ""] # [inline] pub fn light_set_use_gi (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_use_gi ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled) ; } } # [doc = "Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `lightmap_capture_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn lightmap_capture_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the size of the lightmap capture area."] # [doc = ""] # [inline] pub fn lightmap_capture_get_bounds (& self , capture : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_bounds ; let ret = crate :: icalls :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , capture) ; mem :: transmute (ret) } } # [doc = "Returns the energy multiplier used by the lightmap capture."] # [doc = ""] # [inline] pub fn lightmap_capture_get_energy (& self , capture : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_energy ; let ret = crate :: icalls :: icallptr_f64_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Returns the octree used by the lightmap capture."] # [doc = ""] # [inline] pub fn lightmap_capture_get_octree (& self , capture : Rid) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree ; let ret = crate :: icalls :: icallptr_bytearr_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the cell subdivision amount used by this lightmap capture's octree."] # [doc = ""] # [inline] pub fn lightmap_capture_get_octree_cell_subdiv (& self , capture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree_cell_subdiv ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Returns the cell transform for this lightmap capture's octree."] # [doc = ""] # [inline] pub fn lightmap_capture_get_octree_cell_transform (& self , capture : Rid) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree_cell_transform ; let ret = crate :: icalls :: icallptr_trans_rid (method_bind , self . this . sys () . as_ptr () , capture) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn lightmap_capture_is_interior (& self , capture : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_is_interior ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , capture) ; ret as _ } } # [doc = "Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_bounds (& self , capture : Rid , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_bounds ; let ret = crate :: icalls :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , capture , bounds) ; } } # [doc = "Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_energy (& self , capture : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_energy ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , capture , energy) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn lightmap_capture_set_interior (& self , capture : Rid , interior : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_interior ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , capture , interior) ; } } # [doc = "Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_octree (& self , capture : Rid , octree : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree ; let ret = crate :: icalls :: icallptr_void_rid_bytearr (method_bind , self . this . sys () . as_ptr () , capture , octree) ; } } # [doc = "Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_octree_cell_subdiv (& self , capture : Rid , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree_cell_subdiv ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , capture , subdiv) ; } } # [doc = "Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]."] # [doc = ""] # [inline] pub fn lightmap_capture_set_octree_cell_transform (& self , capture : Rid , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree_cell_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , capture , xform) ; } } # [doc = "Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions."] # [doc = ""] # [inline] pub fn make_sphere_mesh (& self , latitudes : i64 , longitudes : i64 , radius : f64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . make_sphere_mesh ; let ret = crate :: icalls :: icallptr_rid_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , latitudes , longitudes , radius) ; Rid :: from_sys (ret) } } # [doc = "Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `material_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn material_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a certain material's parameter."] # [doc = ""] # [inline] pub fn material_get_param (& self , material : Rid , parameter : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_param ; let ret = crate :: icalls :: icallptr_var_rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the default value for the param if available. Otherwise returns an empty [Variant]."] # [doc = ""] # [inline] pub fn material_get_param_default (& self , material : Rid , parameter : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_param_default ; let ret = crate :: icalls :: icallptr_var_rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader."] # [doc = ""] # [inline] pub fn material_get_shader (& self , shader_material : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_shader ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , shader_material) ; Rid :: from_sys (ret) } } # [doc = "Sets a material's line width."] # [doc = ""] # [inline] pub fn material_set_line_width (& self , material : Rid , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_line_width ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , material , width) ; } } # [doc = "Sets an object's next material."] # [doc = ""] # [inline] pub fn material_set_next_pass (& self , material : Rid , next_material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_next_pass ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , material , next_material) ; } } # [doc = "Sets a material's parameter."] # [doc = ""] # [inline] pub fn material_set_param (& self , material : Rid , parameter : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_param ; let ret = crate :: icalls :: icallptr_void_rid_str_var (method_bind , self . this . sys () . as_ptr () , material , parameter . into () , value . owned_to_variant ()) ; } } # [doc = "Sets a material's render priority."] # [doc = ""] # [inline] pub fn material_set_render_priority (& self , material : Rid , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_render_priority ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , material , priority) ; } } # [doc = "Sets a shader material's shader."] # [doc = ""] # [inline] pub fn material_set_shader (& self , shader_material : Rid , shader : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_shader ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , shader_material , shader) ; } } # [doc = "Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types.\n# Default Arguments\n* `blend_shapes` - `[ ]`\n* `compress_format` - `97280`"] # [doc = ""] # [inline] pub fn mesh_add_surface_from_arrays (& self , mesh : Rid , primitive : i64 , arrays : VariantArray , blend_shapes : VariantArray , compress_format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_add_surface_from_arrays ; let ret = crate :: icalls :: icallptr_void_rid_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , mesh , primitive , arrays , blend_shapes , compress_format) ; } } # [doc = "Removes all surfaces from a mesh."] # [doc = ""] # [inline] pub fn mesh_clear (& self , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_clear ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; } } # [doc = "Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn mesh_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns a mesh's blend shape count."] # [doc = ""] # [inline] pub fn mesh_get_blend_shape_count (& self , mesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_blend_shape_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; ret as _ } } # [doc = "Returns a mesh's blend shape mode."] # [doc = ""] # [inline] pub fn mesh_get_blend_shape_mode (& self , mesh : Rid) -> crate :: generated :: visual_server :: BlendShapeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_blend_shape_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; crate :: generated :: visual_server :: BlendShapeMode (ret) } } # [doc = "Returns a mesh's custom aabb."] # [doc = ""] # [inline] pub fn mesh_get_custom_aabb (& self , mesh : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_custom_aabb ; let ret = crate :: icalls :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; mem :: transmute (ret) } } # [doc = "Returns a mesh's number of surfaces."] # [doc = ""] # [inline] pub fn mesh_get_surface_count (& self , mesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_surface_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh) ; ret as _ } } # [doc = "Removes a mesh's surface."] # [doc = ""] # [inline] pub fn mesh_remove_surface (& self , mesh : Rid , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_remove_surface ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , index) ; } } # [doc = "Sets a mesh's blend shape count."] # [doc = ""] # [inline] pub fn mesh_set_blend_shape_count (& self , mesh : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_blend_shape_count ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , amount) ; } } # [doc = "Sets a mesh's blend shape mode."] # [doc = ""] # [inline] pub fn mesh_set_blend_shape_mode (& self , mesh : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_blend_shape_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , mode) ; } } # [doc = "Sets a mesh's custom aabb."] # [doc = ""] # [inline] pub fn mesh_set_custom_aabb (& self , mesh : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , mesh , aabb) ; } } # [doc = "Returns a mesh's surface's aabb."] # [doc = ""] # [inline] pub fn mesh_surface_get_aabb (& self , mesh : Rid , surface : i64) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_aabb ; let ret = crate :: icalls :: icallptr_aabb_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; mem :: transmute (ret) } } # [doc = "Returns a mesh's surface's vertex buffer."] # [doc = ""] # [inline] pub fn mesh_surface_get_array (& self , mesh : Rid , surface : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array ; let ret = crate :: icalls :: icallptr_bytearr_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ByteArray :: from_sys (ret) } } # [doc = "Returns a mesh's surface's amount of indices."] # [doc = ""] # [inline] pub fn mesh_surface_get_array_index_len (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array_index_len ; let ret = crate :: icalls :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [doc = "Returns a mesh's surface's amount of vertices."] # [doc = ""] # [inline] pub fn mesh_surface_get_array_len (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array_len ; let ret = crate :: icalls :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [doc = "Returns a mesh's surface's buffer arrays."] # [doc = ""] # [inline] pub fn mesh_surface_get_arrays (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_arrays ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's arrays for blend shapes."] # [doc = ""] # [inline] pub fn mesh_surface_get_blend_shape_arrays (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_blend_shape_arrays ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the format of a mesh's surface."] # [doc = ""] # [inline] pub fn mesh_surface_get_format (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format ; let ret = crate :: icalls :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ret as _ } } # [doc = "Function is unused in Godot 3.x."] # [doc = ""] # [inline] pub fn mesh_surface_get_format_offset (& self , format : i64 , vertex_len : i64 , index_len : i64 , array_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format_offset ; let ret = crate :: icalls :: icallptr_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format , vertex_len , index_len , array_index) ; ret as _ } } # [doc = "Function is unused in Godot 3.x."] # [doc = ""] # [inline] pub fn mesh_surface_get_format_stride (& self , format : i64 , vertex_len : i64 , index_len : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format_stride ; let ret = crate :: icalls :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format , vertex_len , index_len) ; ret as _ } } # [doc = "Returns a mesh's surface's index buffer."] # [doc = ""] # [inline] pub fn mesh_surface_get_index_array (& self , mesh : Rid , surface : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_index_array ; let ret = crate :: icalls :: icallptr_bytearr_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; ByteArray :: from_sys (ret) } } # [doc = "Returns a mesh's surface's material."] # [doc = ""] # [inline] pub fn mesh_surface_get_material (& self , mesh : Rid , surface : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_material ; let ret = crate :: icalls :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; Rid :: from_sys (ret) } } # [doc = "Returns the primitive type of a mesh's surface."] # [doc = ""] # [inline] pub fn mesh_surface_get_primitive_type (& self , mesh : Rid , surface : i64) -> crate :: generated :: visual_server :: PrimitiveType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_primitive_type ; let ret = crate :: icalls :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; crate :: generated :: visual_server :: PrimitiveType (ret) } } # [doc = "Returns the aabb of a mesh's surface's skeleton."] # [doc = ""] # [inline] pub fn mesh_surface_get_skeleton_aabb (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_skeleton_aabb ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a mesh's surface's material."] # [doc = ""] # [inline] pub fn mesh_surface_set_material (& self , mesh : Rid , surface : i64 , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_set_material ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh , surface , material) ; } } # [doc = "Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh."] # [doc = ""] # [inline] pub fn mesh_surface_update_region (& self , mesh : Rid , surface : i64 , offset : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_update_region ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , mesh , surface , offset , data) ; } } # [doc = "Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count].\n# Default Arguments\n* `custom_data_format` - `0`"] # [doc = ""] # [inline] pub fn multimesh_allocate (& self , multimesh : Rid , instances : i64 , transform_format : i64 , color_format : i64 , custom_data_format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_allocate ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , instances , transform_format , color_format , custom_data_format) ; } } # [doc = "Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all `multimesh_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn multimesh_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh."] # [doc = ""] # [inline] pub fn multimesh_get_aabb (& self , multimesh : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_aabb ; let ret = crate :: icalls :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; mem :: transmute (ret) } } # [doc = "Returns the number of instances allocated for this multimesh."] # [doc = ""] # [inline] pub fn multimesh_get_instance_count (& self , multimesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_instance_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; ret as _ } } # [doc = "Returns the RID of the mesh that will be used in drawing this multimesh."] # [doc = ""] # [inline] pub fn multimesh_get_mesh (& self , multimesh : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_mesh ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of visible instances for this multimesh."] # [doc = ""] # [inline] pub fn multimesh_get_visible_instances (& self , multimesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_visible_instances ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; ret as _ } } # [doc = "Returns the color by which the specified instance will be modulated."] # [doc = ""] # [inline] pub fn multimesh_instance_get_color (& self , multimesh : Rid , index : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_color ; let ret = crate :: icalls :: icallptr_color_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the custom data associated with the specified instance."] # [doc = ""] # [inline] pub fn multimesh_instance_get_custom_data (& self , multimesh : Rid , index : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_custom_data ; let ret = crate :: icalls :: icallptr_color_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform] of the specified instance."] # [doc = ""] # [inline] pub fn multimesh_instance_get_transform (& self , multimesh : Rid , index : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_transform ; let ret = crate :: icalls :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms."] # [doc = ""] # [inline] pub fn multimesh_instance_get_transform_2d (& self , multimesh : Rid , index : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_transform_2d ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index) ; mem :: transmute (ret) } } # [doc = "Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]."] # [doc = ""] # [inline] pub fn multimesh_instance_set_color (& self , multimesh : Rid , index : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_color ; let ret = crate :: icalls :: icallptr_void_rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index , color) ; } } # [doc = "Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a `vec4` in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]."] # [doc = ""] # [inline] pub fn multimesh_instance_set_custom_data (& self , multimesh : Rid , index : i64 , custom_data : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_custom_data ; let ret = crate :: icalls :: icallptr_void_rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index , custom_data) ; } } # [doc = "Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]."] # [doc = ""] # [inline] pub fn multimesh_instance_set_transform (& self , multimesh : Rid , index : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , multimesh , index , transform) ; } } # [doc = "Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]."] # [doc = ""] # [inline] pub fn multimesh_instance_set_transform_2d (& self , multimesh : Rid , index : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_transform_2d ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , multimesh , index , transform) ; } } # [doc = "Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.\n\nAll data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc.\n\n[Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, `COLOR_8BIT` / `CUSTOM_DATA_8BIT` is stored as 1 float (4 bytes as is) and `COLOR_FLOAT` / `CUSTOM_DATA_FLOAT` is stored as 4 floats."] # [doc = ""] # [inline] pub fn multimesh_set_as_bulk_array (& self , multimesh : Rid , array : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_as_bulk_array ; let ret = crate :: icalls :: icallptr_void_rid_f32arr (method_bind , self . this . sys () . as_ptr () , multimesh , array) ; } } # [doc = "Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]."] # [doc = ""] # [inline] pub fn multimesh_set_mesh (& self , multimesh : Rid , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_mesh ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , multimesh , mesh) ; } } # [doc = "Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]."] # [doc = ""] # [inline] pub fn multimesh_set_visible_instances (& self , multimesh : Rid , visible : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_visible_instances ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , visible) ; } } # [doc = "Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn omni_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . omni_light_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `particles_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn particles_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]."] # [doc = ""] # [inline] pub fn particles_get_current_aabb (& self , particles : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_get_current_aabb ; let ret = crate :: icalls :: icallptr_aabb_rid (method_bind , self . this . sys () . as_ptr () , particles) ; mem :: transmute (ret) } } # [doc = "Returns `true` if particles are currently set to emitting."] # [doc = ""] # [inline] pub fn particles_get_emitting (& self , particles : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_get_emitting ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , particles) ; ret as _ } } # [doc = "Returns `true` if particles are not emitting and particles are set to inactive."] # [doc = ""] # [inline] pub fn particles_is_inactive (& self , particles : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_is_inactive ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , particles) ; ret as _ } } # [doc = "Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]."] # [doc = ""] # [inline] pub fn particles_request_process (& self , particles : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_request_process ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , particles) ; } } # [doc = "Reset the particles on the next update. Equivalent to [method Particles.restart]."] # [doc = ""] # [inline] pub fn particles_restart (& self , particles : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_restart ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , particles) ; } } # [doc = "Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]."] # [doc = ""] # [inline] pub fn particles_set_amount (& self , particles : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_amount ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , amount) ; } } # [doc = "Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]."] # [doc = ""] # [inline] pub fn particles_set_custom_aabb (& self , particles : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_rid_aabb (method_bind , self . this . sys () . as_ptr () , particles , aabb) ; } } # [doc = "Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]."] # [doc = ""] # [inline] pub fn particles_set_draw_order (& self , particles : Rid , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_order ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , order) ; } } # [doc = "Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]."] # [doc = ""] # [inline] pub fn particles_set_draw_pass_mesh (& self , particles : Rid , pass : i64 , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_pass_mesh ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , particles , pass , mesh) ; } } # [doc = "Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]."] # [doc = ""] # [inline] pub fn particles_set_draw_passes (& self , particles : Rid , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_passes ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , count) ; } } # [doc = "Sets the [Transform] that will be used by the particles when they first emit."] # [doc = ""] # [inline] pub fn particles_set_emission_transform (& self , particles : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_emission_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans (method_bind , self . this . sys () . as_ptr () , particles , transform) ; } } # [doc = "If `true`, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting]."] # [doc = ""] # [inline] pub fn particles_set_emitting (& self , particles : Rid , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_emitting ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , emitting) ; } } # [doc = "Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]."] # [doc = ""] # [inline] pub fn particles_set_explosiveness_ratio (& self , particles : Rid , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio) ; } } # [doc = "Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]."] # [doc = ""] # [inline] pub fn particles_set_fixed_fps (& self , particles : Rid , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_fixed_fps ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , fps) ; } } # [doc = "If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]."] # [doc = ""] # [inline] pub fn particles_set_fractional_delta (& self , particles : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_fractional_delta ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable) ; } } # [doc = "Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]."] # [doc = ""] # [inline] pub fn particles_set_lifetime (& self , particles : Rid , lifetime : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_lifetime ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , lifetime) ; } } # [doc = "If `true`, particles will emit once and then stop. Equivalent to [member Particles.one_shot]."] # [doc = ""] # [inline] pub fn particles_set_one_shot (& self , particles : Rid , one_shot : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_one_shot ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , one_shot) ; } } # [doc = "Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess]."] # [doc = ""] # [inline] pub fn particles_set_pre_process_time (& self , particles : Rid , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_pre_process_time ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , time) ; } } # [doc = "Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]."] # [doc = ""] # [inline] pub fn particles_set_process_material (& self , particles : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_process_material ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , particles , material) ; } } # [doc = "Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]."] # [doc = ""] # [inline] pub fn particles_set_randomness_ratio (& self , particles : Rid , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_randomness_ratio ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio) ; } } # [doc = "Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]."] # [doc = ""] # [inline] pub fn particles_set_speed_scale (& self , particles : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_speed_scale ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , scale) ; } } # [doc = "If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to [member Particles.local_coords]."] # [doc = ""] # [inline] pub fn particles_set_use_local_coordinates (& self , particles : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_use_local_coordinates ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable) ; } } # [doc = "Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `reflection_probe_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn reflection_probe_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "If `true`, reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]."] # [doc = ""] # [inline] pub fn reflection_probe_set_as_interior (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_as_interior ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]."] # [doc = ""] # [inline] pub fn reflection_probe_set_cull_mask (& self , probe : Rid , layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_cull_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , layers) ; } } # [doc = "If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]."] # [doc = ""] # [inline] pub fn reflection_probe_set_enable_box_projection (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_enable_box_projection ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]."] # [doc = ""] # [inline] pub fn reflection_probe_set_enable_shadows (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_enable_shadows ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable) ; } } # [doc = "Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]."] # [doc = ""] # [inline] pub fn reflection_probe_set_extents (& self , probe : Rid , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_extents ; let ret = crate :: icalls :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , probe , extents) ; } } # [doc = "Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]."] # [doc = ""] # [inline] pub fn reflection_probe_set_intensity (& self , probe : Rid , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_intensity ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , intensity) ; } } # [doc = "Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]."] # [doc = ""] # [inline] pub fn reflection_probe_set_interior_ambient (& self , probe : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient ; let ret = crate :: icalls :: icallptr_void_rid_color (method_bind , self . this . sys () . as_ptr () , probe , color) ; } } # [doc = "Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]."] # [doc = ""] # [inline] pub fn reflection_probe_set_interior_ambient_energy (& self , probe : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient_energy ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy) ; } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]."] # [doc = ""] # [inline] pub fn reflection_probe_set_interior_ambient_probe_contribution (& self , probe : Rid , contrib : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient_probe_contribution ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , contrib) ; } } # [doc = "Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]."] # [doc = ""] # [inline] pub fn reflection_probe_set_max_distance (& self , probe : Rid , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_max_distance ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , distance) ; } } # [doc = "Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]."] # [doc = ""] # [inline] pub fn reflection_probe_set_origin_offset (& self , probe : Rid , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_origin_offset ; let ret = crate :: icalls :: icallptr_void_rid_vec3 (method_bind , self . this . sys () . as_ptr () , probe , offset) ; } } # [doc = "Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options."] # [doc = ""] # [inline] pub fn reflection_probe_set_update_mode (& self , probe : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_update_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , mode) ; } } # [doc = "Schedules a callback to the corresponding named `method` on `where` after a frame has been drawn.\nThe callback method must use only 1 argument which will be called with `userdata`."] # [doc = ""] # [inline] pub fn request_frame_drawn_callback (& self , _where : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . request_frame_drawn_callback ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , _where . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `scenario_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nThe scenario is the 3D world that all the visual instances exist in."] # [doc = ""] # [inline] pub fn scenario_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options."] # [doc = ""] # [inline] pub fn scenario_set_debug (& self , scenario : Rid , debug_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_debug ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , scenario , debug_mode) ; } } # [doc = "Sets the environment that will be used with this scenario."] # [doc = ""] # [inline] pub fn scenario_set_environment (& self , scenario : Rid , environment : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_environment ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , scenario , environment) ; } } # [doc = "Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment."] # [doc = ""] # [inline] pub fn scenario_set_fallback_environment (& self , scenario : Rid , environment : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_fallback_environment ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , scenario , environment) ; } } # [doc = "Sets the size of the reflection atlas shared by all reflection probes in this scenario."] # [doc = ""] # [inline] pub fn scenario_set_reflection_atlas_size (& self , scenario : Rid , size : i64 , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_reflection_atlas_size ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , scenario , size , subdiv) ; } } # [doc = "Sets a boot image. The color defines the background color. If `scale` is `true`, the image will be scaled to fit the screen size. If `use_filter` is `true`, the image will be scaled with linear interpolation. If `use_filter` is `false`, the image will be scaled with nearest-neighbor interpolation.\n# Default Arguments\n* `use_filter` - `true`"] # [doc = ""] # [inline] pub fn set_boot_image (& self , image : impl AsArg < crate :: generated :: image :: Image > , color : Color , scale : bool , use_filter : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_boot_image ; let ret = crate :: icalls :: icallptr_void_obj_color_bool_bool (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , color , scale , use_filter) ; } } # [doc = "If `true`, the engine will generate wireframes for use with the wireframe debug mode."] # [doc = ""] # [inline] pub fn set_debug_generate_wireframes (& self , generate : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_debug_generate_wireframes ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , generate) ; } } # [doc = "Sets the default clear color which is used when a specific clear color has not been selected."] # [doc = ""] # [inline] pub fn set_default_clear_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_default_clear_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `false`, disables rendering completely, but the engine logic is still being processed. You can call [method force_draw] to draw a frame even with rendering disabled."] # [doc = ""] # [inline] pub fn set_render_loop_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_render_loop_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Sets the scale to apply to the passage of time for the shaders' `TIME` builtin.\nThe default value is `1.0`, which means `TIME` will count the real time as it goes by, without narrowing or stretching it."] # [doc = ""] # [inline] pub fn set_shader_time_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_shader_time_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `shader_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn shader_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns a shader's code."] # [doc = ""] # [inline] pub fn shader_get_code (& self , shader : Rid) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_code ; let ret = crate :: icalls :: icallptr_str_rid (method_bind , self . this . sys () . as_ptr () , shader) ; GodotString :: from_sys (ret) } } # [doc = "Returns a default texture from a shader searched by name."] # [doc = ""] # [inline] pub fn shader_get_default_texture_param (& self , shader : Rid , name : impl Into < GodotString >) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_default_texture_param ; let ret = crate :: icalls :: icallptr_rid_rid_str (method_bind , self . this . sys () . as_ptr () , shader , name . into ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the parameters of a shader."] # [doc = ""] # [inline] pub fn shader_get_param_list (& self , shader : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_param_list ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shader) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a shader's code."] # [doc = ""] # [inline] pub fn shader_set_code (& self , shader : Rid , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_set_code ; let ret = crate :: icalls :: icallptr_void_rid_str (method_bind , self . this . sys () . as_ptr () , shader , code . into ()) ; } } # [doc = "Sets a shader's default texture. Overwrites the texture given by name."] # [doc = ""] # [inline] pub fn shader_set_default_texture_param (& self , shader : Rid , name : impl Into < GodotString > , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_set_default_texture_param ; let ret = crate :: icalls :: icallptr_void_rid_str_rid (method_bind , self . this . sys () . as_ptr () , shader , name . into () , texture) ; } } # [doc = "Allocates the GPU buffers for this skeleton.\n# Default Arguments\n* `is_2d_skeleton` - `false`"] # [doc = ""] # [inline] pub fn skeleton_allocate (& self , skeleton : Rid , bones : i64 , is_2d_skeleton : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_allocate ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , skeleton , bones , is_2d_skeleton) ; } } # [doc = "Returns the [Transform] set for a specific bone of this skeleton."] # [doc = ""] # [inline] pub fn skeleton_bone_get_transform (& self , skeleton : Rid , bone : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_get_transform ; let ret = crate :: icalls :: icallptr_trans_rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] set for a specific bone of this skeleton."] # [doc = ""] # [inline] pub fn skeleton_bone_get_transform_2d (& self , skeleton : Rid , bone : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_get_transform_2d ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone) ; mem :: transmute (ret) } } # [doc = "Sets the [Transform] for a specific bone of this skeleton."] # [doc = ""] # [inline] pub fn skeleton_bone_set_transform (& self , skeleton : Rid , bone : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans (method_bind , self . this . sys () . as_ptr () , skeleton , bone , transform) ; } } # [doc = "Sets the [Transform2D] for a specific bone of this skeleton."] # [doc = ""] # [inline] pub fn skeleton_bone_set_transform_2d (& self , skeleton : Rid , bone : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_set_transform_2d ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , skeleton , bone , transform) ; } } # [doc = "Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `skeleton_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn skeleton_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of bones allocated for this skeleton."] # [doc = ""] # [inline] pub fn skeleton_get_bone_count (& self , skeleton : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_get_bone_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , skeleton) ; ret as _ } } # [doc = "Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `sky_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn sky_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sky_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Sets a sky's texture."] # [doc = ""] # [inline] pub fn sky_set_texture (& self , sky : Rid , cube_map : Rid , radiance_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sky_set_texture ; let ret = crate :: icalls :: icallptr_void_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , sky , cube_map , radiance_size) ; } } # [doc = "Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.\nTo place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn spot_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . spot_light_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn sync (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sync ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Allocates the GPU memory for the texture.\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn texture_allocate (& self , texture : Rid , width : i64 , height : i64 , depth_3d : i64 , format : i64 , _type : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_allocate ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width , height , depth_3d , format , _type , flags) ; } } # [doc = "Binds the texture to a texture slot."] # [doc = ""] # [inline] pub fn texture_bind (& self , texture : Rid , number : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_bind ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , number) ; } } # [doc = "Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn texture_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a texture, allocates the space for an image, and fills in the image.\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn texture_create_from_image (& self , image : impl AsArg < crate :: generated :: image :: Image > , flags : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_create_from_image ; let ret = crate :: icalls :: icallptr_rid_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags) ; Rid :: from_sys (ret) } } # [doc = "Returns a list of all the textures and their information."] # [doc = ""] # [inline] pub fn texture_debug_usage (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_debug_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the [RID] of the image at one of the cubes sides.\n# Default Arguments\n* `cube_side` - `0`"] # [doc = ""] # [inline] pub fn texture_get_data (& self , texture : Rid , cube_side : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_data ; let ret = crate :: icalls :: icallptr_obj_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , cube_side) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the depth of the texture."] # [doc = ""] # [inline] pub fn texture_get_depth (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_depth ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the flags of a texture."] # [doc = ""] # [inline] pub fn texture_get_flags (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_flags ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the format of the texture's image."] # [doc = ""] # [inline] pub fn texture_get_format (& self , texture : Rid) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_format ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; crate :: generated :: image :: Format (ret) } } # [doc = "Returns the texture's height."] # [doc = ""] # [inline] pub fn texture_get_height (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_height ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the texture's path."] # [doc = ""] # [inline] pub fn texture_get_path (& self , texture : Rid) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_path ; let ret = crate :: icalls :: icallptr_str_rid (method_bind , self . this . sys () . as_ptr () , texture) ; GodotString :: from_sys (ret) } } # [doc = "Returns the opengl id of the texture's image."] # [doc = ""] # [inline] pub fn texture_get_texid (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_texid ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Returns the type of the texture, can be any of the [enum TextureType]."] # [doc = ""] # [inline] pub fn texture_get_type (& self , texture : Rid) -> crate :: generated :: visual_server :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_type ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; crate :: generated :: visual_server :: TextureType (ret) } } # [doc = "Returns the texture's width."] # [doc = ""] # [inline] pub fn texture_get_width (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_width ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , texture) ; ret as _ } } # [doc = "Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side.\n# Default Arguments\n* `layer` - `0`"] # [doc = ""] # [inline] pub fn texture_set_data (& self , texture : Rid , image : impl AsArg < crate :: generated :: image :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_data ; let ret = crate :: icalls :: icallptr_void_rid_obj_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , layer) ; } } # [doc = "Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly.\n# Default Arguments\n* `layer` - `0`"] # [doc = ""] # [inline] pub fn texture_set_data_partial (& self , texture : Rid , image : impl AsArg < crate :: generated :: image :: Image > , src_x : i64 , src_y : i64 , src_w : i64 , src_h : i64 , dst_x : i64 , dst_y : i64 , dst_mip : i64 , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_data_partial ; let ret = crate :: icalls :: icallptr_void_rid_obj_i64_i64_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , src_x , src_y , src_w , src_h , dst_x , dst_y , dst_mip , layer) ; } } # [doc = "Sets the texture's flags. See [enum TextureFlags] for options."] # [doc = ""] # [inline] pub fn texture_set_flags (& self , texture : Rid , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_flags ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , flags) ; } } # [doc = "Sets the texture's path."] # [doc = ""] # [inline] pub fn texture_set_path (& self , texture : Rid , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_path ; let ret = crate :: icalls :: icallptr_void_rid_str (method_bind , self . this . sys () . as_ptr () , texture , path . into ()) ; } } # [doc = "If `true`, sets internal processes to shrink all image data to half the size."] # [doc = ""] # [inline] pub fn texture_set_shrink_all_x2_on_set_data (& self , shrink : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_shrink_all_x2_on_set_data ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , shrink) ; } } # [doc = "Resizes the texture to the specified dimensions."] # [doc = ""] # [inline] pub fn texture_set_size_override (& self , texture : Rid , width : i64 , height : i64 , depth : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_size_override ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width , height , depth) ; } } # [doc = "If `true`, the image will be stored in the texture's images array if overwritten."] # [doc = ""] # [inline] pub fn textures_keep_original (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . textures_keep_original ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets a viewport's camera."] # [doc = ""] # [inline] pub fn viewport_attach_camera (& self , viewport : Rid , camera : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_camera ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , camera) ; } } # [doc = "Sets a viewport's canvas."] # [doc = ""] # [inline] pub fn viewport_attach_canvas (& self , viewport : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_canvas ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , canvas) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCopies viewport to a region of the screen specified by `rect`. If [member Viewport.render_direct_to_screen] is `true`, then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.\nFor example, you can set the root viewport to not render at all with the following code:\n```gdscript\nfunc _ready():\n get_viewport().set_attach_to_screen_rect(Rect2())\n $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))\n```\nUsing this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`\n* `screen` - `0`"] # [doc = ""] # [inline] pub fn viewport_attach_to_screen (& self , viewport : Rid , rect : Rect2 , screen : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_to_screen ; let ret = crate :: icalls :: icallptr_void_rid_rect2_i64 (method_bind , self . this . sys () . as_ptr () , viewport , rect , screen) ; } } # [doc = "Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `viewport_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method."] # [doc = ""] # [inline] pub fn viewport_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Detaches the viewport from the screen."] # [doc = ""] # [inline] pub fn viewport_detach (& self , viewport : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_detach ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , viewport) ; } } # [doc = "Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants."] # [doc = ""] # [inline] pub fn viewport_get_render_info (& self , viewport : Rid , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_get_render_info ; let ret = crate :: icalls :: icallptr_i64_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , info) ; ret as _ } } # [doc = "Returns the viewport's last rendered frame."] # [doc = ""] # [inline] pub fn viewport_get_texture (& self , viewport : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_get_texture ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport) ; Rid :: from_sys (ret) } } # [doc = "Detaches a viewport from a canvas and vice versa."] # [doc = ""] # [inline] pub fn viewport_remove_canvas (& self , viewport : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_remove_canvas ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , canvas) ; } } # [doc = "If `true`, sets the viewport active, else sets it inactive."] # [doc = ""] # [inline] pub fn viewport_set_active (& self , viewport : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_active ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , active) ; } } # [doc = "Sets the stacking order for a viewport's canvas.\n`layer` is the actual canvas layer, while `sublayer` specifies the stacking order of the canvas among those in the same layer."] # [doc = ""] # [inline] pub fn viewport_set_canvas_stacking (& self , viewport : Rid , canvas : Rid , layer : i64 , sublayer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_canvas_stacking ; let ret = crate :: icalls :: icallptr_void_rid_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , canvas , layer , sublayer) ; } } # [doc = "Sets the transformation of a viewport's canvas."] # [doc = ""] # [inline] pub fn viewport_set_canvas_transform (& self , viewport : Rid , canvas : Rid , offset : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_canvas_transform ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , canvas , offset) ; } } # [doc = "Sets the clear mode of a viewport. See [enum ViewportClearMode] for options."] # [doc = ""] # [inline] pub fn viewport_set_clear_mode (& self , viewport : Rid , clear_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_clear_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , clear_mode) ; } } # [doc = "Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options."] # [doc = ""] # [inline] pub fn viewport_set_debug_draw (& self , viewport : Rid , draw : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_debug_draw ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , draw) ; } } # [doc = "If `true`, a viewport's 3D rendering is disabled."] # [doc = ""] # [inline] pub fn viewport_set_disable_3d (& self , viewport : Rid , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_disable_3d ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled) ; } } # [doc = "If `true`, rendering of a viewport's environment is disabled."] # [doc = ""] # [inline] pub fn viewport_set_disable_environment (& self , viewport : Rid , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_disable_environment ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled) ; } } # [doc = "Sets the viewport's global transformation matrix."] # [doc = ""] # [inline] pub fn viewport_set_global_canvas_transform (& self , viewport : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_global_canvas_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , transform) ; } } # [doc = "If `true`, the viewport renders to hdr."] # [doc = ""] # [inline] pub fn viewport_set_hdr (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hdr ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "If `true`, the viewport's canvas is not rendered."] # [doc = ""] # [inline] pub fn viewport_set_hide_canvas (& self , viewport : Rid , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hide_canvas ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden) ; } } # [doc = "Currently unimplemented in Godot 3.x."] # [doc = ""] # [inline] pub fn viewport_set_hide_scenario (& self , viewport : Rid , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hide_scenario ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden) ; } } # [doc = "Sets the anti-aliasing mode. See [enum ViewportMSAA] for options."] # [doc = ""] # [inline] pub fn viewport_set_msaa (& self , viewport : Rid , msaa : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_msaa ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , msaa) ; } } # [doc = "Sets the viewport's parent to another viewport."] # [doc = ""] # [inline] pub fn viewport_set_parent_viewport (& self , viewport : Rid , parent_viewport : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_parent_viewport ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , parent_viewport) ; } } # [doc = "If `true`, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the `SCREEN_TEXTURE`. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size."] # [doc = ""] # [inline] pub fn viewport_set_render_direct_to_screen (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_render_direct_to_screen ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "Sets a viewport's scenario.\nThe scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc."] # [doc = ""] # [inline] pub fn viewport_set_scenario (& self , viewport : Rid , scenario : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_scenario ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , scenario) ; } } # [doc = "Sets the shadow atlas quadrant's subdivision."] # [doc = ""] # [inline] pub fn viewport_set_shadow_atlas_quadrant_subdivision (& self , viewport : Rid , quadrant : i64 , subdivision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_shadow_atlas_quadrant_subdivision ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , quadrant , subdivision) ; } } # [doc = "Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2."] # [doc = ""] # [inline] pub fn viewport_set_shadow_atlas_size (& self , viewport : Rid , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_shadow_atlas_size ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , size) ; } } # [doc = "Sets the viewport's width and height."] # [doc = ""] # [inline] pub fn viewport_set_size (& self , viewport : Rid , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_size ; let ret = crate :: icalls :: icallptr_void_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , width , height) ; } } # [doc = "If `true`, the viewport renders its background as transparent."] # [doc = ""] # [inline] pub fn viewport_set_transparent_background (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_transparent_background ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } # [doc = "Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options."] # [doc = ""] # [inline] pub fn viewport_set_update_mode (& self , viewport : Rid , update_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_update_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , update_mode) ; } } # [doc = "Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options."] # [doc = ""] # [inline] pub fn viewport_set_usage (& self , viewport : Rid , usage : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_usage ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , usage) ; } } # [doc = "If `true`, the viewport uses augmented or virtual reality technologies. See [ARVRInterface]."] # [doc = ""] # [inline] pub fn viewport_set_use_arvr (& self , viewport : Rid , use_arvr : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_arvr ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , use_arvr) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn viewport_set_use_debanding (& self , viewport : Rid , debanding : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_debanding ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , debanding) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn viewport_set_use_fxaa (& self , viewport : Rid , fxaa : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_fxaa ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , fxaa) ; } } # [doc = "If `true`, the viewport's rendering is flipped vertically."] # [doc = ""] # [inline] pub fn viewport_set_vflip (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_vflip ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualServer { } unsafe impl GodotObject for VisualServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualServer" } } impl std :: ops :: Deref for VisualServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub black_bars_set_images : * mut sys :: godot_method_bind , pub black_bars_set_margins : * mut sys :: godot_method_bind , pub camera_create : * mut sys :: godot_method_bind , pub camera_set_cull_mask : * mut sys :: godot_method_bind , pub camera_set_environment : * mut sys :: godot_method_bind , pub camera_set_frustum : * mut sys :: godot_method_bind , pub camera_set_orthogonal : * mut sys :: godot_method_bind , pub camera_set_perspective : * mut sys :: godot_method_bind , pub camera_set_transform : * mut sys :: godot_method_bind , pub camera_set_use_vertical_aspect : * mut sys :: godot_method_bind , pub canvas_create : * mut sys :: godot_method_bind , pub canvas_item_add_circle : * mut sys :: godot_method_bind , pub canvas_item_add_clip_ignore : * mut sys :: godot_method_bind , pub canvas_item_add_line : * mut sys :: godot_method_bind , pub canvas_item_add_mesh : * mut sys :: godot_method_bind , pub canvas_item_add_multimesh : * mut sys :: godot_method_bind , pub canvas_item_add_nine_patch : * mut sys :: godot_method_bind , pub canvas_item_add_particles : * mut sys :: godot_method_bind , pub canvas_item_add_polygon : * mut sys :: godot_method_bind , pub canvas_item_add_polyline : * mut sys :: godot_method_bind , pub canvas_item_add_primitive : * mut sys :: godot_method_bind , pub canvas_item_add_rect : * mut sys :: godot_method_bind , pub canvas_item_add_set_transform : * mut sys :: godot_method_bind , pub canvas_item_add_texture_rect : * mut sys :: godot_method_bind , pub canvas_item_add_texture_rect_region : * mut sys :: godot_method_bind , pub canvas_item_add_triangle_array : * mut sys :: godot_method_bind , pub canvas_item_clear : * mut sys :: godot_method_bind , pub canvas_item_create : * mut sys :: godot_method_bind , pub canvas_item_set_clip : * mut sys :: godot_method_bind , pub canvas_item_set_copy_to_backbuffer : * mut sys :: godot_method_bind , pub canvas_item_set_custom_rect : * mut sys :: godot_method_bind , pub canvas_item_set_distance_field_mode : * mut sys :: godot_method_bind , pub canvas_item_set_draw_behind_parent : * mut sys :: godot_method_bind , pub canvas_item_set_draw_index : * mut sys :: godot_method_bind , pub canvas_item_set_light_mask : * mut sys :: godot_method_bind , pub canvas_item_set_material : * mut sys :: godot_method_bind , pub canvas_item_set_modulate : * mut sys :: godot_method_bind , pub canvas_item_set_parent : * mut sys :: godot_method_bind , pub canvas_item_set_self_modulate : * mut sys :: godot_method_bind , pub canvas_item_set_sort_children_by_y : * mut sys :: godot_method_bind , pub canvas_item_set_transform : * mut sys :: godot_method_bind , pub canvas_item_set_use_parent_material : * mut sys :: godot_method_bind , pub canvas_item_set_visible : * mut sys :: godot_method_bind , pub canvas_item_set_z_as_relative_to_parent : * mut sys :: godot_method_bind , pub canvas_item_set_z_index : * mut sys :: godot_method_bind , pub canvas_light_attach_to_canvas : * mut sys :: godot_method_bind , pub canvas_light_create : * mut sys :: godot_method_bind , pub canvas_light_occluder_attach_to_canvas : * mut sys :: godot_method_bind , pub canvas_light_occluder_create : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_enabled : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_light_mask : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_polygon : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_transform : * mut sys :: godot_method_bind , pub canvas_light_set_color : * mut sys :: godot_method_bind , pub canvas_light_set_enabled : * mut sys :: godot_method_bind , pub canvas_light_set_energy : * mut sys :: godot_method_bind , pub canvas_light_set_height : * mut sys :: godot_method_bind , pub canvas_light_set_item_cull_mask : * mut sys :: godot_method_bind , pub canvas_light_set_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub canvas_light_set_layer_range : * mut sys :: godot_method_bind , pub canvas_light_set_mode : * mut sys :: godot_method_bind , pub canvas_light_set_scale : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_buffer_size : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_color : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_enabled : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_filter : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_gradient_length : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_smooth : * mut sys :: godot_method_bind , pub canvas_light_set_texture : * mut sys :: godot_method_bind , pub canvas_light_set_texture_offset : * mut sys :: godot_method_bind , pub canvas_light_set_transform : * mut sys :: godot_method_bind , pub canvas_light_set_z_range : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_create : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_cull_mode : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_shape : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_shape_as_lines : * mut sys :: godot_method_bind , pub canvas_set_item_mirroring : * mut sys :: godot_method_bind , pub canvas_set_modulate : * mut sys :: godot_method_bind , pub directional_light_create : * mut sys :: godot_method_bind , pub draw : * mut sys :: godot_method_bind , pub environment_create : * mut sys :: godot_method_bind , pub environment_set_adjustment : * mut sys :: godot_method_bind , pub environment_set_ambient_light : * mut sys :: godot_method_bind , pub environment_set_background : * mut sys :: godot_method_bind , pub environment_set_bg_color : * mut sys :: godot_method_bind , pub environment_set_bg_energy : * mut sys :: godot_method_bind , pub environment_set_canvas_max_layer : * mut sys :: godot_method_bind , pub environment_set_dof_blur_far : * mut sys :: godot_method_bind , pub environment_set_dof_blur_near : * mut sys :: godot_method_bind , pub environment_set_fog : * mut sys :: godot_method_bind , pub environment_set_fog_depth : * mut sys :: godot_method_bind , pub environment_set_fog_height : * mut sys :: godot_method_bind , pub environment_set_glow : * mut sys :: godot_method_bind , pub environment_set_sky : * mut sys :: godot_method_bind , pub environment_set_sky_custom_fov : * mut sys :: godot_method_bind , pub environment_set_sky_orientation : * mut sys :: godot_method_bind , pub environment_set_ssao : * mut sys :: godot_method_bind , pub environment_set_ssr : * mut sys :: godot_method_bind , pub environment_set_tonemap : * mut sys :: godot_method_bind , pub finish : * mut sys :: godot_method_bind , pub force_draw : * mut sys :: godot_method_bind , pub force_sync : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_render_info : * mut sys :: godot_method_bind , pub get_test_cube : * mut sys :: godot_method_bind , pub get_test_texture : * mut sys :: godot_method_bind , pub get_video_adapter_name : * mut sys :: godot_method_bind , pub get_video_adapter_vendor : * mut sys :: godot_method_bind , pub get_white_texture : * mut sys :: godot_method_bind , pub gi_probe_create : * mut sys :: godot_method_bind , pub gi_probe_get_bias : * mut sys :: godot_method_bind , pub gi_probe_get_bounds : * mut sys :: godot_method_bind , pub gi_probe_get_cell_size : * mut sys :: godot_method_bind , pub gi_probe_get_dynamic_data : * mut sys :: godot_method_bind , pub gi_probe_get_dynamic_range : * mut sys :: godot_method_bind , pub gi_probe_get_energy : * mut sys :: godot_method_bind , pub gi_probe_get_normal_bias : * mut sys :: godot_method_bind , pub gi_probe_get_propagation : * mut sys :: godot_method_bind , pub gi_probe_get_to_cell_xform : * mut sys :: godot_method_bind , pub gi_probe_is_compressed : * mut sys :: godot_method_bind , pub gi_probe_is_interior : * mut sys :: godot_method_bind , pub gi_probe_set_bias : * mut sys :: godot_method_bind , pub gi_probe_set_bounds : * mut sys :: godot_method_bind , pub gi_probe_set_cell_size : * mut sys :: godot_method_bind , pub gi_probe_set_compress : * mut sys :: godot_method_bind , pub gi_probe_set_dynamic_data : * mut sys :: godot_method_bind , pub gi_probe_set_dynamic_range : * mut sys :: godot_method_bind , pub gi_probe_set_energy : * mut sys :: godot_method_bind , pub gi_probe_set_interior : * mut sys :: godot_method_bind , pub gi_probe_set_normal_bias : * mut sys :: godot_method_bind , pub gi_probe_set_propagation : * mut sys :: godot_method_bind , pub gi_probe_set_to_cell_xform : * mut sys :: godot_method_bind , pub has_changed : * mut sys :: godot_method_bind , pub has_feature : * mut sys :: godot_method_bind , pub has_os_feature : * mut sys :: godot_method_bind , pub immediate_begin : * mut sys :: godot_method_bind , pub immediate_clear : * mut sys :: godot_method_bind , pub immediate_color : * mut sys :: godot_method_bind , pub immediate_create : * mut sys :: godot_method_bind , pub immediate_end : * mut sys :: godot_method_bind , pub immediate_get_material : * mut sys :: godot_method_bind , pub immediate_normal : * mut sys :: godot_method_bind , pub immediate_set_material : * mut sys :: godot_method_bind , pub immediate_tangent : * mut sys :: godot_method_bind , pub immediate_uv : * mut sys :: godot_method_bind , pub immediate_uv2 : * mut sys :: godot_method_bind , pub immediate_vertex : * mut sys :: godot_method_bind , pub immediate_vertex_2d : * mut sys :: godot_method_bind , pub init : * mut sys :: godot_method_bind , pub instance_attach_object_instance_id : * mut sys :: godot_method_bind , pub instance_attach_skeleton : * mut sys :: godot_method_bind , pub instance_create : * mut sys :: godot_method_bind , pub instance_create2 : * mut sys :: godot_method_bind , pub instance_geometry_set_as_instance_lod : * mut sys :: godot_method_bind , pub instance_geometry_set_cast_shadows_setting : * mut sys :: godot_method_bind , pub instance_geometry_set_draw_range : * mut sys :: godot_method_bind , pub instance_geometry_set_flag : * mut sys :: godot_method_bind , pub instance_geometry_set_material_override : * mut sys :: godot_method_bind , pub instance_set_base : * mut sys :: godot_method_bind , pub instance_set_blend_shape_weight : * mut sys :: godot_method_bind , pub instance_set_custom_aabb : * mut sys :: godot_method_bind , pub instance_set_exterior : * mut sys :: godot_method_bind , pub instance_set_extra_visibility_margin : * mut sys :: godot_method_bind , pub instance_set_layer_mask : * mut sys :: godot_method_bind , pub instance_set_scenario : * mut sys :: godot_method_bind , pub instance_set_surface_material : * mut sys :: godot_method_bind , pub instance_set_transform : * mut sys :: godot_method_bind , pub instance_set_use_lightmap : * mut sys :: godot_method_bind , pub instance_set_visible : * mut sys :: godot_method_bind , pub instances_cull_aabb : * mut sys :: godot_method_bind , pub instances_cull_convex : * mut sys :: godot_method_bind , pub instances_cull_ray : * mut sys :: godot_method_bind , pub is_render_loop_enabled : * mut sys :: godot_method_bind , pub light_directional_set_blend_splits : * mut sys :: godot_method_bind , pub light_directional_set_shadow_depth_range_mode : * mut sys :: godot_method_bind , pub light_directional_set_shadow_mode : * mut sys :: godot_method_bind , pub light_omni_set_shadow_detail : * mut sys :: godot_method_bind , pub light_omni_set_shadow_mode : * mut sys :: godot_method_bind , pub light_set_bake_mode : * mut sys :: godot_method_bind , pub light_set_color : * mut sys :: godot_method_bind , pub light_set_cull_mask : * mut sys :: godot_method_bind , pub light_set_negative : * mut sys :: godot_method_bind , pub light_set_param : * mut sys :: godot_method_bind , pub light_set_projector : * mut sys :: godot_method_bind , pub light_set_reverse_cull_face_mode : * mut sys :: godot_method_bind , pub light_set_shadow : * mut sys :: godot_method_bind , pub light_set_shadow_color : * mut sys :: godot_method_bind , pub light_set_use_gi : * mut sys :: godot_method_bind , pub lightmap_capture_create : * mut sys :: godot_method_bind , pub lightmap_capture_get_bounds : * mut sys :: godot_method_bind , pub lightmap_capture_get_energy : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree_cell_subdiv : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree_cell_transform : * mut sys :: godot_method_bind , pub lightmap_capture_is_interior : * mut sys :: godot_method_bind , pub lightmap_capture_set_bounds : * mut sys :: godot_method_bind , pub lightmap_capture_set_energy : * mut sys :: godot_method_bind , pub lightmap_capture_set_interior : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree_cell_subdiv : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree_cell_transform : * mut sys :: godot_method_bind , pub make_sphere_mesh : * mut sys :: godot_method_bind , pub material_create : * mut sys :: godot_method_bind , pub material_get_param : * mut sys :: godot_method_bind , pub material_get_param_default : * mut sys :: godot_method_bind , pub material_get_shader : * mut sys :: godot_method_bind , pub material_set_line_width : * mut sys :: godot_method_bind , pub material_set_next_pass : * mut sys :: godot_method_bind , pub material_set_param : * mut sys :: godot_method_bind , pub material_set_render_priority : * mut sys :: godot_method_bind , pub material_set_shader : * mut sys :: godot_method_bind , pub mesh_add_surface_from_arrays : * mut sys :: godot_method_bind , pub mesh_clear : * mut sys :: godot_method_bind , pub mesh_create : * mut sys :: godot_method_bind , pub mesh_get_blend_shape_count : * mut sys :: godot_method_bind , pub mesh_get_blend_shape_mode : * mut sys :: godot_method_bind , pub mesh_get_custom_aabb : * mut sys :: godot_method_bind , pub mesh_get_surface_count : * mut sys :: godot_method_bind , pub mesh_remove_surface : * mut sys :: godot_method_bind , pub mesh_set_blend_shape_count : * mut sys :: godot_method_bind , pub mesh_set_blend_shape_mode : * mut sys :: godot_method_bind , pub mesh_set_custom_aabb : * mut sys :: godot_method_bind , pub mesh_surface_get_aabb : * mut sys :: godot_method_bind , pub mesh_surface_get_array : * mut sys :: godot_method_bind , pub mesh_surface_get_array_index_len : * mut sys :: godot_method_bind , pub mesh_surface_get_array_len : * mut sys :: godot_method_bind , pub mesh_surface_get_arrays : * mut sys :: godot_method_bind , pub mesh_surface_get_blend_shape_arrays : * mut sys :: godot_method_bind , pub mesh_surface_get_format : * mut sys :: godot_method_bind , pub mesh_surface_get_format_offset : * mut sys :: godot_method_bind , pub mesh_surface_get_format_stride : * mut sys :: godot_method_bind , pub mesh_surface_get_index_array : * mut sys :: godot_method_bind , pub mesh_surface_get_material : * mut sys :: godot_method_bind , pub mesh_surface_get_primitive_type : * mut sys :: godot_method_bind , pub mesh_surface_get_skeleton_aabb : * mut sys :: godot_method_bind , pub mesh_surface_set_material : * mut sys :: godot_method_bind , pub mesh_surface_update_region : * mut sys :: godot_method_bind , pub multimesh_allocate : * mut sys :: godot_method_bind , pub multimesh_create : * mut sys :: godot_method_bind , pub multimesh_get_aabb : * mut sys :: godot_method_bind , pub multimesh_get_instance_count : * mut sys :: godot_method_bind , pub multimesh_get_mesh : * mut sys :: godot_method_bind , pub multimesh_get_visible_instances : * mut sys :: godot_method_bind , pub multimesh_instance_get_color : * mut sys :: godot_method_bind , pub multimesh_instance_get_custom_data : * mut sys :: godot_method_bind , pub multimesh_instance_get_transform : * mut sys :: godot_method_bind , pub multimesh_instance_get_transform_2d : * mut sys :: godot_method_bind , pub multimesh_instance_set_color : * mut sys :: godot_method_bind , pub multimesh_instance_set_custom_data : * mut sys :: godot_method_bind , pub multimesh_instance_set_transform : * mut sys :: godot_method_bind , pub multimesh_instance_set_transform_2d : * mut sys :: godot_method_bind , pub multimesh_set_as_bulk_array : * mut sys :: godot_method_bind , pub multimesh_set_mesh : * mut sys :: godot_method_bind , pub multimesh_set_visible_instances : * mut sys :: godot_method_bind , pub omni_light_create : * mut sys :: godot_method_bind , pub particles_create : * mut sys :: godot_method_bind , pub particles_get_current_aabb : * mut sys :: godot_method_bind , pub particles_get_emitting : * mut sys :: godot_method_bind , pub particles_is_inactive : * mut sys :: godot_method_bind , pub particles_request_process : * mut sys :: godot_method_bind , pub particles_restart : * mut sys :: godot_method_bind , pub particles_set_amount : * mut sys :: godot_method_bind , pub particles_set_custom_aabb : * mut sys :: godot_method_bind , pub particles_set_draw_order : * mut sys :: godot_method_bind , pub particles_set_draw_pass_mesh : * mut sys :: godot_method_bind , pub particles_set_draw_passes : * mut sys :: godot_method_bind , pub particles_set_emission_transform : * mut sys :: godot_method_bind , pub particles_set_emitting : * mut sys :: godot_method_bind , pub particles_set_explosiveness_ratio : * mut sys :: godot_method_bind , pub particles_set_fixed_fps : * mut sys :: godot_method_bind , pub particles_set_fractional_delta : * mut sys :: godot_method_bind , pub particles_set_lifetime : * mut sys :: godot_method_bind , pub particles_set_one_shot : * mut sys :: godot_method_bind , pub particles_set_pre_process_time : * mut sys :: godot_method_bind , pub particles_set_process_material : * mut sys :: godot_method_bind , pub particles_set_randomness_ratio : * mut sys :: godot_method_bind , pub particles_set_speed_scale : * mut sys :: godot_method_bind , pub particles_set_use_local_coordinates : * mut sys :: godot_method_bind , pub reflection_probe_create : * mut sys :: godot_method_bind , pub reflection_probe_set_as_interior : * mut sys :: godot_method_bind , pub reflection_probe_set_cull_mask : * mut sys :: godot_method_bind , pub reflection_probe_set_enable_box_projection : * mut sys :: godot_method_bind , pub reflection_probe_set_enable_shadows : * mut sys :: godot_method_bind , pub reflection_probe_set_extents : * mut sys :: godot_method_bind , pub reflection_probe_set_intensity : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient_energy : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient_probe_contribution : * mut sys :: godot_method_bind , pub reflection_probe_set_max_distance : * mut sys :: godot_method_bind , pub reflection_probe_set_origin_offset : * mut sys :: godot_method_bind , pub reflection_probe_set_update_mode : * mut sys :: godot_method_bind , pub request_frame_drawn_callback : * mut sys :: godot_method_bind , pub scenario_create : * mut sys :: godot_method_bind , pub scenario_set_debug : * mut sys :: godot_method_bind , pub scenario_set_environment : * mut sys :: godot_method_bind , pub scenario_set_fallback_environment : * mut sys :: godot_method_bind , pub scenario_set_reflection_atlas_size : * mut sys :: godot_method_bind , pub set_boot_image : * mut sys :: godot_method_bind , pub set_debug_generate_wireframes : * mut sys :: godot_method_bind , pub set_default_clear_color : * mut sys :: godot_method_bind , pub set_render_loop_enabled : * mut sys :: godot_method_bind , pub set_shader_time_scale : * mut sys :: godot_method_bind , pub shader_create : * mut sys :: godot_method_bind , pub shader_get_code : * mut sys :: godot_method_bind , pub shader_get_default_texture_param : * mut sys :: godot_method_bind , pub shader_get_param_list : * mut sys :: godot_method_bind , pub shader_set_code : * mut sys :: godot_method_bind , pub shader_set_default_texture_param : * mut sys :: godot_method_bind , pub skeleton_allocate : * mut sys :: godot_method_bind , pub skeleton_bone_get_transform : * mut sys :: godot_method_bind , pub skeleton_bone_get_transform_2d : * mut sys :: godot_method_bind , pub skeleton_bone_set_transform : * mut sys :: godot_method_bind , pub skeleton_bone_set_transform_2d : * mut sys :: godot_method_bind , pub skeleton_create : * mut sys :: godot_method_bind , pub skeleton_get_bone_count : * mut sys :: godot_method_bind , pub sky_create : * mut sys :: godot_method_bind , pub sky_set_texture : * mut sys :: godot_method_bind , pub spot_light_create : * mut sys :: godot_method_bind , pub sync : * mut sys :: godot_method_bind , pub texture_allocate : * mut sys :: godot_method_bind , pub texture_bind : * mut sys :: godot_method_bind , pub texture_create : * mut sys :: godot_method_bind , pub texture_create_from_image : * mut sys :: godot_method_bind , pub texture_debug_usage : * mut sys :: godot_method_bind , pub texture_get_data : * mut sys :: godot_method_bind , pub texture_get_depth : * mut sys :: godot_method_bind , pub texture_get_flags : * mut sys :: godot_method_bind , pub texture_get_format : * mut sys :: godot_method_bind , pub texture_get_height : * mut sys :: godot_method_bind , pub texture_get_path : * mut sys :: godot_method_bind , pub texture_get_texid : * mut sys :: godot_method_bind , pub texture_get_type : * mut sys :: godot_method_bind , pub texture_get_width : * mut sys :: godot_method_bind , pub texture_set_data : * mut sys :: godot_method_bind , pub texture_set_data_partial : * mut sys :: godot_method_bind , pub texture_set_flags : * mut sys :: godot_method_bind , pub texture_set_path : * mut sys :: godot_method_bind , pub texture_set_shrink_all_x2_on_set_data : * mut sys :: godot_method_bind , pub texture_set_size_override : * mut sys :: godot_method_bind , pub textures_keep_original : * mut sys :: godot_method_bind , pub viewport_attach_camera : * mut sys :: godot_method_bind , pub viewport_attach_canvas : * mut sys :: godot_method_bind , pub viewport_attach_to_screen : * mut sys :: godot_method_bind , pub viewport_create : * mut sys :: godot_method_bind , pub viewport_detach : * mut sys :: godot_method_bind , pub viewport_get_render_info : * mut sys :: godot_method_bind , pub viewport_get_texture : * mut sys :: godot_method_bind , pub viewport_remove_canvas : * mut sys :: godot_method_bind , pub viewport_set_active : * mut sys :: godot_method_bind , pub viewport_set_canvas_stacking : * mut sys :: godot_method_bind , pub viewport_set_canvas_transform : * mut sys :: godot_method_bind , pub viewport_set_clear_mode : * mut sys :: godot_method_bind , pub viewport_set_debug_draw : * mut sys :: godot_method_bind , pub viewport_set_disable_3d : * mut sys :: godot_method_bind , pub viewport_set_disable_environment : * mut sys :: godot_method_bind , pub viewport_set_global_canvas_transform : * mut sys :: godot_method_bind , pub viewport_set_hdr : * mut sys :: godot_method_bind , pub viewport_set_hide_canvas : * mut sys :: godot_method_bind , pub viewport_set_hide_scenario : * mut sys :: godot_method_bind , pub viewport_set_msaa : * mut sys :: godot_method_bind , pub viewport_set_parent_viewport : * mut sys :: godot_method_bind , pub viewport_set_render_direct_to_screen : * mut sys :: godot_method_bind , pub viewport_set_scenario : * mut sys :: godot_method_bind , pub viewport_set_shadow_atlas_quadrant_subdivision : * mut sys :: godot_method_bind , pub viewport_set_shadow_atlas_size : * mut sys :: godot_method_bind , pub viewport_set_size : * mut sys :: godot_method_bind , pub viewport_set_transparent_background : * mut sys :: godot_method_bind , pub viewport_set_update_mode : * mut sys :: godot_method_bind , pub viewport_set_usage : * mut sys :: godot_method_bind , pub viewport_set_use_arvr : * mut sys :: godot_method_bind , pub viewport_set_use_debanding : * mut sys :: godot_method_bind , pub viewport_set_use_fxaa : * mut sys :: godot_method_bind , pub viewport_set_vflip : * mut sys :: godot_method_bind } impl VisualServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualServerMethodTable = VisualServerMethodTable { class_constructor : None , black_bars_set_images : 0 as * mut sys :: godot_method_bind , black_bars_set_margins : 0 as * mut sys :: godot_method_bind , camera_create : 0 as * mut sys :: godot_method_bind , camera_set_cull_mask : 0 as * mut sys :: godot_method_bind , camera_set_environment : 0 as * mut sys :: godot_method_bind , camera_set_frustum : 0 as * mut sys :: godot_method_bind , camera_set_orthogonal : 0 as * mut sys :: godot_method_bind , camera_set_perspective : 0 as * mut sys :: godot_method_bind , camera_set_transform : 0 as * mut sys :: godot_method_bind , camera_set_use_vertical_aspect : 0 as * mut sys :: godot_method_bind , canvas_create : 0 as * mut sys :: godot_method_bind , canvas_item_add_circle : 0 as * mut sys :: godot_method_bind , canvas_item_add_clip_ignore : 0 as * mut sys :: godot_method_bind , canvas_item_add_line : 0 as * mut sys :: godot_method_bind , canvas_item_add_mesh : 0 as * mut sys :: godot_method_bind , canvas_item_add_multimesh : 0 as * mut sys :: godot_method_bind , canvas_item_add_nine_patch : 0 as * mut sys :: godot_method_bind , canvas_item_add_particles : 0 as * mut sys :: godot_method_bind , canvas_item_add_polygon : 0 as * mut sys :: godot_method_bind , canvas_item_add_polyline : 0 as * mut sys :: godot_method_bind , canvas_item_add_primitive : 0 as * mut sys :: godot_method_bind , canvas_item_add_rect : 0 as * mut sys :: godot_method_bind , canvas_item_add_set_transform : 0 as * mut sys :: godot_method_bind , canvas_item_add_texture_rect : 0 as * mut sys :: godot_method_bind , canvas_item_add_texture_rect_region : 0 as * mut sys :: godot_method_bind , canvas_item_add_triangle_array : 0 as * mut sys :: godot_method_bind , canvas_item_clear : 0 as * mut sys :: godot_method_bind , canvas_item_create : 0 as * mut sys :: godot_method_bind , canvas_item_set_clip : 0 as * mut sys :: godot_method_bind , canvas_item_set_copy_to_backbuffer : 0 as * mut sys :: godot_method_bind , canvas_item_set_custom_rect : 0 as * mut sys :: godot_method_bind , canvas_item_set_distance_field_mode : 0 as * mut sys :: godot_method_bind , canvas_item_set_draw_behind_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_draw_index : 0 as * mut sys :: godot_method_bind , canvas_item_set_light_mask : 0 as * mut sys :: godot_method_bind , canvas_item_set_material : 0 as * mut sys :: godot_method_bind , canvas_item_set_modulate : 0 as * mut sys :: godot_method_bind , canvas_item_set_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_self_modulate : 0 as * mut sys :: godot_method_bind , canvas_item_set_sort_children_by_y : 0 as * mut sys :: godot_method_bind , canvas_item_set_transform : 0 as * mut sys :: godot_method_bind , canvas_item_set_use_parent_material : 0 as * mut sys :: godot_method_bind , canvas_item_set_visible : 0 as * mut sys :: godot_method_bind , canvas_item_set_z_as_relative_to_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_z_index : 0 as * mut sys :: godot_method_bind , canvas_light_attach_to_canvas : 0 as * mut sys :: godot_method_bind , canvas_light_create : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_attach_to_canvas : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_create : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_light_mask : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_polygon : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_transform : 0 as * mut sys :: godot_method_bind , canvas_light_set_color : 0 as * mut sys :: godot_method_bind , canvas_light_set_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_set_energy : 0 as * mut sys :: godot_method_bind , canvas_light_set_height : 0 as * mut sys :: godot_method_bind , canvas_light_set_item_cull_mask : 0 as * mut sys :: godot_method_bind , canvas_light_set_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , canvas_light_set_layer_range : 0 as * mut sys :: godot_method_bind , canvas_light_set_mode : 0 as * mut sys :: godot_method_bind , canvas_light_set_scale : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_color : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_filter : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_smooth : 0 as * mut sys :: godot_method_bind , canvas_light_set_texture : 0 as * mut sys :: godot_method_bind , canvas_light_set_texture_offset : 0 as * mut sys :: godot_method_bind , canvas_light_set_transform : 0 as * mut sys :: godot_method_bind , canvas_light_set_z_range : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_create : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_cull_mode : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_shape : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_shape_as_lines : 0 as * mut sys :: godot_method_bind , canvas_set_item_mirroring : 0 as * mut sys :: godot_method_bind , canvas_set_modulate : 0 as * mut sys :: godot_method_bind , directional_light_create : 0 as * mut sys :: godot_method_bind , draw : 0 as * mut sys :: godot_method_bind , environment_create : 0 as * mut sys :: godot_method_bind , environment_set_adjustment : 0 as * mut sys :: godot_method_bind , environment_set_ambient_light : 0 as * mut sys :: godot_method_bind , environment_set_background : 0 as * mut sys :: godot_method_bind , environment_set_bg_color : 0 as * mut sys :: godot_method_bind , environment_set_bg_energy : 0 as * mut sys :: godot_method_bind , environment_set_canvas_max_layer : 0 as * mut sys :: godot_method_bind , environment_set_dof_blur_far : 0 as * mut sys :: godot_method_bind , environment_set_dof_blur_near : 0 as * mut sys :: godot_method_bind , environment_set_fog : 0 as * mut sys :: godot_method_bind , environment_set_fog_depth : 0 as * mut sys :: godot_method_bind , environment_set_fog_height : 0 as * mut sys :: godot_method_bind , environment_set_glow : 0 as * mut sys :: godot_method_bind , environment_set_sky : 0 as * mut sys :: godot_method_bind , environment_set_sky_custom_fov : 0 as * mut sys :: godot_method_bind , environment_set_sky_orientation : 0 as * mut sys :: godot_method_bind , environment_set_ssao : 0 as * mut sys :: godot_method_bind , environment_set_ssr : 0 as * mut sys :: godot_method_bind , environment_set_tonemap : 0 as * mut sys :: godot_method_bind , finish : 0 as * mut sys :: godot_method_bind , force_draw : 0 as * mut sys :: godot_method_bind , force_sync : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_render_info : 0 as * mut sys :: godot_method_bind , get_test_cube : 0 as * mut sys :: godot_method_bind , get_test_texture : 0 as * mut sys :: godot_method_bind , get_video_adapter_name : 0 as * mut sys :: godot_method_bind , get_video_adapter_vendor : 0 as * mut sys :: godot_method_bind , get_white_texture : 0 as * mut sys :: godot_method_bind , gi_probe_create : 0 as * mut sys :: godot_method_bind , gi_probe_get_bias : 0 as * mut sys :: godot_method_bind , gi_probe_get_bounds : 0 as * mut sys :: godot_method_bind , gi_probe_get_cell_size : 0 as * mut sys :: godot_method_bind , gi_probe_get_dynamic_data : 0 as * mut sys :: godot_method_bind , gi_probe_get_dynamic_range : 0 as * mut sys :: godot_method_bind , gi_probe_get_energy : 0 as * mut sys :: godot_method_bind , gi_probe_get_normal_bias : 0 as * mut sys :: godot_method_bind , gi_probe_get_propagation : 0 as * mut sys :: godot_method_bind , gi_probe_get_to_cell_xform : 0 as * mut sys :: godot_method_bind , gi_probe_is_compressed : 0 as * mut sys :: godot_method_bind , gi_probe_is_interior : 0 as * mut sys :: godot_method_bind , gi_probe_set_bias : 0 as * mut sys :: godot_method_bind , gi_probe_set_bounds : 0 as * mut sys :: godot_method_bind , gi_probe_set_cell_size : 0 as * mut sys :: godot_method_bind , gi_probe_set_compress : 0 as * mut sys :: godot_method_bind , gi_probe_set_dynamic_data : 0 as * mut sys :: godot_method_bind , gi_probe_set_dynamic_range : 0 as * mut sys :: godot_method_bind , gi_probe_set_energy : 0 as * mut sys :: godot_method_bind , gi_probe_set_interior : 0 as * mut sys :: godot_method_bind , gi_probe_set_normal_bias : 0 as * mut sys :: godot_method_bind , gi_probe_set_propagation : 0 as * mut sys :: godot_method_bind , gi_probe_set_to_cell_xform : 0 as * mut sys :: godot_method_bind , has_changed : 0 as * mut sys :: godot_method_bind , has_feature : 0 as * mut sys :: godot_method_bind , has_os_feature : 0 as * mut sys :: godot_method_bind , immediate_begin : 0 as * mut sys :: godot_method_bind , immediate_clear : 0 as * mut sys :: godot_method_bind , immediate_color : 0 as * mut sys :: godot_method_bind , immediate_create : 0 as * mut sys :: godot_method_bind , immediate_end : 0 as * mut sys :: godot_method_bind , immediate_get_material : 0 as * mut sys :: godot_method_bind , immediate_normal : 0 as * mut sys :: godot_method_bind , immediate_set_material : 0 as * mut sys :: godot_method_bind , immediate_tangent : 0 as * mut sys :: godot_method_bind , immediate_uv : 0 as * mut sys :: godot_method_bind , immediate_uv2 : 0 as * mut sys :: godot_method_bind , immediate_vertex : 0 as * mut sys :: godot_method_bind , immediate_vertex_2d : 0 as * mut sys :: godot_method_bind , init : 0 as * mut sys :: godot_method_bind , instance_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , instance_attach_skeleton : 0 as * mut sys :: godot_method_bind , instance_create : 0 as * mut sys :: godot_method_bind , instance_create2 : 0 as * mut sys :: godot_method_bind , instance_geometry_set_as_instance_lod : 0 as * mut sys :: godot_method_bind , instance_geometry_set_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , instance_geometry_set_draw_range : 0 as * mut sys :: godot_method_bind , instance_geometry_set_flag : 0 as * mut sys :: godot_method_bind , instance_geometry_set_material_override : 0 as * mut sys :: godot_method_bind , instance_set_base : 0 as * mut sys :: godot_method_bind , instance_set_blend_shape_weight : 0 as * mut sys :: godot_method_bind , instance_set_custom_aabb : 0 as * mut sys :: godot_method_bind , instance_set_exterior : 0 as * mut sys :: godot_method_bind , instance_set_extra_visibility_margin : 0 as * mut sys :: godot_method_bind , instance_set_layer_mask : 0 as * mut sys :: godot_method_bind , instance_set_scenario : 0 as * mut sys :: godot_method_bind , instance_set_surface_material : 0 as * mut sys :: godot_method_bind , instance_set_transform : 0 as * mut sys :: godot_method_bind , instance_set_use_lightmap : 0 as * mut sys :: godot_method_bind , instance_set_visible : 0 as * mut sys :: godot_method_bind , instances_cull_aabb : 0 as * mut sys :: godot_method_bind , instances_cull_convex : 0 as * mut sys :: godot_method_bind , instances_cull_ray : 0 as * mut sys :: godot_method_bind , is_render_loop_enabled : 0 as * mut sys :: godot_method_bind , light_directional_set_blend_splits : 0 as * mut sys :: godot_method_bind , light_directional_set_shadow_depth_range_mode : 0 as * mut sys :: godot_method_bind , light_directional_set_shadow_mode : 0 as * mut sys :: godot_method_bind , light_omni_set_shadow_detail : 0 as * mut sys :: godot_method_bind , light_omni_set_shadow_mode : 0 as * mut sys :: godot_method_bind , light_set_bake_mode : 0 as * mut sys :: godot_method_bind , light_set_color : 0 as * mut sys :: godot_method_bind , light_set_cull_mask : 0 as * mut sys :: godot_method_bind , light_set_negative : 0 as * mut sys :: godot_method_bind , light_set_param : 0 as * mut sys :: godot_method_bind , light_set_projector : 0 as * mut sys :: godot_method_bind , light_set_reverse_cull_face_mode : 0 as * mut sys :: godot_method_bind , light_set_shadow : 0 as * mut sys :: godot_method_bind , light_set_shadow_color : 0 as * mut sys :: godot_method_bind , light_set_use_gi : 0 as * mut sys :: godot_method_bind , lightmap_capture_create : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_bounds : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_energy : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree_cell_subdiv : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree_cell_transform : 0 as * mut sys :: godot_method_bind , lightmap_capture_is_interior : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_bounds : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_energy : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_interior : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree_cell_subdiv : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree_cell_transform : 0 as * mut sys :: godot_method_bind , make_sphere_mesh : 0 as * mut sys :: godot_method_bind , material_create : 0 as * mut sys :: godot_method_bind , material_get_param : 0 as * mut sys :: godot_method_bind , material_get_param_default : 0 as * mut sys :: godot_method_bind , material_get_shader : 0 as * mut sys :: godot_method_bind , material_set_line_width : 0 as * mut sys :: godot_method_bind , material_set_next_pass : 0 as * mut sys :: godot_method_bind , material_set_param : 0 as * mut sys :: godot_method_bind , material_set_render_priority : 0 as * mut sys :: godot_method_bind , material_set_shader : 0 as * mut sys :: godot_method_bind , mesh_add_surface_from_arrays : 0 as * mut sys :: godot_method_bind , mesh_clear : 0 as * mut sys :: godot_method_bind , mesh_create : 0 as * mut sys :: godot_method_bind , mesh_get_blend_shape_count : 0 as * mut sys :: godot_method_bind , mesh_get_blend_shape_mode : 0 as * mut sys :: godot_method_bind , mesh_get_custom_aabb : 0 as * mut sys :: godot_method_bind , mesh_get_surface_count : 0 as * mut sys :: godot_method_bind , mesh_remove_surface : 0 as * mut sys :: godot_method_bind , mesh_set_blend_shape_count : 0 as * mut sys :: godot_method_bind , mesh_set_blend_shape_mode : 0 as * mut sys :: godot_method_bind , mesh_set_custom_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_get_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array_index_len : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array_len : 0 as * mut sys :: godot_method_bind , mesh_surface_get_arrays : 0 as * mut sys :: godot_method_bind , mesh_surface_get_blend_shape_arrays : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format_offset : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format_stride : 0 as * mut sys :: godot_method_bind , mesh_surface_get_index_array : 0 as * mut sys :: godot_method_bind , mesh_surface_get_material : 0 as * mut sys :: godot_method_bind , mesh_surface_get_primitive_type : 0 as * mut sys :: godot_method_bind , mesh_surface_get_skeleton_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_set_material : 0 as * mut sys :: godot_method_bind , mesh_surface_update_region : 0 as * mut sys :: godot_method_bind , multimesh_allocate : 0 as * mut sys :: godot_method_bind , multimesh_create : 0 as * mut sys :: godot_method_bind , multimesh_get_aabb : 0 as * mut sys :: godot_method_bind , multimesh_get_instance_count : 0 as * mut sys :: godot_method_bind , multimesh_get_mesh : 0 as * mut sys :: godot_method_bind , multimesh_get_visible_instances : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_color : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_custom_data : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_transform : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_transform_2d : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_color : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_custom_data : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_transform : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_transform_2d : 0 as * mut sys :: godot_method_bind , multimesh_set_as_bulk_array : 0 as * mut sys :: godot_method_bind , multimesh_set_mesh : 0 as * mut sys :: godot_method_bind , multimesh_set_visible_instances : 0 as * mut sys :: godot_method_bind , omni_light_create : 0 as * mut sys :: godot_method_bind , particles_create : 0 as * mut sys :: godot_method_bind , particles_get_current_aabb : 0 as * mut sys :: godot_method_bind , particles_get_emitting : 0 as * mut sys :: godot_method_bind , particles_is_inactive : 0 as * mut sys :: godot_method_bind , particles_request_process : 0 as * mut sys :: godot_method_bind , particles_restart : 0 as * mut sys :: godot_method_bind , particles_set_amount : 0 as * mut sys :: godot_method_bind , particles_set_custom_aabb : 0 as * mut sys :: godot_method_bind , particles_set_draw_order : 0 as * mut sys :: godot_method_bind , particles_set_draw_pass_mesh : 0 as * mut sys :: godot_method_bind , particles_set_draw_passes : 0 as * mut sys :: godot_method_bind , particles_set_emission_transform : 0 as * mut sys :: godot_method_bind , particles_set_emitting : 0 as * mut sys :: godot_method_bind , particles_set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , particles_set_fixed_fps : 0 as * mut sys :: godot_method_bind , particles_set_fractional_delta : 0 as * mut sys :: godot_method_bind , particles_set_lifetime : 0 as * mut sys :: godot_method_bind , particles_set_one_shot : 0 as * mut sys :: godot_method_bind , particles_set_pre_process_time : 0 as * mut sys :: godot_method_bind , particles_set_process_material : 0 as * mut sys :: godot_method_bind , particles_set_randomness_ratio : 0 as * mut sys :: godot_method_bind , particles_set_speed_scale : 0 as * mut sys :: godot_method_bind , particles_set_use_local_coordinates : 0 as * mut sys :: godot_method_bind , reflection_probe_create : 0 as * mut sys :: godot_method_bind , reflection_probe_set_as_interior : 0 as * mut sys :: godot_method_bind , reflection_probe_set_cull_mask : 0 as * mut sys :: godot_method_bind , reflection_probe_set_enable_box_projection : 0 as * mut sys :: godot_method_bind , reflection_probe_set_enable_shadows : 0 as * mut sys :: godot_method_bind , reflection_probe_set_extents : 0 as * mut sys :: godot_method_bind , reflection_probe_set_intensity : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient_energy : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient_probe_contribution : 0 as * mut sys :: godot_method_bind , reflection_probe_set_max_distance : 0 as * mut sys :: godot_method_bind , reflection_probe_set_origin_offset : 0 as * mut sys :: godot_method_bind , reflection_probe_set_update_mode : 0 as * mut sys :: godot_method_bind , request_frame_drawn_callback : 0 as * mut sys :: godot_method_bind , scenario_create : 0 as * mut sys :: godot_method_bind , scenario_set_debug : 0 as * mut sys :: godot_method_bind , scenario_set_environment : 0 as * mut sys :: godot_method_bind , scenario_set_fallback_environment : 0 as * mut sys :: godot_method_bind , scenario_set_reflection_atlas_size : 0 as * mut sys :: godot_method_bind , set_boot_image : 0 as * mut sys :: godot_method_bind , set_debug_generate_wireframes : 0 as * mut sys :: godot_method_bind , set_default_clear_color : 0 as * mut sys :: godot_method_bind , set_render_loop_enabled : 0 as * mut sys :: godot_method_bind , set_shader_time_scale : 0 as * mut sys :: godot_method_bind , shader_create : 0 as * mut sys :: godot_method_bind , shader_get_code : 0 as * mut sys :: godot_method_bind , shader_get_default_texture_param : 0 as * mut sys :: godot_method_bind , shader_get_param_list : 0 as * mut sys :: godot_method_bind , shader_set_code : 0 as * mut sys :: godot_method_bind , shader_set_default_texture_param : 0 as * mut sys :: godot_method_bind , skeleton_allocate : 0 as * mut sys :: godot_method_bind , skeleton_bone_get_transform : 0 as * mut sys :: godot_method_bind , skeleton_bone_get_transform_2d : 0 as * mut sys :: godot_method_bind , skeleton_bone_set_transform : 0 as * mut sys :: godot_method_bind , skeleton_bone_set_transform_2d : 0 as * mut sys :: godot_method_bind , skeleton_create : 0 as * mut sys :: godot_method_bind , skeleton_get_bone_count : 0 as * mut sys :: godot_method_bind , sky_create : 0 as * mut sys :: godot_method_bind , sky_set_texture : 0 as * mut sys :: godot_method_bind , spot_light_create : 0 as * mut sys :: godot_method_bind , sync : 0 as * mut sys :: godot_method_bind , texture_allocate : 0 as * mut sys :: godot_method_bind , texture_bind : 0 as * mut sys :: godot_method_bind , texture_create : 0 as * mut sys :: godot_method_bind , texture_create_from_image : 0 as * mut sys :: godot_method_bind , texture_debug_usage : 0 as * mut sys :: godot_method_bind , texture_get_data : 0 as * mut sys :: godot_method_bind , texture_get_depth : 0 as * mut sys :: godot_method_bind , texture_get_flags : 0 as * mut sys :: godot_method_bind , texture_get_format : 0 as * mut sys :: godot_method_bind , texture_get_height : 0 as * mut sys :: godot_method_bind , texture_get_path : 0 as * mut sys :: godot_method_bind , texture_get_texid : 0 as * mut sys :: godot_method_bind , texture_get_type : 0 as * mut sys :: godot_method_bind , texture_get_width : 0 as * mut sys :: godot_method_bind , texture_set_data : 0 as * mut sys :: godot_method_bind , texture_set_data_partial : 0 as * mut sys :: godot_method_bind , texture_set_flags : 0 as * mut sys :: godot_method_bind , texture_set_path : 0 as * mut sys :: godot_method_bind , texture_set_shrink_all_x2_on_set_data : 0 as * mut sys :: godot_method_bind , texture_set_size_override : 0 as * mut sys :: godot_method_bind , textures_keep_original : 0 as * mut sys :: godot_method_bind , viewport_attach_camera : 0 as * mut sys :: godot_method_bind , viewport_attach_canvas : 0 as * mut sys :: godot_method_bind , viewport_attach_to_screen : 0 as * mut sys :: godot_method_bind , viewport_create : 0 as * mut sys :: godot_method_bind , viewport_detach : 0 as * mut sys :: godot_method_bind , viewport_get_render_info : 0 as * mut sys :: godot_method_bind , viewport_get_texture : 0 as * mut sys :: godot_method_bind , viewport_remove_canvas : 0 as * mut sys :: godot_method_bind , viewport_set_active : 0 as * mut sys :: godot_method_bind , viewport_set_canvas_stacking : 0 as * mut sys :: godot_method_bind , viewport_set_canvas_transform : 0 as * mut sys :: godot_method_bind , viewport_set_clear_mode : 0 as * mut sys :: godot_method_bind , viewport_set_debug_draw : 0 as * mut sys :: godot_method_bind , viewport_set_disable_3d : 0 as * mut sys :: godot_method_bind , viewport_set_disable_environment : 0 as * mut sys :: godot_method_bind , viewport_set_global_canvas_transform : 0 as * mut sys :: godot_method_bind , viewport_set_hdr : 0 as * mut sys :: godot_method_bind , viewport_set_hide_canvas : 0 as * mut sys :: godot_method_bind , viewport_set_hide_scenario : 0 as * mut sys :: godot_method_bind , viewport_set_msaa : 0 as * mut sys :: godot_method_bind , viewport_set_parent_viewport : 0 as * mut sys :: godot_method_bind , viewport_set_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , viewport_set_scenario : 0 as * mut sys :: godot_method_bind , viewport_set_shadow_atlas_quadrant_subdivision : 0 as * mut sys :: godot_method_bind , viewport_set_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , viewport_set_size : 0 as * mut sys :: godot_method_bind , viewport_set_transparent_background : 0 as * mut sys :: godot_method_bind , viewport_set_update_mode : 0 as * mut sys :: godot_method_bind , viewport_set_usage : 0 as * mut sys :: godot_method_bind , viewport_set_use_arvr : 0 as * mut sys :: godot_method_bind , viewport_set_use_debanding : 0 as * mut sys :: godot_method_bind , viewport_set_use_fxaa : 0 as * mut sys :: godot_method_bind , viewport_set_vflip : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . black_bars_set_images = (gd_api . godot_method_bind_get_method) (class_name , "black_bars_set_images\0" . as_ptr () as * const c_char) ; table . black_bars_set_margins = (gd_api . godot_method_bind_get_method) (class_name , "black_bars_set_margins\0" . as_ptr () as * const c_char) ; table . camera_create = (gd_api . godot_method_bind_get_method) (class_name , "camera_create\0" . as_ptr () as * const c_char) ; table . camera_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_cull_mask\0" . as_ptr () as * const c_char) ; table . camera_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_environment\0" . as_ptr () as * const c_char) ; table . camera_set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_frustum\0" . as_ptr () as * const c_char) ; table . camera_set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_orthogonal\0" . as_ptr () as * const c_char) ; table . camera_set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_perspective\0" . as_ptr () as * const c_char) ; table . camera_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_transform\0" . as_ptr () as * const c_char) ; table . camera_set_use_vertical_aspect = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_use_vertical_aspect\0" . as_ptr () as * const c_char) ; table . canvas_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_create\0" . as_ptr () as * const c_char) ; table . canvas_item_add_circle = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_circle\0" . as_ptr () as * const c_char) ; table . canvas_item_add_clip_ignore = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_clip_ignore\0" . as_ptr () as * const c_char) ; table . canvas_item_add_line = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_line\0" . as_ptr () as * const c_char) ; table . canvas_item_add_mesh = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_mesh\0" . as_ptr () as * const c_char) ; table . canvas_item_add_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_multimesh\0" . as_ptr () as * const c_char) ; table . canvas_item_add_nine_patch = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_nine_patch\0" . as_ptr () as * const c_char) ; table . canvas_item_add_particles = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_particles\0" . as_ptr () as * const c_char) ; table . canvas_item_add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_polygon\0" . as_ptr () as * const c_char) ; table . canvas_item_add_polyline = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_polyline\0" . as_ptr () as * const c_char) ; table . canvas_item_add_primitive = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_primitive\0" . as_ptr () as * const c_char) ; table . canvas_item_add_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_add_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_item_add_texture_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_texture_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_add_texture_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_texture_rect_region\0" . as_ptr () as * const c_char) ; table . canvas_item_add_triangle_array = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_triangle_array\0" . as_ptr () as * const c_char) ; table . canvas_item_clear = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_clear\0" . as_ptr () as * const c_char) ; table . canvas_item_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_create\0" . as_ptr () as * const c_char) ; table . canvas_item_set_clip = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_clip\0" . as_ptr () as * const c_char) ; table . canvas_item_set_copy_to_backbuffer = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_copy_to_backbuffer\0" . as_ptr () as * const c_char) ; table . canvas_item_set_custom_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_custom_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_set_distance_field_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_distance_field_mode\0" . as_ptr () as * const c_char) ; table . canvas_item_set_draw_behind_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_draw_behind_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_draw_index = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_draw_index\0" . as_ptr () as * const c_char) ; table . canvas_item_set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_light_mask\0" . as_ptr () as * const c_char) ; table . canvas_item_set_material = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_material\0" . as_ptr () as * const c_char) ; table . canvas_item_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_modulate\0" . as_ptr () as * const c_char) ; table . canvas_item_set_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_self_modulate\0" . as_ptr () as * const c_char) ; table . canvas_item_set_sort_children_by_y = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_sort_children_by_y\0" . as_ptr () as * const c_char) ; table . canvas_item_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_item_set_use_parent_material = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_use_parent_material\0" . as_ptr () as * const c_char) ; table . canvas_item_set_visible = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_visible\0" . as_ptr () as * const c_char) ; table . canvas_item_set_z_as_relative_to_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_z_as_relative_to_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_z_index\0" . as_ptr () as * const c_char) ; table . canvas_light_attach_to_canvas = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_attach_to_canvas\0" . as_ptr () as * const c_char) ; table . canvas_light_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_create\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_attach_to_canvas = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_attach_to_canvas\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_create\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_light_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_polygon\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_light_set_color = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_color\0" . as_ptr () as * const c_char) ; table . canvas_light_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_energy\0" . as_ptr () as * const c_char) ; table . canvas_light_set_height = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_height\0" . as_ptr () as * const c_char) ; table . canvas_light_set_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_item_cull_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_set_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_set_layer_range = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_layer_range\0" . as_ptr () as * const c_char) ; table . canvas_light_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_mode\0" . as_ptr () as * const c_char) ; table . canvas_light_set_scale = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_scale\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_color\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_filter\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_smooth\0" . as_ptr () as * const c_char) ; table . canvas_light_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_texture\0" . as_ptr () as * const c_char) ; table . canvas_light_set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_texture_offset\0" . as_ptr () as * const c_char) ; table . canvas_light_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_light_set_z_range = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_z_range\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_create\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_cull_mode\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_shape\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_shape_as_lines = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_shape_as_lines\0" . as_ptr () as * const c_char) ; table . canvas_set_item_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "canvas_set_item_mirroring\0" . as_ptr () as * const c_char) ; table . canvas_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_set_modulate\0" . as_ptr () as * const c_char) ; table . directional_light_create = (gd_api . godot_method_bind_get_method) (class_name , "directional_light_create\0" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . environment_create = (gd_api . godot_method_bind_get_method) (class_name , "environment_create\0" . as_ptr () as * const c_char) ; table . environment_set_adjustment = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_adjustment\0" . as_ptr () as * const c_char) ; table . environment_set_ambient_light = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ambient_light\0" . as_ptr () as * const c_char) ; table . environment_set_background = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_background\0" . as_ptr () as * const c_char) ; table . environment_set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_bg_color\0" . as_ptr () as * const c_char) ; table . environment_set_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_bg_energy\0" . as_ptr () as * const c_char) ; table . environment_set_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . environment_set_dof_blur_far = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_dof_blur_far\0" . as_ptr () as * const c_char) ; table . environment_set_dof_blur_near = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_dof_blur_near\0" . as_ptr () as * const c_char) ; table . environment_set_fog = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog\0" . as_ptr () as * const c_char) ; table . environment_set_fog_depth = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog_depth\0" . as_ptr () as * const c_char) ; table . environment_set_fog_height = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog_height\0" . as_ptr () as * const c_char) ; table . environment_set_glow = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_glow\0" . as_ptr () as * const c_char) ; table . environment_set_sky = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky\0" . as_ptr () as * const c_char) ; table . environment_set_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . environment_set_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky_orientation\0" . as_ptr () as * const c_char) ; table . environment_set_ssao = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssao\0" . as_ptr () as * const c_char) ; table . environment_set_ssr = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssr\0" . as_ptr () as * const c_char) ; table . environment_set_tonemap = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_tonemap\0" . as_ptr () as * const c_char) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . force_draw = (gd_api . godot_method_bind_get_method) (class_name , "force_draw\0" . as_ptr () as * const c_char) ; table . force_sync = (gd_api . godot_method_bind_get_method) (class_name , "force_sync\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\0" . as_ptr () as * const c_char) ; table . get_test_cube = (gd_api . godot_method_bind_get_method) (class_name , "get_test_cube\0" . as_ptr () as * const c_char) ; table . get_test_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_test_texture\0" . as_ptr () as * const c_char) ; table . get_video_adapter_name = (gd_api . godot_method_bind_get_method) (class_name , "get_video_adapter_name\0" . as_ptr () as * const c_char) ; table . get_video_adapter_vendor = (gd_api . godot_method_bind_get_method) (class_name , "get_video_adapter_vendor\0" . as_ptr () as * const c_char) ; table . get_white_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_white_texture\0" . as_ptr () as * const c_char) ; table . gi_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_create\0" . as_ptr () as * const c_char) ; table . gi_probe_get_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_bounds\0" . as_ptr () as * const c_char) ; table . gi_probe_get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_cell_size\0" . as_ptr () as * const c_char) ; table . gi_probe_get_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_dynamic_data\0" . as_ptr () as * const c_char) ; table . gi_probe_get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_dynamic_range\0" . as_ptr () as * const c_char) ; table . gi_probe_get_energy = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_energy\0" . as_ptr () as * const c_char) ; table . gi_probe_get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_normal_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_propagation\0" . as_ptr () as * const c_char) ; table . gi_probe_get_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_to_cell_xform\0" . as_ptr () as * const c_char) ; table . gi_probe_is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_is_compressed\0" . as_ptr () as * const c_char) ; table . gi_probe_is_interior = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_is_interior\0" . as_ptr () as * const c_char) ; table . gi_probe_set_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_bounds\0" . as_ptr () as * const c_char) ; table . gi_probe_set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_cell_size\0" . as_ptr () as * const c_char) ; table . gi_probe_set_compress = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_compress\0" . as_ptr () as * const c_char) ; table . gi_probe_set_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_dynamic_data\0" . as_ptr () as * const c_char) ; table . gi_probe_set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_dynamic_range\0" . as_ptr () as * const c_char) ; table . gi_probe_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_energy\0" . as_ptr () as * const c_char) ; table . gi_probe_set_interior = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_interior\0" . as_ptr () as * const c_char) ; table . gi_probe_set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_normal_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_propagation\0" . as_ptr () as * const c_char) ; table . gi_probe_set_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_to_cell_xform\0" . as_ptr () as * const c_char) ; table . has_changed = (gd_api . godot_method_bind_get_method) (class_name , "has_changed\0" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\0" . as_ptr () as * const c_char) ; table . has_os_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_os_feature\0" . as_ptr () as * const c_char) ; table . immediate_begin = (gd_api . godot_method_bind_get_method) (class_name , "immediate_begin\0" . as_ptr () as * const c_char) ; table . immediate_clear = (gd_api . godot_method_bind_get_method) (class_name , "immediate_clear\0" . as_ptr () as * const c_char) ; table . immediate_color = (gd_api . godot_method_bind_get_method) (class_name , "immediate_color\0" . as_ptr () as * const c_char) ; table . immediate_create = (gd_api . godot_method_bind_get_method) (class_name , "immediate_create\0" . as_ptr () as * const c_char) ; table . immediate_end = (gd_api . godot_method_bind_get_method) (class_name , "immediate_end\0" . as_ptr () as * const c_char) ; table . immediate_get_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_get_material\0" . as_ptr () as * const c_char) ; table . immediate_normal = (gd_api . godot_method_bind_get_method) (class_name , "immediate_normal\0" . as_ptr () as * const c_char) ; table . immediate_set_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_set_material\0" . as_ptr () as * const c_char) ; table . immediate_tangent = (gd_api . godot_method_bind_get_method) (class_name , "immediate_tangent\0" . as_ptr () as * const c_char) ; table . immediate_uv = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv\0" . as_ptr () as * const c_char) ; table . immediate_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv2\0" . as_ptr () as * const c_char) ; table . immediate_vertex = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex\0" . as_ptr () as * const c_char) ; table . immediate_vertex_2d = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex_2d\0" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\0" . as_ptr () as * const c_char) ; table . instance_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "instance_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . instance_attach_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "instance_attach_skeleton\0" . as_ptr () as * const c_char) ; table . instance_create = (gd_api . godot_method_bind_get_method) (class_name , "instance_create\0" . as_ptr () as * const c_char) ; table . instance_create2 = (gd_api . godot_method_bind_get_method) (class_name , "instance_create2\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_as_instance_lod = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_as_instance_lod\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_draw_range = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_draw_range\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_flag\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_material_override = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_material_override\0" . as_ptr () as * const c_char) ; table . instance_set_base = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_base\0" . as_ptr () as * const c_char) ; table . instance_set_blend_shape_weight = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_blend_shape_weight\0" . as_ptr () as * const c_char) ; table . instance_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . instance_set_exterior = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_exterior\0" . as_ptr () as * const c_char) ; table . instance_set_extra_visibility_margin = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_extra_visibility_margin\0" . as_ptr () as * const c_char) ; table . instance_set_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_layer_mask\0" . as_ptr () as * const c_char) ; table . instance_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_scenario\0" . as_ptr () as * const c_char) ; table . instance_set_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_surface_material\0" . as_ptr () as * const c_char) ; table . instance_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_transform\0" . as_ptr () as * const c_char) ; table . instance_set_use_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_use_lightmap\0" . as_ptr () as * const c_char) ; table . instance_set_visible = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_visible\0" . as_ptr () as * const c_char) ; table . instances_cull_aabb = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_aabb\0" . as_ptr () as * const c_char) ; table . instances_cull_convex = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_convex\0" . as_ptr () as * const c_char) ; table . instances_cull_ray = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_ray\0" . as_ptr () as * const c_char) ; table . is_render_loop_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_render_loop_enabled\0" . as_ptr () as * const c_char) ; table . light_directional_set_blend_splits = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_blend_splits\0" . as_ptr () as * const c_char) ; table . light_directional_set_shadow_depth_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_shadow_depth_range_mode\0" . as_ptr () as * const c_char) ; table . light_directional_set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_shadow_mode\0" . as_ptr () as * const c_char) ; table . light_omni_set_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "light_omni_set_shadow_detail\0" . as_ptr () as * const c_char) ; table . light_omni_set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_omni_set_shadow_mode\0" . as_ptr () as * const c_char) ; table . light_set_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_set_bake_mode\0" . as_ptr () as * const c_char) ; table . light_set_color = (gd_api . godot_method_bind_get_method) (class_name , "light_set_color\0" . as_ptr () as * const c_char) ; table . light_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "light_set_cull_mask\0" . as_ptr () as * const c_char) ; table . light_set_negative = (gd_api . godot_method_bind_get_method) (class_name , "light_set_negative\0" . as_ptr () as * const c_char) ; table . light_set_param = (gd_api . godot_method_bind_get_method) (class_name , "light_set_param\0" . as_ptr () as * const c_char) ; table . light_set_projector = (gd_api . godot_method_bind_get_method) (class_name , "light_set_projector\0" . as_ptr () as * const c_char) ; table . light_set_reverse_cull_face_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_set_reverse_cull_face_mode\0" . as_ptr () as * const c_char) ; table . light_set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "light_set_shadow\0" . as_ptr () as * const c_char) ; table . light_set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "light_set_shadow_color\0" . as_ptr () as * const c_char) ; table . light_set_use_gi = (gd_api . godot_method_bind_get_method) (class_name , "light_set_use_gi\0" . as_ptr () as * const c_char) ; table . lightmap_capture_create = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_create\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_bounds\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_energy = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_energy\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree_cell_subdiv\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree_cell_transform = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree_cell_transform\0" . as_ptr () as * const c_char) ; table . lightmap_capture_is_interior = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_is_interior\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_bounds\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_energy\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_interior = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_interior\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree_cell_subdiv\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree_cell_transform = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree_cell_transform\0" . as_ptr () as * const c_char) ; table . make_sphere_mesh = (gd_api . godot_method_bind_get_method) (class_name , "make_sphere_mesh\0" . as_ptr () as * const c_char) ; table . material_create = (gd_api . godot_method_bind_get_method) (class_name , "material_create\0" . as_ptr () as * const c_char) ; table . material_get_param = (gd_api . godot_method_bind_get_method) (class_name , "material_get_param\0" . as_ptr () as * const c_char) ; table . material_get_param_default = (gd_api . godot_method_bind_get_method) (class_name , "material_get_param_default\0" . as_ptr () as * const c_char) ; table . material_get_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_get_shader\0" . as_ptr () as * const c_char) ; table . material_set_line_width = (gd_api . godot_method_bind_get_method) (class_name , "material_set_line_width\0" . as_ptr () as * const c_char) ; table . material_set_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "material_set_next_pass\0" . as_ptr () as * const c_char) ; table . material_set_param = (gd_api . godot_method_bind_get_method) (class_name , "material_set_param\0" . as_ptr () as * const c_char) ; table . material_set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "material_set_render_priority\0" . as_ptr () as * const c_char) ; table . material_set_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_set_shader\0" . as_ptr () as * const c_char) ; table . mesh_add_surface_from_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_add_surface_from_arrays\0" . as_ptr () as * const c_char) ; table . mesh_clear = (gd_api . godot_method_bind_get_method) (class_name , "mesh_clear\0" . as_ptr () as * const c_char) ; table . mesh_create = (gd_api . godot_method_bind_get_method) (class_name , "mesh_create\0" . as_ptr () as * const c_char) ; table . mesh_get_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_blend_shape_count\0" . as_ptr () as * const c_char) ; table . mesh_get_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . mesh_get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_custom_aabb\0" . as_ptr () as * const c_char) ; table . mesh_get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_surface_count\0" . as_ptr () as * const c_char) ; table . mesh_remove_surface = (gd_api . godot_method_bind_get_method) (class_name , "mesh_remove_surface\0" . as_ptr () as * const c_char) ; table . mesh_set_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_blend_shape_count\0" . as_ptr () as * const c_char) ; table . mesh_set_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . mesh_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array_index_len = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array_index_len\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array_len = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array_len\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_arrays\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_blend_shape_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_blend_shape_arrays\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format_offset = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format_offset\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format_stride = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format_stride\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_index_array = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_index_array\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_material\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_primitive_type = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_primitive_type\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_skeleton_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_skeleton_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_set_material\0" . as_ptr () as * const c_char) ; table . mesh_surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_update_region\0" . as_ptr () as * const c_char) ; table . multimesh_allocate = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_allocate\0" . as_ptr () as * const c_char) ; table . multimesh_create = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_create\0" . as_ptr () as * const c_char) ; table . multimesh_get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_aabb\0" . as_ptr () as * const c_char) ; table . multimesh_get_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_instance_count\0" . as_ptr () as * const c_char) ; table . multimesh_get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_mesh\0" . as_ptr () as * const c_char) ; table . multimesh_get_visible_instances = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_visible_instances\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_color = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_color\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_custom_data\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_transform\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_transform_2d\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_color = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_color\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_custom_data\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_transform\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_transform_2d\0" . as_ptr () as * const c_char) ; table . multimesh_set_as_bulk_array = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_as_bulk_array\0" . as_ptr () as * const c_char) ; table . multimesh_set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_mesh\0" . as_ptr () as * const c_char) ; table . multimesh_set_visible_instances = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_visible_instances\0" . as_ptr () as * const c_char) ; table . omni_light_create = (gd_api . godot_method_bind_get_method) (class_name , "omni_light_create\0" . as_ptr () as * const c_char) ; table . particles_create = (gd_api . godot_method_bind_get_method) (class_name , "particles_create\0" . as_ptr () as * const c_char) ; table . particles_get_current_aabb = (gd_api . godot_method_bind_get_method) (class_name , "particles_get_current_aabb\0" . as_ptr () as * const c_char) ; table . particles_get_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_get_emitting\0" . as_ptr () as * const c_char) ; table . particles_is_inactive = (gd_api . godot_method_bind_get_method) (class_name , "particles_is_inactive\0" . as_ptr () as * const c_char) ; table . particles_request_process = (gd_api . godot_method_bind_get_method) (class_name , "particles_request_process\0" . as_ptr () as * const c_char) ; table . particles_restart = (gd_api . godot_method_bind_get_method) (class_name , "particles_restart\0" . as_ptr () as * const c_char) ; table . particles_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_amount\0" . as_ptr () as * const c_char) ; table . particles_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . particles_set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_order\0" . as_ptr () as * const c_char) ; table . particles_set_draw_pass_mesh = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_pass_mesh\0" . as_ptr () as * const c_char) ; table . particles_set_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_passes\0" . as_ptr () as * const c_char) ; table . particles_set_emission_transform = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_emission_transform\0" . as_ptr () as * const c_char) ; table . particles_set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_emitting\0" . as_ptr () as * const c_char) ; table . particles_set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . particles_set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_fixed_fps\0" . as_ptr () as * const c_char) ; table . particles_set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_fractional_delta\0" . as_ptr () as * const c_char) ; table . particles_set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_lifetime\0" . as_ptr () as * const c_char) ; table . particles_set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_one_shot\0" . as_ptr () as * const c_char) ; table . particles_set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_pre_process_time\0" . as_ptr () as * const c_char) ; table . particles_set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_process_material\0" . as_ptr () as * const c_char) ; table . particles_set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . particles_set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_speed_scale\0" . as_ptr () as * const c_char) ; table . particles_set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . reflection_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_create\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_as_interior = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_as_interior\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_cull_mask\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_enable_box_projection = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_enable_box_projection\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_enable_shadows = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_enable_shadows\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_extents = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_extents\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_intensity = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_intensity\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient_energy = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient_energy\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient_probe_contribution = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient_probe_contribution\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_max_distance\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_origin_offset\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_update_mode\0" . as_ptr () as * const c_char) ; table . request_frame_drawn_callback = (gd_api . godot_method_bind_get_method) (class_name , "request_frame_drawn_callback\0" . as_ptr () as * const c_char) ; table . scenario_create = (gd_api . godot_method_bind_get_method) (class_name , "scenario_create\0" . as_ptr () as * const c_char) ; table . scenario_set_debug = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_debug\0" . as_ptr () as * const c_char) ; table . scenario_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_environment\0" . as_ptr () as * const c_char) ; table . scenario_set_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_fallback_environment\0" . as_ptr () as * const c_char) ; table . scenario_set_reflection_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_reflection_atlas_size\0" . as_ptr () as * const c_char) ; table . set_boot_image = (gd_api . godot_method_bind_get_method) (class_name , "set_boot_image\0" . as_ptr () as * const c_char) ; table . set_debug_generate_wireframes = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_generate_wireframes\0" . as_ptr () as * const c_char) ; table . set_default_clear_color = (gd_api . godot_method_bind_get_method) (class_name , "set_default_clear_color\0" . as_ptr () as * const c_char) ; table . set_render_loop_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_render_loop_enabled\0" . as_ptr () as * const c_char) ; table . set_shader_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_time_scale\0" . as_ptr () as * const c_char) ; table . shader_create = (gd_api . godot_method_bind_get_method) (class_name , "shader_create\0" . as_ptr () as * const c_char) ; table . shader_get_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_code\0" . as_ptr () as * const c_char) ; table . shader_get_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_default_texture_param\0" . as_ptr () as * const c_char) ; table . shader_get_param_list = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_param_list\0" . as_ptr () as * const c_char) ; table . shader_set_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_set_code\0" . as_ptr () as * const c_char) ; table . shader_set_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "shader_set_default_texture_param\0" . as_ptr () as * const c_char) ; table . skeleton_allocate = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_allocate\0" . as_ptr () as * const c_char) ; table . skeleton_bone_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_get_transform\0" . as_ptr () as * const c_char) ; table . skeleton_bone_get_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_get_transform_2d\0" . as_ptr () as * const c_char) ; table . skeleton_bone_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_set_transform\0" . as_ptr () as * const c_char) ; table . skeleton_bone_set_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_set_transform_2d\0" . as_ptr () as * const c_char) ; table . skeleton_create = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_create\0" . as_ptr () as * const c_char) ; table . skeleton_get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_get_bone_count\0" . as_ptr () as * const c_char) ; table . sky_create = (gd_api . godot_method_bind_get_method) (class_name , "sky_create\0" . as_ptr () as * const c_char) ; table . sky_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "sky_set_texture\0" . as_ptr () as * const c_char) ; table . spot_light_create = (gd_api . godot_method_bind_get_method) (class_name , "spot_light_create\0" . as_ptr () as * const c_char) ; table . sync = (gd_api . godot_method_bind_get_method) (class_name , "sync\0" . as_ptr () as * const c_char) ; table . texture_allocate = (gd_api . godot_method_bind_get_method) (class_name , "texture_allocate\0" . as_ptr () as * const c_char) ; table . texture_bind = (gd_api . godot_method_bind_get_method) (class_name , "texture_bind\0" . as_ptr () as * const c_char) ; table . texture_create = (gd_api . godot_method_bind_get_method) (class_name , "texture_create\0" . as_ptr () as * const c_char) ; table . texture_create_from_image = (gd_api . godot_method_bind_get_method) (class_name , "texture_create_from_image\0" . as_ptr () as * const c_char) ; table . texture_debug_usage = (gd_api . godot_method_bind_get_method) (class_name , "texture_debug_usage\0" . as_ptr () as * const c_char) ; table . texture_get_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_data\0" . as_ptr () as * const c_char) ; table . texture_get_depth = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_depth\0" . as_ptr () as * const c_char) ; table . texture_get_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_flags\0" . as_ptr () as * const c_char) ; table . texture_get_format = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_format\0" . as_ptr () as * const c_char) ; table . texture_get_height = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_height\0" . as_ptr () as * const c_char) ; table . texture_get_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_path\0" . as_ptr () as * const c_char) ; table . texture_get_texid = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_texid\0" . as_ptr () as * const c_char) ; table . texture_get_type = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_type\0" . as_ptr () as * const c_char) ; table . texture_get_width = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_width\0" . as_ptr () as * const c_char) ; table . texture_set_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_data\0" . as_ptr () as * const c_char) ; table . texture_set_data_partial = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_data_partial\0" . as_ptr () as * const c_char) ; table . texture_set_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_flags\0" . as_ptr () as * const c_char) ; table . texture_set_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_path\0" . as_ptr () as * const c_char) ; table . texture_set_shrink_all_x2_on_set_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_shrink_all_x2_on_set_data\0" . as_ptr () as * const c_char) ; table . texture_set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_size_override\0" . as_ptr () as * const c_char) ; table . textures_keep_original = (gd_api . godot_method_bind_get_method) (class_name , "textures_keep_original\0" . as_ptr () as * const c_char) ; table . viewport_attach_camera = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_camera\0" . as_ptr () as * const c_char) ; table . viewport_attach_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_canvas\0" . as_ptr () as * const c_char) ; table . viewport_attach_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_to_screen\0" . as_ptr () as * const c_char) ; table . viewport_create = (gd_api . godot_method_bind_get_method) (class_name , "viewport_create\0" . as_ptr () as * const c_char) ; table . viewport_detach = (gd_api . godot_method_bind_get_method) (class_name , "viewport_detach\0" . as_ptr () as * const c_char) ; table . viewport_get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "viewport_get_render_info\0" . as_ptr () as * const c_char) ; table . viewport_get_texture = (gd_api . godot_method_bind_get_method) (class_name , "viewport_get_texture\0" . as_ptr () as * const c_char) ; table . viewport_remove_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_remove_canvas\0" . as_ptr () as * const c_char) ; table . viewport_set_active = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_active\0" . as_ptr () as * const c_char) ; table . viewport_set_canvas_stacking = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_canvas_stacking\0" . as_ptr () as * const c_char) ; table . viewport_set_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_canvas_transform\0" . as_ptr () as * const c_char) ; table . viewport_set_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_clear_mode\0" . as_ptr () as * const c_char) ; table . viewport_set_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_debug_draw\0" . as_ptr () as * const c_char) ; table . viewport_set_disable_3d = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_disable_3d\0" . as_ptr () as * const c_char) ; table . viewport_set_disable_environment = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_disable_environment\0" . as_ptr () as * const c_char) ; table . viewport_set_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . viewport_set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hdr\0" . as_ptr () as * const c_char) ; table . viewport_set_hide_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hide_canvas\0" . as_ptr () as * const c_char) ; table . viewport_set_hide_scenario = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hide_scenario\0" . as_ptr () as * const c_char) ; table . viewport_set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_msaa\0" . as_ptr () as * const c_char) ; table . viewport_set_parent_viewport = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_parent_viewport\0" . as_ptr () as * const c_char) ; table . viewport_set_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . viewport_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_scenario\0" . as_ptr () as * const c_char) ; table . viewport_set_shadow_atlas_quadrant_subdivision = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_shadow_atlas_quadrant_subdivision\0" . as_ptr () as * const c_char) ; table . viewport_set_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . viewport_set_size = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_size\0" . as_ptr () as * const c_char) ; table . viewport_set_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_transparent_background\0" . as_ptr () as * const c_char) ; table . viewport_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_update_mode\0" . as_ptr () as * const c_char) ; table . viewport_set_usage = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_usage\0" . as_ptr () as * const c_char) ; table . viewport_set_use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_arvr\0" . as_ptr () as * const c_char) ; table . viewport_set_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_debanding\0" . as_ptr () as * const c_char) ; table . viewport_set_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_fxaa\0" . as_ptr () as * const c_char) ; table . viewport_set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_vflip\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:628:15877 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:634:3393 [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 = "`core class StreamPeerGDNative` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_streampeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerGDNative inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerGDNative { this : RawObject < Self > , } impl StreamPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerGDNative { } unsafe impl GodotObject for StreamPeerGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerGDNative" } } impl std :: ops :: Deref for StreamPeerGDNative { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerGDNative { } impl Instanciable for StreamPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StreamPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl StreamPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerGDNativeMethodTable = StreamPeerGDNativeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StreamPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerGDNative\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:640:3568 [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 SkinReference` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_skinreference.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSkinReference inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SkinReference { this : RawObject < Self > , } impl SkinReference { # [doc = ""] # [doc = ""] # [inline] pub fn get_skeleton (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinReferenceMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skin (& self) -> Option < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinReferenceMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skin :: Skin , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for SkinReference { } unsafe impl GodotObject for SkinReference { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SkinReference" } } impl std :: ops :: Deref for SkinReference { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkinReference { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SkinReference { } unsafe impl SubClass < crate :: generated :: object :: Object > for SkinReference { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkinReferenceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_skeleton : * mut sys :: godot_method_bind , pub get_skin : * mut sys :: godot_method_bind } impl SkinReferenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkinReferenceMethodTable = SkinReferenceMethodTable { class_constructor : None , get_skeleton : 0 as * mut sys :: godot_method_bind , get_skin : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SkinReferenceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SkinReference\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:646:16499 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:652:5460 [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 VisualShaderNodeExpression` inherits `VisualShaderNodeGroupBase` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeExpression inherits methods from:\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeExpression { this : RawObject < Self > , } impl VisualShaderNodeExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (`vertex`, `fragment`, or `light`), and thus cannot be used to declare functions, varyings, uniforms, or global constants."] # [doc = ""] # [inline] pub fn expression (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeExpressionMethodTable :: get (get_api ()) . get_expression ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (`vertex`, `fragment`, or `light`), and thus cannot be used to declare functions, varyings, uniforms, or global constants."] # [doc = ""] # [inline] pub fn set_expression (& self , expression : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeExpressionMethodTable :: get (get_api ()) . set_expression ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , expression . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeExpression { } unsafe impl GodotObject for VisualShaderNodeExpression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeExpression" } } impl std :: ops :: Deref for VisualShaderNodeExpression { type Target = crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeExpression { } impl Instanciable for VisualShaderNodeExpression { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_expression : * mut sys :: godot_method_bind , pub set_expression : * mut sys :: godot_method_bind } impl VisualShaderNodeExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeExpressionMethodTable = VisualShaderNodeExpressionMethodTable { class_constructor : None , get_expression : 0 as * mut sys :: godot_method_bind , set_expression : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_expression = (gd_api . godot_method_bind_get_method) (class_name , "get_expression\0" . as_ptr () as * const c_char) ; table . set_expression = (gd_api . godot_method_bind_get_method) (class_name , "set_expression\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:658:4707 [INFO] [stdout] | [INFO] [stdout] 658 | ...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] 658 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:664:4152 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:670:7833 [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 VisualShaderNodeScalarFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalarfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarFunc { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const SIN : Function = Function (0i64) ; pub const COS : Function = Function (1i64) ; pub const TAN : Function = Function (2i64) ; pub const ASIN : Function = Function (3i64) ; pub const ACOS : Function = Function (4i64) ; pub const ATAN : Function = Function (5i64) ; pub const SINH : Function = Function (6i64) ; pub const COSH : Function = Function (7i64) ; pub const TANH : Function = Function (8i64) ; pub const LOG : Function = Function (9i64) ; pub const EXP : Function = Function (10i64) ; pub const SQRT : Function = Function (11i64) ; pub const ABS : Function = Function (12i64) ; pub const SIGN : Function = Function (13i64) ; pub const FLOOR : Function = Function (14i64) ; pub const ROUND : Function = Function (15i64) ; pub const CEIL : Function = Function (16i64) ; pub const FRAC : Function = Function (17i64) ; pub const SATURATE : Function = Function (18i64) ; pub const NEGATE : Function = Function (19i64) ; pub const ACOSH : Function = Function (20i64) ; pub const ASINH : Function = Function (21i64) ; pub const ATANH : Function = Function (22i64) ; pub const DEGREES : Function = Function (23i64) ; pub const EXP2 : Function = Function (24i64) ; pub const INVERSE_SQRT : Function = Function (25i64) ; pub const LOG2 : Function = Function (26i64) ; pub const RADIANS : Function = Function (27i64) ; pub const RECIPROCAL : Function = Function (28i64) ; pub const ROUNDEVEN : Function = Function (29i64) ; pub const TRUNC : Function = Function (30i64) ; pub const ONEMINUS : Function = Function (31i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarFunc { pub const FUNC_ABS : i64 = 12i64 ; pub const FUNC_ACOS : i64 = 4i64 ; pub const FUNC_ACOSH : i64 = 20i64 ; pub const FUNC_ASIN : i64 = 3i64 ; pub const FUNC_ASINH : i64 = 21i64 ; pub const FUNC_ATAN : i64 = 5i64 ; pub const FUNC_ATANH : i64 = 22i64 ; pub const FUNC_CEIL : i64 = 16i64 ; pub const FUNC_COS : i64 = 1i64 ; pub const FUNC_COSH : i64 = 7i64 ; pub const FUNC_DEGREES : i64 = 23i64 ; pub const FUNC_EXP : i64 = 10i64 ; pub const FUNC_EXP2 : i64 = 24i64 ; pub const FUNC_FLOOR : i64 = 14i64 ; pub const FUNC_FRAC : i64 = 17i64 ; pub const FUNC_INVERSE_SQRT : i64 = 25i64 ; pub const FUNC_LOG : i64 = 9i64 ; pub const FUNC_LOG2 : i64 = 26i64 ; pub const FUNC_NEGATE : i64 = 19i64 ; pub const FUNC_ONEMINUS : i64 = 31i64 ; pub const FUNC_RADIANS : i64 = 27i64 ; pub const FUNC_RECIPROCAL : i64 = 28i64 ; pub const FUNC_ROUND : i64 = 15i64 ; pub const FUNC_ROUNDEVEN : i64 = 29i64 ; pub const FUNC_SATURATE : i64 = 18i64 ; pub const FUNC_SIGN : i64 = 13i64 ; pub const FUNC_SIN : i64 = 0i64 ; pub const FUNC_SINH : i64 = 6i64 ; pub const FUNC_SQRT : i64 = 11i64 ; pub const FUNC_TAN : i64 = 2i64 ; pub const FUNC_TANH : i64 = 8i64 ; pub const FUNC_TRUNC : i64 = 30i64 ; } impl VisualShaderNodeScalarFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_scalar_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_scalar_func :: Function (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarFunc { } unsafe impl GodotObject for VisualShaderNodeScalarFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarFunc" } } impl std :: ops :: Deref for VisualShaderNodeScalarFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarFunc { } impl Instanciable for VisualShaderNodeScalarFunc { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarFuncMethodTable = VisualShaderNodeScalarFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:676:11175 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:682:18993 [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 AnimationNodeBlendSpace2D` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblendspace2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendSpace2D inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendSpace2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const INTERPOLATED : BlendMode = BlendMode (0i64) ; pub const DISCRETE : BlendMode = BlendMode (1i64) ; pub const DISCRETE_CARRY : BlendMode = BlendMode (2i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendSpace2D { pub const BLEND_MODE_DISCRETE : i64 = 1i64 ; pub const BLEND_MODE_DISCRETE_CARRY : i64 = 2i64 ; pub const BLEND_MODE_INTERPOLATED : i64 = 0i64 ; } impl AnimationNodeBlendSpace2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendSpace2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new point that represents a `node` at the position set by `pos`. You can insert it at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_blend_point (& self , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode > , pos : Vector2 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . add_blend_point ; let ret = crate :: icalls :: icallptr_void_obj_vec2_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos , at_index) ; } } # [doc = "Creates a new triangle using three points `x`, `y`, and `z`. Triangles can overlap. You can insert the triangle at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_triangle (& self , x : i64 , y : i64 , z : i64 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . add_triangle ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z , at_index) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]."] # [doc = ""] # [inline] pub fn auto_triangles (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_auto_triangles ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls the interpolation between animations. See [enum BlendMode] constants."] # [doc = ""] # [inline] pub fn blend_mode (& self) -> crate :: generated :: animation_node_blend_space_2d :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: animation_node_blend_space_2d :: BlendMode (ret) } } # [doc = "Returns the number of points in the blend space."] # [doc = ""] # [inline] pub fn get_blend_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AnimationRootNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the position of the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_position (& self , point : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn max_space (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_max_space ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn min_space (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_min_space ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Position increment to snap to when moving a point."] # [doc = ""] # [inline] pub fn snap (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the number of triangles in the blend space."] # [doc = ""] # [inline] pub fn get_triangle_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_triangle_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position of the point at index `point` in the triangle of index `triangle`."] # [doc = ""] # [inline] pub fn get_triangle_point (& self , triangle : i64 , point : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_triangle_point ; let ret = crate :: icalls :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , triangle , point) ; ret as _ } } # [doc = "Name of the blend space's X axis."] # [doc = ""] # [inline] pub fn x_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_x_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Name of the blend space's Y axis."] # [doc = ""] # [inline] pub fn y_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_y_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Removes the point at index `point` from the blend space."] # [doc = ""] # [inline] pub fn remove_blend_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . remove_blend_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Removes the triangle at index `triangle` from the blend space."] # [doc = ""] # [inline] pub fn remove_triangle (& self , triangle : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . remove_triangle ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , triangle) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]."] # [doc = ""] # [inline] pub fn set_auto_triangles (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_auto_triangles ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Controls the interpolation between animations. See [enum BlendMode] constants."] # [doc = ""] # [inline] pub fn set_blend_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Changes the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , point , node . as_arg_ptr ()) ; } } # [doc = "Updates the position of the point at index `point` on the blend axis."] # [doc = ""] # [inline] pub fn set_blend_point_position (& self , point : i64 , pos : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_point_position ; let ret = crate :: icalls :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , point , pos) ; } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn set_max_space (& self , max_space : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_max_space ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , max_space) ; } } # [doc = "The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn set_min_space (& self , min_space : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_min_space ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , min_space) ; } } # [doc = "Position increment to snap to when moving a point."] # [doc = ""] # [inline] pub fn set_snap (& self , snap : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , snap) ; } } # [doc = "Name of the blend space's X axis."] # [doc = ""] # [inline] pub fn set_x_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_x_label ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Name of the blend space's Y axis."] # [doc = ""] # [inline] pub fn set_y_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_y_label ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendSpace2D { } unsafe impl GodotObject for AnimationNodeBlendSpace2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace2D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace2D { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendSpace2D { } impl Instanciable for AnimationNodeBlendSpace2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlendSpace2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendSpace2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_point : * mut sys :: godot_method_bind , pub add_triangle : * mut sys :: godot_method_bind , pub get_auto_triangles : * mut sys :: godot_method_bind , pub get_blend_mode : * mut sys :: godot_method_bind , pub get_blend_point_count : * mut sys :: godot_method_bind , pub get_blend_point_node : * mut sys :: godot_method_bind , pub get_blend_point_position : * mut sys :: godot_method_bind , pub get_max_space : * mut sys :: godot_method_bind , pub get_min_space : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub get_triangle_count : * mut sys :: godot_method_bind , pub get_triangle_point : * mut sys :: godot_method_bind , pub get_x_label : * mut sys :: godot_method_bind , pub get_y_label : * mut sys :: godot_method_bind , pub remove_blend_point : * mut sys :: godot_method_bind , pub remove_triangle : * mut sys :: godot_method_bind , pub set_auto_triangles : * mut sys :: godot_method_bind , pub set_blend_mode : * mut sys :: godot_method_bind , pub set_blend_point_node : * mut sys :: godot_method_bind , pub set_blend_point_position : * mut sys :: godot_method_bind , pub set_max_space : * mut sys :: godot_method_bind , pub set_min_space : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_x_label : * mut sys :: godot_method_bind , pub set_y_label : * mut sys :: godot_method_bind } impl AnimationNodeBlendSpace2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendSpace2DMethodTable = AnimationNodeBlendSpace2DMethodTable { class_constructor : None , add_blend_point : 0 as * mut sys :: godot_method_bind , add_triangle : 0 as * mut sys :: godot_method_bind , get_auto_triangles : 0 as * mut sys :: godot_method_bind , get_blend_mode : 0 as * mut sys :: godot_method_bind , get_blend_point_count : 0 as * mut sys :: godot_method_bind , get_blend_point_node : 0 as * mut sys :: godot_method_bind , get_blend_point_position : 0 as * mut sys :: godot_method_bind , get_max_space : 0 as * mut sys :: godot_method_bind , get_min_space : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , get_triangle_count : 0 as * mut sys :: godot_method_bind , get_triangle_point : 0 as * mut sys :: godot_method_bind , get_x_label : 0 as * mut sys :: godot_method_bind , get_y_label : 0 as * mut sys :: godot_method_bind , remove_blend_point : 0 as * mut sys :: godot_method_bind , remove_triangle : 0 as * mut sys :: godot_method_bind , set_auto_triangles : 0 as * mut sys :: godot_method_bind , set_blend_mode : 0 as * mut sys :: godot_method_bind , set_blend_point_node : 0 as * mut sys :: godot_method_bind , set_blend_point_position : 0 as * mut sys :: godot_method_bind , set_max_space : 0 as * mut sys :: godot_method_bind , set_min_space : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_x_label : 0 as * mut sys :: godot_method_bind , set_y_label : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeBlendSpace2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendSpace2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . add_triangle = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle\0" . as_ptr () as * const c_char) ; table . get_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "get_auto_triangles\0" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_triangle_count = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_count\0" . as_ptr () as * const c_char) ; table . get_triangle_point = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_point\0" . as_ptr () as * const c_char) ; table . get_x_label = (gd_api . godot_method_bind_get_method) (class_name , "get_x_label\0" . as_ptr () as * const c_char) ; table . get_y_label = (gd_api . godot_method_bind_get_method) (class_name , "get_y_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . remove_triangle = (gd_api . godot_method_bind_get_method) (class_name , "remove_triangle\0" . as_ptr () as * const c_char) ; table . set_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_triangles\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_x_label = (gd_api . godot_method_bind_get_method) (class_name , "set_x_label\0" . as_ptr () as * const c_char) ; table . set_y_label = (gd_api . godot_method_bind_get_method) (class_name , "set_y_label\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:688:16095 [INFO] [stdout] | [INFO] [stdout] 688 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 688 | # [doc = "`core class AudioEffectDelay` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectdelay.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectDelay inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectDelay { this : RawObject < Self > , } impl AudioEffectDelay { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectDelayMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Feedback delay time in milliseconds."] # [doc = ""] # [inline] pub fn feedback_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_delay_ms ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn feedback_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_level_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal."] # [doc = ""] # [inline] pub fn feedback_lowpass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_lowpass ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "`tap1` delay time in milliseconds."] # [doc = ""] # [inline] pub fn tap1_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_delay_ms ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn tap1_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_level_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pan position for `tap1`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn tap1_pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_pan ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "**Tap2** delay time in milliseconds."] # [doc = ""] # [inline] pub fn tap2_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_delay_ms ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sound level for `tap2`."] # [doc = ""] # [inline] pub fn tap2_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_level_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pan position for `tap2`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn tap2_pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_pan ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, feedback is enabled."] # [doc = ""] # [inline] pub fn is_feedback_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_feedback_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, `tap1` will be enabled."] # [doc = ""] # [inline] pub fn is_tap1_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_tap1_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, `tap2` will be enabled."] # [doc = ""] # [inline] pub fn is_tap2_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_tap2_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_dry (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_dry ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, feedback is enabled."] # [doc = ""] # [inline] pub fn set_feedback_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Feedback delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_feedback_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_delay_ms ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn set_feedback_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_level_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal."] # [doc = ""] # [inline] pub fn set_feedback_lowpass (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_lowpass ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, `tap1` will be enabled."] # [doc = ""] # [inline] pub fn set_tap1_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "`tap1` delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_tap1_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_delay_ms ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn set_tap1_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_level_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Pan position for `tap1`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_tap1_pan (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_pan ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "If `true`, `tap2` will be enabled."] # [doc = ""] # [inline] pub fn set_tap2_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "**Tap2** delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_tap2_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_delay_ms ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Sound level for `tap2`."] # [doc = ""] # [inline] pub fn set_tap2_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_level_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Pan position for `tap2`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_tap2_pan (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_pan ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectDelay { } unsafe impl GodotObject for AudioEffectDelay { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectDelay" } } impl std :: ops :: Deref for AudioEffectDelay { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectDelay { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectDelay { } impl Instanciable for AudioEffectDelay { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectDelay :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectDelayMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_dry : * mut sys :: godot_method_bind , pub get_feedback_delay_ms : * mut sys :: godot_method_bind , pub get_feedback_level_db : * mut sys :: godot_method_bind , pub get_feedback_lowpass : * mut sys :: godot_method_bind , pub get_tap1_delay_ms : * mut sys :: godot_method_bind , pub get_tap1_level_db : * mut sys :: godot_method_bind , pub get_tap1_pan : * mut sys :: godot_method_bind , pub get_tap2_delay_ms : * mut sys :: godot_method_bind , pub get_tap2_level_db : * mut sys :: godot_method_bind , pub get_tap2_pan : * mut sys :: godot_method_bind , pub is_feedback_active : * mut sys :: godot_method_bind , pub is_tap1_active : * mut sys :: godot_method_bind , pub is_tap2_active : * mut sys :: godot_method_bind , pub set_dry : * mut sys :: godot_method_bind , pub set_feedback_active : * mut sys :: godot_method_bind , pub set_feedback_delay_ms : * mut sys :: godot_method_bind , pub set_feedback_level_db : * mut sys :: godot_method_bind , pub set_feedback_lowpass : * mut sys :: godot_method_bind , pub set_tap1_active : * mut sys :: godot_method_bind , pub set_tap1_delay_ms : * mut sys :: godot_method_bind , pub set_tap1_level_db : * mut sys :: godot_method_bind , pub set_tap1_pan : * mut sys :: godot_method_bind , pub set_tap2_active : * mut sys :: godot_method_bind , pub set_tap2_delay_ms : * mut sys :: godot_method_bind , pub set_tap2_level_db : * mut sys :: godot_method_bind , pub set_tap2_pan : * mut sys :: godot_method_bind } impl AudioEffectDelayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectDelayMethodTable = AudioEffectDelayMethodTable { class_constructor : None , get_dry : 0 as * mut sys :: godot_method_bind , get_feedback_delay_ms : 0 as * mut sys :: godot_method_bind , get_feedback_level_db : 0 as * mut sys :: godot_method_bind , get_feedback_lowpass : 0 as * mut sys :: godot_method_bind , get_tap1_delay_ms : 0 as * mut sys :: godot_method_bind , get_tap1_level_db : 0 as * mut sys :: godot_method_bind , get_tap1_pan : 0 as * mut sys :: godot_method_bind , get_tap2_delay_ms : 0 as * mut sys :: godot_method_bind , get_tap2_level_db : 0 as * mut sys :: godot_method_bind , get_tap2_pan : 0 as * mut sys :: godot_method_bind , is_feedback_active : 0 as * mut sys :: godot_method_bind , is_tap1_active : 0 as * mut sys :: godot_method_bind , is_tap2_active : 0 as * mut sys :: godot_method_bind , set_dry : 0 as * mut sys :: godot_method_bind , set_feedback_active : 0 as * mut sys :: godot_method_bind , set_feedback_delay_ms : 0 as * mut sys :: godot_method_bind , set_feedback_level_db : 0 as * mut sys :: godot_method_bind , set_feedback_lowpass : 0 as * mut sys :: godot_method_bind , set_tap1_active : 0 as * mut sys :: godot_method_bind , set_tap1_delay_ms : 0 as * mut sys :: godot_method_bind , set_tap1_level_db : 0 as * mut sys :: godot_method_bind , set_tap1_pan : 0 as * mut sys :: godot_method_bind , set_tap2_active : 0 as * mut sys :: godot_method_bind , set_tap2_delay_ms : 0 as * mut sys :: godot_method_bind , set_tap2_level_db : 0 as * mut sys :: godot_method_bind , set_tap2_pan : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectDelayMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectDelay\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . get_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_level_db\0" . as_ptr () as * const c_char) ; table . get_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . get_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_level_db\0" . as_ptr () as * const c_char) ; table . get_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_pan\0" . as_ptr () as * const c_char) ; table . get_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_level_db\0" . as_ptr () as * const c_char) ; table . get_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_pan\0" . as_ptr () as * const c_char) ; table . is_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "is_feedback_active\0" . as_ptr () as * const c_char) ; table . is_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap1_active\0" . as_ptr () as * const c_char) ; table . is_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap2_active\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_active\0" . as_ptr () as * const c_char) ; table . set_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . set_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_level_db\0" . as_ptr () as * const c_char) ; table . set_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . set_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_active\0" . as_ptr () as * const c_char) ; table . set_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_level_db\0" . as_ptr () as * const c_char) ; table . set_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_pan\0" . as_ptr () as * const c_char) ; table . set_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_active\0" . as_ptr () as * const c_char) ; table . set_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_level_db\0" . as_ptr () as * const c_char) ; table . set_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_pan\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:694:7960 [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 HingeJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_hingejoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`HingeJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHingeJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HingeJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flag (pub i64) ; impl Flag { pub const USE_LIMIT : Flag = Flag (0i64) ; pub const ENABLE_MOTOR : Flag = Flag (1i64) ; pub const MAX : Flag = Flag (2i64) ; } impl From < i64 > for Flag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flag > for i64 { # [inline] fn from (v : Flag) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const BIAS : Param = Param (0i64) ; pub const LIMIT_UPPER : Param = Param (1i64) ; pub const LIMIT_LOWER : Param = Param (2i64) ; pub const LIMIT_BIAS : Param = Param (3i64) ; pub const LIMIT_SOFTNESS : Param = Param (4i64) ; pub const LIMIT_RELAXATION : Param = Param (5i64) ; pub const MOTOR_TARGET_VELOCITY : Param = Param (6i64) ; pub const MOTOR_MAX_IMPULSE : Param = Param (7i64) ; pub const MAX : Param = Param (8i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HingeJoint { pub const FLAG_ENABLE_MOTOR : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const FLAG_USE_LIMIT : i64 = 0i64 ; pub const PARAM_BIAS : i64 = 0i64 ; pub const PARAM_LIMIT_BIAS : i64 = 3i64 ; pub const PARAM_LIMIT_LOWER : i64 = 2i64 ; pub const PARAM_LIMIT_RELAXATION : i64 = 5i64 ; pub const PARAM_LIMIT_SOFTNESS : i64 = 4i64 ; pub const PARAM_LIMIT_UPPER : i64 = 1i64 ; pub const PARAM_MAX : i64 = 8i64 ; pub const PARAM_MOTOR_MAX_IMPULSE : i64 = 7i64 ; pub const PARAM_MOTOR_TARGET_VELOCITY : i64 = 6i64 ; } impl HingeJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HingeJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "When activated, a motor turns the hinge."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "The speed with which the two bodies get pulled together when they move in different directions."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "When activated, a motor turns the hinge."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enabled) ; } } # [doc = "The speed with which the two bodies get pulled together when they move in different directions."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HingeJoint { } unsafe impl GodotObject for HingeJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HingeJoint" } } impl QueueFree for HingeJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HingeJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HingeJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for HingeJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for HingeJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for HingeJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for HingeJoint { } impl Instanciable for HingeJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { HingeJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HingeJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flag : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl HingeJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HingeJointMethodTable = HingeJointMethodTable { class_constructor : None , get_flag : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { HingeJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HingeJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:700:40072 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:706:7903 [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 AudioEffectFilter` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectFilter inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectFilter { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FilterDb (pub i64) ; impl FilterDb { pub const _6DB : FilterDb = FilterDb (0i64) ; pub const _12DB : FilterDb = FilterDb (1i64) ; pub const _18DB : FilterDb = FilterDb (2i64) ; pub const _24DB : FilterDb = FilterDb (3i64) ; } impl From < i64 > for FilterDb { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FilterDb > for i64 { # [inline] fn from (v : FilterDb) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectFilter { pub const FILTER_12DB : i64 = 1i64 ; pub const FILTER_18DB : i64 = 2i64 ; pub const FILTER_24DB : i64 = 3i64 ; pub const FILTER_6DB : i64 = 0i64 ; } impl AudioEffectFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Threshold frequency for the filter, in Hz."] # [doc = ""] # [inline] pub fn cutoff (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_cutoff ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn db (& self) -> crate :: generated :: audio_effect_filter :: FilterDb { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_db ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_effect_filter :: FilterDb (ret) } } # [doc = "Gain amount of the frequencies after the filter."] # [doc = ""] # [inline] pub fn gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_gain ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of boost in the frequency range near the cutoff frequency."] # [doc = ""] # [inline] pub fn resonance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_resonance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Threshold frequency for the filter, in Hz."] # [doc = ""] # [inline] pub fn set_cutoff (& self , freq : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_cutoff ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , freq) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_db (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_db ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Gain amount of the frequencies after the filter."] # [doc = ""] # [inline] pub fn set_gain (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_gain ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Amount of boost in the frequency range near the cutoff frequency."] # [doc = ""] # [inline] pub fn set_resonance (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_resonance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectFilter { } unsafe impl GodotObject for AudioEffectFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectFilter" } } impl std :: ops :: Deref for AudioEffectFilter { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectFilter { } impl Instanciable for AudioEffectFilter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cutoff : * mut sys :: godot_method_bind , pub get_db : * mut sys :: godot_method_bind , pub get_gain : * mut sys :: godot_method_bind , pub get_resonance : * mut sys :: godot_method_bind , pub set_cutoff : * mut sys :: godot_method_bind , pub set_db : * mut sys :: godot_method_bind , pub set_gain : * mut sys :: godot_method_bind , pub set_resonance : * mut sys :: godot_method_bind } impl AudioEffectFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectFilterMethodTable = AudioEffectFilterMethodTable { class_constructor : None , get_cutoff : 0 as * mut sys :: godot_method_bind , get_db : 0 as * mut sys :: godot_method_bind , get_gain : 0 as * mut sys :: godot_method_bind , get_resonance : 0 as * mut sys :: godot_method_bind , set_cutoff : 0 as * mut sys :: godot_method_bind , set_db : 0 as * mut sys :: godot_method_bind , set_gain : 0 as * mut sys :: godot_method_bind , set_resonance : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cutoff = (gd_api . godot_method_bind_get_method) (class_name , "get_cutoff\0" . as_ptr () as * const c_char) ; table . get_db = (gd_api . godot_method_bind_get_method) (class_name , "get_db\0" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\0" . as_ptr () as * const c_char) ; table . get_resonance = (gd_api . godot_method_bind_get_method) (class_name , "get_resonance\0" . as_ptr () as * const c_char) ; table . set_cutoff = (gd_api . godot_method_bind_get_method) (class_name , "set_cutoff\0" . as_ptr () as * const c_char) ; table . set_db = (gd_api . godot_method_bind_get_method) (class_name , "set_db\0" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\0" . as_ptr () as * const c_char) ; table . set_resonance = (gd_api . godot_method_bind_get_method) (class_name , "set_resonance\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:712:7943 [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 StyleBox` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_stylebox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBox inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBox { this : RawObject < Self > , } impl StyleBox { # [doc = "Draws this stylebox using a [CanvasItem] with given [RID].\nYou can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node."] # [doc = ""] # [inline] pub fn draw (& self , canvas_item : Rid , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_rid_rect2 (method_bind , self . this . sys () . as_ptr () , canvas_item , rect) ; } } # [doc = "Returns the size of this [StyleBox] without the margins."] # [doc = ""] # [inline] pub fn get_center_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_center_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment."] # [doc = ""] # [inline] pub fn get_current_item_drawn (& self) -> Option < Ref < crate :: generated :: canvas_item :: CanvasItem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_current_item_drawn ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: canvas_item :: CanvasItem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.\nRefer to [member content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn default_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns the content margin offset for the specified [enum Margin].\nPositive values reduce size inwards, unlike [Control]'s margin values."] # [doc = ""] # [inline] pub fn get_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns the minimum size that this stylebox can be shrunk to."] # [doc = ""] # [inline] pub fn get_minimum_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_minimum_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the \"offset\" of a stylebox. This helper function returns a value equivalent to `Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))`."] # [doc = ""] # [inline] pub fn get_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.\nRefer to [member content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn set_default_margin (& self , margin : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , offset) ; } } # [doc = "Test a position in a rectangle, return whether it passes the mask test."] # [doc = ""] # [inline] pub fn test_mask (& self , point : Vector2 , rect : Rect2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . test_mask ; let ret = crate :: icalls :: icallptr_bool_vec2_rect2 (method_bind , self . this . sys () . as_ptr () , point , rect) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBox { } unsafe impl GodotObject for StyleBox { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBox" } } impl std :: ops :: Deref for StyleBox { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBox { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBox { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBox { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub get_center_size : * mut sys :: godot_method_bind , pub get_current_item_drawn : * mut sys :: godot_method_bind , pub get_default_margin : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_minimum_size : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub set_default_margin : * mut sys :: godot_method_bind , pub test_mask : * mut sys :: godot_method_bind } impl StyleBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxMethodTable = StyleBoxMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , get_center_size : 0 as * mut sys :: godot_method_bind , get_current_item_drawn : 0 as * mut sys :: godot_method_bind , get_default_margin : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_minimum_size : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , set_default_margin : 0 as * mut sys :: godot_method_bind , test_mask : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StyleBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . get_center_size = (gd_api . godot_method_bind_get_method) (class_name , "get_center_size\0" . as_ptr () as * const c_char) ; table . get_current_item_drawn = (gd_api . godot_method_bind_get_method) (class_name , "get_current_item_drawn\0" . as_ptr () as * const c_char) ; table . get_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_default_margin\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . set_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_default_margin\0" . as_ptr () as * const c_char) ; table . test_mask = (gd_api . godot_method_bind_get_method) (class_name , "test_mask\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:718:26438 [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 Light2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_light2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Light2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLight2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Light2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const ADD : Mode = Mode (0i64) ; pub const SUB : Mode = Mode (1i64) ; pub const MIX : Mode = Mode (2i64) ; pub const MASK : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowFilter (pub i64) ; impl ShadowFilter { pub const NONE : ShadowFilter = ShadowFilter (0i64) ; pub const PCF3 : ShadowFilter = ShadowFilter (1i64) ; pub const PCF5 : ShadowFilter = ShadowFilter (2i64) ; pub const PCF7 : ShadowFilter = ShadowFilter (3i64) ; pub const PCF9 : ShadowFilter = ShadowFilter (4i64) ; pub const PCF13 : ShadowFilter = ShadowFilter (5i64) ; } impl From < i64 > for ShadowFilter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowFilter > for i64 { # [inline] fn from (v : ShadowFilter) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light2D { pub const MODE_ADD : i64 = 0i64 ; pub const MODE_MASK : i64 = 3i64 ; pub const MODE_MIX : i64 = 2i64 ; pub const MODE_SUB : i64 = 1i64 ; pub const SHADOW_FILTER_NONE : i64 = 0i64 ; pub const SHADOW_FILTER_PCF13 : i64 = 5i64 ; pub const SHADOW_FILTER_PCF3 : i64 = 1i64 ; pub const SHADOW_FILTER_PCF5 : i64 = 2i64 ; pub const SHADOW_FILTER_PCF7 : i64 = 3i64 ; pub const SHADOW_FILTER_PCF9 : i64 = 4i64 ; } impl Light2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Light2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The Light2D's [Color]."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The Light2D's energy value. The larger the value, the stronger the light."] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The height of the Light2D. Used with 2D normal mapping."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The layer mask. Only objects with a matching mask will be affected by the Light2D."] # [doc = ""] # [inline] pub fn item_cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_item_cull_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows."] # [doc = ""] # [inline] pub fn item_shadow_cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_item_shadow_cull_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn layer_range_max (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_layer_range_max ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Minimum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn layer_range_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_layer_range_min ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Light2D's mode. See [enum Mode] constants for values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: light_2d :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light_2d :: Mode (ret) } } # [doc = "Shadow buffer size."] # [doc = ""] # [inline] pub fn shadow_buffer_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_buffer_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Color] of shadows cast by the Light2D."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Shadow filter type. See [enum ShadowFilter] for possible values."] # [doc = ""] # [inline] pub fn shadow_filter (& self) -> crate :: generated :: light_2d :: ShadowFilter { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_filter ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light_2d :: ShadowFilter (ret) } } # [doc = "Smooth shadow gradient length."] # [doc = ""] # [inline] pub fn shadow_gradient_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_gradient_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Smoothing value for shadows."] # [doc = ""] # [inline] pub fn shadow_smooth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_smooth ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The offset of the Light2D's `texture`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The `texture`'s scale factor."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn z_range_max (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_z_range_max ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Minimum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn z_range_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_z_range_min ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, Light2D will only appear when editing the scene."] # [doc = ""] # [inline] pub fn is_editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_editor_only ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, Light2D will emit light."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the Light2D will cast shadows."] # [doc = ""] # [inline] pub fn is_shadow_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_shadow_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The Light2D's [Color]."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, Light2D will only appear when editing the scene."] # [doc = ""] # [inline] pub fn set_editor_only (& self , editor_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editor_only) ; } } # [doc = "If `true`, Light2D will emit light."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The Light2D's energy value. The larger the value, the stronger the light."] # [doc = ""] # [inline] pub fn set_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = "The height of the Light2D. Used with 2D normal mapping."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The layer mask. Only objects with a matching mask will be affected by the Light2D."] # [doc = ""] # [inline] pub fn set_item_cull_mask (& self , item_cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_item_cull_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , item_cull_mask) ; } } # [doc = "The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows."] # [doc = ""] # [inline] pub fn set_item_shadow_cull_mask (& self , item_shadow_cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_item_shadow_cull_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , item_shadow_cull_mask) ; } } # [doc = "Maximum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_layer_range_max (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_layer_range_max ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Minimum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_layer_range_min (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_layer_range_min ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "The Light2D's mode. See [enum Mode] constants for values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Shadow buffer size."] # [doc = ""] # [inline] pub fn set_shadow_buffer_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_buffer_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "[Color] of shadows cast by the Light2D."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , shadow_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , shadow_color) ; } } # [doc = "If `true`, the Light2D will cast shadows."] # [doc = ""] # [inline] pub fn set_shadow_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Shadow filter type. See [enum ShadowFilter] for possible values."] # [doc = ""] # [inline] pub fn set_shadow_filter (& self , filter : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_filter ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , filter) ; } } # [doc = "Smooth shadow gradient length."] # [doc = ""] # [inline] pub fn set_shadow_gradient_length (& self , multiplier : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_gradient_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , multiplier) ; } } # [doc = "Smoothing value for shadows."] # [doc = ""] # [inline] pub fn set_shadow_smooth (& self , smooth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_smooth ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , smooth) ; } } # [doc = "[Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The offset of the Light2D's `texture`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The `texture`'s scale factor."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [doc = "Maximum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_z_range_max (& self , z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_z_range_max ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z) ; } } # [doc = "Minimum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_z_range_min (& self , z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_z_range_min ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light2D { } unsafe impl GodotObject for Light2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Light2D" } } impl QueueFree for Light2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Light2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Light2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Light2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Light2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Light2D { } impl Instanciable for Light2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Light2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Light2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_item_cull_mask : * mut sys :: godot_method_bind , pub get_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub get_layer_range_max : * mut sys :: godot_method_bind , pub get_layer_range_min : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_shadow_buffer_size : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_filter : * mut sys :: godot_method_bind , pub get_shadow_gradient_length : * mut sys :: godot_method_bind , pub get_shadow_smooth : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_z_range_max : * mut sys :: godot_method_bind , pub get_z_range_min : * mut sys :: godot_method_bind , pub is_editor_only : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub is_shadow_enabled : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_item_cull_mask : * mut sys :: godot_method_bind , pub set_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub set_layer_range_max : * mut sys :: godot_method_bind , pub set_layer_range_min : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_shadow_buffer_size : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_enabled : * mut sys :: godot_method_bind , pub set_shadow_filter : * mut sys :: godot_method_bind , pub set_shadow_gradient_length : * mut sys :: godot_method_bind , pub set_shadow_smooth : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_z_range_max : * mut sys :: godot_method_bind , pub set_z_range_min : * mut sys :: godot_method_bind } impl Light2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Light2DMethodTable = Light2DMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_item_cull_mask : 0 as * mut sys :: godot_method_bind , get_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , get_layer_range_max : 0 as * mut sys :: godot_method_bind , get_layer_range_min : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_filter : 0 as * mut sys :: godot_method_bind , get_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , get_shadow_smooth : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_z_range_max : 0 as * mut sys :: godot_method_bind , get_z_range_min : 0 as * mut sys :: godot_method_bind , is_editor_only : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , is_shadow_enabled : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_item_cull_mask : 0 as * mut sys :: godot_method_bind , set_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , set_layer_range_max : 0 as * mut sys :: godot_method_bind , set_layer_range_min : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_enabled : 0 as * mut sys :: godot_method_bind , set_shadow_filter : 0 as * mut sys :: godot_method_bind , set_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , set_shadow_smooth : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_z_range_max : 0 as * mut sys :: godot_method_bind , set_z_range_min : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Light2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Light2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_item_cull_mask\0" . as_ptr () as * const c_char) ; table . get_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . get_layer_range_max = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_range_max\0" . as_ptr () as * const c_char) ; table . get_layer_range_min = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_range_min\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_filter\0" . as_ptr () as * const c_char) ; table . get_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . get_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_smooth\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_z_range_max = (gd_api . godot_method_bind_get_method) (class_name , "get_z_range_max\0" . as_ptr () as * const c_char) ; table . get_z_range_min = (gd_api . godot_method_bind_get_method) (class_name , "get_z_range_min\0" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . is_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shadow_enabled\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_item_cull_mask\0" . as_ptr () as * const c_char) ; table . set_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . set_layer_range_max = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_range_max\0" . as_ptr () as * const c_char) ; table . set_layer_range_min = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_range_min\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_enabled\0" . as_ptr () as * const c_char) ; table . set_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_filter\0" . as_ptr () as * const c_char) ; table . set_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . set_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_smooth\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_z_range_max = (gd_api . godot_method_bind_get_method) (class_name , "set_z_range_max\0" . as_ptr () as * const c_char) ; table . set_z_range_min = (gd_api . godot_method_bind_get_method) (class_name , "set_z_range_min\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:724:11410 [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 WebSocketServer` inherits `WebSocketMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_websocketserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketServer inherits methods from:\n - [WebSocketMultiplayerPeer](struct.WebSocketMultiplayerPeer.html)\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketServer { this : RawObject < Self > , } impl WebSocketServer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn disconnect_peer (& self , id : i64 , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . disconnect_peer ; let ret = crate :: icalls :: icallptr_void_i64_i64_str (method_bind , self . this . sys () . as_ptr () , id , code , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn bind_ip (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_bind_ip ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ca_chain (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ca_chain ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_address (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_peer_address ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_port (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_peer_port ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn private_key (& self) -> Option < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_private_key ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn ssl_certificate (& self) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ssl_certificate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_peer (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . has_peer ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_listening (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . is_listening ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , protocols : StringArray , gd_mp_api : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallptr_i64_i64_strarr_bool (method_bind , self . this . sys () . as_ptr () , port , protocols , gd_mp_api) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_ip (& self , arg0 : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_bind_ip ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , arg0 . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ca_chain (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ca_chain ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_private_key (& self , arg0 : impl AsArg < crate :: generated :: crypto_key :: CryptoKey >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_private_key ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ssl_certificate (& self , arg0 : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ssl_certificate ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , arg0 . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketServer { } unsafe impl GodotObject for WebSocketServer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketServer" } } impl std :: ops :: Deref for WebSocketServer { type Target = crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_socket_multiplayer_peer :: WebSocketMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebSocketServer { } impl Instanciable for WebSocketServer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebSocketServer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub disconnect_peer : * mut sys :: godot_method_bind , pub get_bind_ip : * mut sys :: godot_method_bind , pub get_ca_chain : * mut sys :: godot_method_bind , pub get_peer_address : * mut sys :: godot_method_bind , pub get_peer_port : * mut sys :: godot_method_bind , pub get_private_key : * mut sys :: godot_method_bind , pub get_ssl_certificate : * mut sys :: godot_method_bind , pub has_peer : * mut sys :: godot_method_bind , pub is_listening : * mut sys :: godot_method_bind , pub listen : * mut sys :: godot_method_bind , pub set_bind_ip : * mut sys :: godot_method_bind , pub set_ca_chain : * mut sys :: godot_method_bind , pub set_private_key : * mut sys :: godot_method_bind , pub set_ssl_certificate : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl WebSocketServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketServerMethodTable = WebSocketServerMethodTable { class_constructor : None , disconnect_peer : 0 as * mut sys :: godot_method_bind , get_bind_ip : 0 as * mut sys :: godot_method_bind , get_ca_chain : 0 as * mut sys :: godot_method_bind , get_peer_address : 0 as * mut sys :: godot_method_bind , get_peer_port : 0 as * mut sys :: godot_method_bind , get_private_key : 0 as * mut sys :: godot_method_bind , get_ssl_certificate : 0 as * mut sys :: godot_method_bind , has_peer : 0 as * mut sys :: godot_method_bind , is_listening : 0 as * mut sys :: godot_method_bind , listen : 0 as * mut sys :: godot_method_bind , set_bind_ip : 0 as * mut sys :: godot_method_bind , set_ca_chain : 0 as * mut sys :: godot_method_bind , set_private_key : 0 as * mut sys :: godot_method_bind , set_ssl_certificate : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WebSocketServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\0" . as_ptr () as * const c_char) ; table . get_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_ip\0" . as_ptr () as * const c_char) ; table . get_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "get_ca_chain\0" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\0" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\0" . as_ptr () as * const c_char) ; table . get_private_key = (gd_api . godot_method_bind_get_method) (class_name , "get_private_key\0" . as_ptr () as * const c_char) ; table . get_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_ssl_certificate\0" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\0" . as_ptr () as * const c_char) ; table . set_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "set_ca_chain\0" . as_ptr () as * const c_char) ; table . set_private_key = (gd_api . godot_method_bind_get_method) (class_name , "set_private_key\0" . as_ptr () as * const c_char) ; table . set_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_ssl_certificate\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:730:9260 [INFO] [stdout] | [INFO] [stdout] 730 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 730 | # [doc = "`core class TextureLayered` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texturelayered.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextureLayered inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureLayered { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAGS_DEFAULT : Flags = Flags (4i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureLayered { pub const FLAGS_DEFAULT : i64 = 4i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; } impl TextureLayered { # [doc = "Creates the [Texture3D] or [TextureArray] with specified `width`, `height`, and `depth`. See [enum Image.Format] for `format` options. See [enum Flags] enumerator for `flags` options.\n# Default Arguments\n* `flags` - `4`"] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , depth : i64 , format : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , depth , format , flags) ; } } # [doc = "Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis)."] # [doc = ""] # [inline] pub fn get_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Specifies which [enum Flags] apply to this texture."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current format being used by this texture. See [enum Image.Format] for details."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [doc = "Returns the height of the texture. Height is typically represented by the Y-axis."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an [Image] resource with the data from specified `layer`."] # [doc = ""] # [inline] pub fn get_layer_data (& self , layer : i64) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_layer_data ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the width of the texture. Width is typically represented by the X-axis."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Partially sets the data for a specified `layer` by overwriting using the data of the specified `image`. `x_offset` and `y_offset` determine where the [Image] is \"stamped\" over the texture. The `image` must fit within the texture.\n# Default Arguments\n* `mipmap` - `0`"] # [doc = ""] # [inline] pub fn set_data_partial (& self , image : impl AsArg < crate :: generated :: image :: Image > , x_offset : i64 , y_offset : i64 , layer : i64 , mipmap : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_data_partial ; let ret = crate :: icalls :: icallptr_void_obj_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , x_offset , y_offset , layer , mipmap) ; } } # [doc = "Specifies which [enum Flags] apply to this texture."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } # [doc = "Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource."] # [doc = ""] # [inline] pub fn set_layer_data (& self , image : impl AsArg < crate :: generated :: image :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_layer_data ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , layer) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureLayered { } unsafe impl GodotObject for TextureLayered { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextureLayered" } } impl std :: ops :: Deref for TextureLayered { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureLayered { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TextureLayered { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TextureLayered { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureLayered { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureLayeredMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind , pub get_depth : * mut sys :: godot_method_bind , pub get_flags : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_layer_data : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub set_data_partial : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind , pub set_layer_data : * mut sys :: godot_method_bind } impl TextureLayeredMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureLayeredMethodTable = TextureLayeredMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind , get_depth : 0 as * mut sys :: godot_method_bind , get_flags : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_layer_data : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , set_data_partial : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind , set_layer_data : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:736:7366 [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 PrimitiveMesh` inherits `Mesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_primitivemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPrimitiveMesh inherits methods from:\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PrimitiveMesh { this : RawObject < Self > , } impl PrimitiveMesh { # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn custom_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_custom_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.\nThis gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]."] # [doc = ""] # [inline] pub fn flip_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_flip_faces ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current [Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example:\n```gdscript\nvar c := CylinderMesh.new()\nvar arr_mesh := ArrayMesh.new()\narr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())\n```"] # [doc = ""] # [inline] pub fn get_mesh_arrays (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_mesh_arrays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.\nThis gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]."] # [doc = ""] # [inline] pub fn set_flip_faces (& self , flip_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_flip_faces ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_faces) ; } } # [doc = "The current [Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PrimitiveMesh { } unsafe impl GodotObject for PrimitiveMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrimitiveMesh" } } impl std :: ops :: Deref for PrimitiveMesh { type Target = crate :: generated :: mesh :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrimitiveMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for PrimitiveMesh { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PrimitiveMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_custom_aabb : * mut sys :: godot_method_bind , pub get_flip_faces : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_mesh_arrays : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub set_flip_faces : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind } impl PrimitiveMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PrimitiveMeshMethodTable = PrimitiveMeshMethodTable { class_constructor : None , get_custom_aabb : 0 as * mut sys :: godot_method_bind , get_flip_faces : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_mesh_arrays : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , set_flip_faces : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PrimitiveMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PrimitiveMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\0" . as_ptr () as * const c_char) ; table . get_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_flip_faces\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mesh_arrays = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_arrays\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . set_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_faces\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:742:4875 [INFO] [stdout] | [INFO] [stdout] 742 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 742 | # [doc = "`core class VisualScriptNode` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptNode { this : RawObject < Self > , } impl VisualScriptNode { # [doc = ""] # [doc = ""] # [inline] pub fn get_default_input_value (& self , port_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . get_default_input_value ; let ret = crate :: icalls :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , port_idx) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_visual_script (& self) -> Option < Ref < crate :: generated :: visual_script :: VisualScript , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . get_visual_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_script :: VisualScript , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn ports_changed_notify (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . ports_changed_notify ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_default_input_value (& self , port_idx : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . set_default_input_value ; let ret = crate :: icalls :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , port_idx , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptNode { } unsafe impl GodotObject for VisualScriptNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptNode" } } impl std :: ops :: Deref for VisualScriptNode { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptNode { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_input_value : * mut sys :: godot_method_bind , pub get_visual_script : * mut sys :: godot_method_bind , pub ports_changed_notify : * mut sys :: godot_method_bind , pub set_default_input_value : * mut sys :: godot_method_bind } impl VisualScriptNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptNodeMethodTable = VisualScriptNodeMethodTable { class_constructor : None , get_default_input_value : 0 as * mut sys :: godot_method_bind , get_visual_script : 0 as * mut sys :: godot_method_bind , ports_changed_notify : 0 as * mut sys :: godot_method_bind , set_default_input_value : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_input_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_input_value\0" . as_ptr () as * const c_char) ; table . get_visual_script = (gd_api . godot_method_bind_get_method) (class_name , "get_visual_script\0" . as_ptr () as * const c_char) ; table . ports_changed_notify = (gd_api . godot_method_bind_get_method) (class_name , "ports_changed_notify\0" . as_ptr () as * const c_char) ; table . set_default_input_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_input_value\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:748:6157 [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 VisibilityNotifier2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visibilitynotifier2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VisibilityNotifier2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityNotifier2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityNotifier2D { this : RawObject < Self > , } impl VisibilityNotifier2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityNotifier2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The VisibilityNotifier2D's bounding rectangle."] # [doc = ""] # [inline] pub fn rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the bounding rectangle is on the screen.\n**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return `false` right after it is instantiated, even if it will be on screen in the draw pass."] # [doc = ""] # [inline] pub fn is_on_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . is_on_screen ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The VisibilityNotifier2D's bounding rectangle."] # [doc = ""] # [inline] pub fn set_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . set_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier2D { } unsafe impl GodotObject for VisibilityNotifier2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityNotifier2D" } } impl QueueFree for VisibilityNotifier2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityNotifier2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityNotifier2D { } impl Instanciable for VisibilityNotifier2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisibilityNotifier2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityNotifier2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_rect : * mut sys :: godot_method_bind , pub is_on_screen : * mut sys :: godot_method_bind , pub set_rect : * mut sys :: godot_method_bind } impl VisibilityNotifier2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityNotifier2DMethodTable = VisibilityNotifier2DMethodTable { class_constructor : None , get_rect : 0 as * mut sys :: godot_method_bind , is_on_screen : 0 as * mut sys :: godot_method_bind , set_rect : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisibilityNotifier2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityNotifier2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\0" . as_ptr () as * const c_char) ; table . set_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_rect\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:754:29477 [INFO] [stdout] | [INFO] [stdout] 754 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 754 | # [doc = "`core class Camera2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_camera2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Camera2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCamera2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Camera2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnchorMode (pub i64) ; impl AnchorMode { pub const FIXED_TOP_LEFT : AnchorMode = AnchorMode (0i64) ; pub const DRAG_CENTER : AnchorMode = AnchorMode (1i64) ; } impl From < i64 > for AnchorMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnchorMode > for i64 { # [inline] fn from (v : AnchorMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Camera2DProcessMode (pub i64) ; impl Camera2DProcessMode { pub const PHYSICS : Camera2DProcessMode = Camera2DProcessMode (0i64) ; pub const IDLE : Camera2DProcessMode = Camera2DProcessMode (1i64) ; } impl From < i64 > for Camera2DProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Camera2DProcessMode > for i64 { # [inline] fn from (v : Camera2DProcessMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Camera2D { pub const ANCHOR_MODE_DRAG_CENTER : i64 = 1i64 ; pub const ANCHOR_MODE_FIXED_TOP_LEFT : i64 = 0i64 ; pub const CAMERA2D_PROCESS_IDLE : i64 = 1i64 ; pub const CAMERA2D_PROCESS_PHYSICS : i64 = 0i64 ; } impl Camera2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Camera2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Aligns the camera to the tracked node."] # [doc = ""] # [inline] pub fn align (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . align ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes any [Camera2D] from the ancestor [Viewport]'s internal currently-assigned camera."] # [doc = ""] # [inline] pub fn clear_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Forces the camera to update scroll immediately."] # [doc = ""] # [inline] pub fn force_update_scroll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . force_update_scroll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [enum AnchorMode] constants."] # [doc = ""] # [inline] pub fn anchor_mode (& self) -> crate :: generated :: camera_2d :: AnchorMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_anchor_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_2d :: AnchorMode (ret) } } # [doc = "Returns the camera position."] # [doc = ""] # [inline] pub fn get_camera_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_camera_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the location of the [Camera2D]'s screen-center, relative to the origin."] # [doc = ""] # [inline] pub fn get_camera_screen_center (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_camera_screen_center ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The custom [Viewport] node attached to the [Camera2D]. If `null` or not a [Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn drag_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is `true`."] # [doc = ""] # [inline] pub fn follow_smoothing (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_follow_smoothing ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The horizontal offset of the camera, relative to the drag margins.\n**Note:** Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset."] # [doc = ""] # [inline] pub fn h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn limit (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "The camera's offset, useful for looking around or camera shake animations."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The camera's process callback. See [enum Camera2DProcessMode]."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: camera_2d :: Camera2DProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_2d :: Camera2DProcessMode (ret) } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [member offset_h]."] # [doc = ""] # [inline] pub fn v_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_v_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The camera's zoom relative to the viewport. Values larger than `Vector2(1, 1)` zoom out and smaller values zoom in. For an example, use `Vector2(0.5, 0.5)` for a 2× zoom-in, and `Vector2(4, 4)` for a 4× zoom-out."] # [doc = ""] # [inline] pub fn zoom (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_zoom ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera `current` will disable this one."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera smoothly moves towards the target at [member smoothing_speed]."] # [doc = ""] # [inline] pub fn is_follow_smoothing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_follow_smoothing_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera only moves when reaching the horizontal drag margins. If `false`, the camera moves horizontally regardless of margins."] # [doc = ""] # [inline] pub fn is_h_drag_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_h_drag_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, draws the camera's limits rectangle in the editor."] # [doc = ""] # [inline] pub fn is_limit_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_limit_drawing_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera smoothly stops when reaches its limits."] # [doc = ""] # [inline] pub fn is_limit_smoothing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_limit_smoothing_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, draws the camera's drag margin rectangle in the editor."] # [doc = ""] # [inline] pub fn is_margin_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_margin_drawing_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera rotates with the target."] # [doc = ""] # [inline] pub fn is_rotating (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_rotating ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, draws the camera's screen rectangle in the editor."] # [doc = ""] # [inline] pub fn is_screen_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_screen_drawing_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the camera only moves when reaching the vertical drag margins. If `false`, the camera moves vertically regardless of margins."] # [doc = ""] # [inline] pub fn is_v_drag_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_v_drag_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the camera's position immediately to its current smoothing destination.\nThis has no effect if smoothing is disabled."] # [doc = ""] # [inline] pub fn reset_smoothing (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . reset_smoothing ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [enum AnchorMode] constants."] # [doc = ""] # [inline] pub fn set_anchor_mode (& self , anchor_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_anchor_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , anchor_mode) ; } } # [doc = "The custom [Viewport] node attached to the [Camera2D]. If `null` or not a [Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [doc = "Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn set_drag_margin (& self , margin : i64 , drag_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , drag_margin) ; } } # [doc = "If `true`, the camera smoothly moves towards the target at [member smoothing_speed]."] # [doc = ""] # [inline] pub fn set_enable_follow_smoothing (& self , follow_smoothing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_enable_follow_smoothing ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , follow_smoothing) ; } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is `true`."] # [doc = ""] # [inline] pub fn set_follow_smoothing (& self , follow_smoothing : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_follow_smoothing ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , follow_smoothing) ; } } # [doc = "If `true`, the camera only moves when reaching the horizontal drag margins. If `false`, the camera moves horizontally regardless of margins."] # [doc = ""] # [inline] pub fn set_h_drag_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_h_drag_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The horizontal offset of the camera, relative to the drag margins.\n**Note:** Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset."] # [doc = ""] # [inline] pub fn set_h_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_h_offset ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn set_limit (& self , margin : i64 , limit : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , limit) ; } } # [doc = "If `true`, draws the camera's limits rectangle in the editor."] # [doc = ""] # [inline] pub fn set_limit_drawing_enabled (& self , limit_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit_drawing_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , limit_drawing_enabled) ; } } # [doc = "If `true`, the camera smoothly stops when reaches its limits."] # [doc = ""] # [inline] pub fn set_limit_smoothing_enabled (& self , limit_smoothing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit_smoothing_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , limit_smoothing_enabled) ; } } # [doc = "If `true`, draws the camera's drag margin rectangle in the editor."] # [doc = ""] # [inline] pub fn set_margin_drawing_enabled (& self , margin_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_margin_drawing_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , margin_drawing_enabled) ; } } # [doc = "The camera's offset, useful for looking around or camera shake animations."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The camera's process callback. See [enum Camera2DProcessMode]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, the camera rotates with the target."] # [doc = ""] # [inline] pub fn set_rotating (& self , rotating : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_rotating ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , rotating) ; } } # [doc = "If `true`, draws the camera's screen rectangle in the editor."] # [doc = ""] # [inline] pub fn set_screen_drawing_enabled (& self , screen_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_screen_drawing_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , screen_drawing_enabled) ; } } # [doc = "If `true`, the camera only moves when reaching the vertical drag margins. If `false`, the camera moves vertically regardless of margins."] # [doc = ""] # [inline] pub fn set_v_drag_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_v_drag_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [member offset_h]."] # [doc = ""] # [inline] pub fn set_v_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_v_offset ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The camera's zoom relative to the viewport. Values larger than `Vector2(1, 1)` zoom out and smaller values zoom in. For an example, use `Vector2(0.5, 0.5)` for a 2× zoom-in, and `Vector2(4, 4)` for a 4× zoom-out."] # [doc = ""] # [inline] pub fn set_zoom (& self , zoom : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_zoom ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , zoom) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Camera2D { } unsafe impl GodotObject for Camera2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Camera2D" } } impl QueueFree for Camera2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Camera2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Camera2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Camera2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Camera2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Camera2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Camera2D { } impl Instanciable for Camera2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Camera2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Camera2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub align : * mut sys :: godot_method_bind , pub clear_current : * mut sys :: godot_method_bind , pub force_update_scroll : * mut sys :: godot_method_bind , pub get_anchor_mode : * mut sys :: godot_method_bind , pub get_camera_position : * mut sys :: godot_method_bind , pub get_camera_screen_center : * mut sys :: godot_method_bind , pub get_custom_viewport : * mut sys :: godot_method_bind , pub get_drag_margin : * mut sys :: godot_method_bind , pub get_follow_smoothing : * mut sys :: godot_method_bind , pub get_h_offset : * mut sys :: godot_method_bind , pub get_limit : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_process_mode : * mut sys :: godot_method_bind , pub get_v_offset : * mut sys :: godot_method_bind , pub get_zoom : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub is_follow_smoothing_enabled : * mut sys :: godot_method_bind , pub is_h_drag_enabled : * mut sys :: godot_method_bind , pub is_limit_drawing_enabled : * mut sys :: godot_method_bind , pub is_limit_smoothing_enabled : * mut sys :: godot_method_bind , pub is_margin_drawing_enabled : * mut sys :: godot_method_bind , pub is_rotating : * mut sys :: godot_method_bind , pub is_screen_drawing_enabled : * mut sys :: godot_method_bind , pub is_v_drag_enabled : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind , pub reset_smoothing : * mut sys :: godot_method_bind , pub set_anchor_mode : * mut sys :: godot_method_bind , pub set_custom_viewport : * mut sys :: godot_method_bind , pub set_drag_margin : * mut sys :: godot_method_bind , pub set_enable_follow_smoothing : * mut sys :: godot_method_bind , pub set_follow_smoothing : * mut sys :: godot_method_bind , pub set_h_drag_enabled : * mut sys :: godot_method_bind , pub set_h_offset : * mut sys :: godot_method_bind , pub set_limit : * mut sys :: godot_method_bind , pub set_limit_drawing_enabled : * mut sys :: godot_method_bind , pub set_limit_smoothing_enabled : * mut sys :: godot_method_bind , pub set_margin_drawing_enabled : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind , pub set_rotating : * mut sys :: godot_method_bind , pub set_screen_drawing_enabled : * mut sys :: godot_method_bind , pub set_v_drag_enabled : * mut sys :: godot_method_bind , pub set_v_offset : * mut sys :: godot_method_bind , pub set_zoom : * mut sys :: godot_method_bind } impl Camera2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Camera2DMethodTable = Camera2DMethodTable { class_constructor : None , align : 0 as * mut sys :: godot_method_bind , clear_current : 0 as * mut sys :: godot_method_bind , force_update_scroll : 0 as * mut sys :: godot_method_bind , get_anchor_mode : 0 as * mut sys :: godot_method_bind , get_camera_position : 0 as * mut sys :: godot_method_bind , get_camera_screen_center : 0 as * mut sys :: godot_method_bind , get_custom_viewport : 0 as * mut sys :: godot_method_bind , get_drag_margin : 0 as * mut sys :: godot_method_bind , get_follow_smoothing : 0 as * mut sys :: godot_method_bind , get_h_offset : 0 as * mut sys :: godot_method_bind , get_limit : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_process_mode : 0 as * mut sys :: godot_method_bind , get_v_offset : 0 as * mut sys :: godot_method_bind , get_zoom : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , is_follow_smoothing_enabled : 0 as * mut sys :: godot_method_bind , is_h_drag_enabled : 0 as * mut sys :: godot_method_bind , is_limit_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_limit_smoothing_enabled : 0 as * mut sys :: godot_method_bind , is_margin_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_rotating : 0 as * mut sys :: godot_method_bind , is_screen_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_v_drag_enabled : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind , reset_smoothing : 0 as * mut sys :: godot_method_bind , set_anchor_mode : 0 as * mut sys :: godot_method_bind , set_custom_viewport : 0 as * mut sys :: godot_method_bind , set_drag_margin : 0 as * mut sys :: godot_method_bind , set_enable_follow_smoothing : 0 as * mut sys :: godot_method_bind , set_follow_smoothing : 0 as * mut sys :: godot_method_bind , set_h_drag_enabled : 0 as * mut sys :: godot_method_bind , set_h_offset : 0 as * mut sys :: godot_method_bind , set_limit : 0 as * mut sys :: godot_method_bind , set_limit_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_limit_smoothing_enabled : 0 as * mut sys :: godot_method_bind , set_margin_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind , set_rotating : 0 as * mut sys :: godot_method_bind , set_screen_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_v_drag_enabled : 0 as * mut sys :: godot_method_bind , set_v_offset : 0 as * mut sys :: godot_method_bind , set_zoom : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Camera2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Camera2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . align = (gd_api . godot_method_bind_get_method) (class_name , "align\0" . as_ptr () as * const c_char) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . force_update_scroll = (gd_api . godot_method_bind_get_method) (class_name , "force_update_scroll\0" . as_ptr () as * const c_char) ; table . get_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_mode\0" . as_ptr () as * const c_char) ; table . get_camera_position = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_position\0" . as_ptr () as * const c_char) ; table . get_camera_screen_center = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_screen_center\0" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\0" . as_ptr () as * const c_char) ; table . get_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_margin\0" . as_ptr () as * const c_char) ; table . get_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "get_follow_smoothing\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_limit\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . is_follow_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_follow_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . is_h_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_h_drag_enabled\0" . as_ptr () as * const c_char) ; table . is_limit_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_limit_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_limit_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_limit_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . is_margin_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_margin_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_rotating = (gd_api . godot_method_bind_get_method) (class_name , "is_rotating\0" . as_ptr () as * const c_char) ; table . is_screen_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_screen_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_v_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_v_drag_enabled\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; table . reset_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "reset_smoothing\0" . as_ptr () as * const c_char) ; table . set_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_mode\0" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\0" . as_ptr () as * const c_char) ; table . set_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_margin\0" . as_ptr () as * const c_char) ; table . set_enable_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_follow_smoothing\0" . as_ptr () as * const c_char) ; table . set_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_smoothing\0" . as_ptr () as * const c_char) ; table . set_h_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_h_drag_enabled\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_limit\0" . as_ptr () as * const c_char) ; table . set_limit_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_limit_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . set_margin_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_margin_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; table . set_rotating = (gd_api . godot_method_bind_get_method) (class_name , "set_rotating\0" . as_ptr () as * const c_char) ; table . set_screen_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_v_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_v_drag_enabled\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:760:3599 [INFO] [stdout] | [INFO] [stdout] 760 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 760 | # [doc = "`core class AudioStreamMicrophone` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreammicrophone.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMicrophone inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { this : RawObject < Self > , } impl AudioStreamMicrophone { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMicrophoneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMicrophone { } unsafe impl GodotObject for AudioStreamMicrophone { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMicrophone" } } impl std :: ops :: Deref for AudioStreamMicrophone { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMicrophone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMicrophone { } impl Instanciable for AudioStreamMicrophone { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamMicrophone :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMicrophoneMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioStreamMicrophoneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMicrophoneMethodTable = AudioStreamMicrophoneMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamMicrophoneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMicrophone\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:766:7052 [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 WindowDialog` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_windowdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`WindowDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nWindowDialog inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WindowDialog { this : RawObject < Self > , } impl WindowDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WindowDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the close [TextureButton]."] # [doc = ""] # [inline] pub fn get_close_button (& self) -> Option < Ref < crate :: generated :: texture_button :: TextureButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_close_button ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture_button :: TextureButton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the user can resize the window."] # [doc = ""] # [inline] pub fn resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_resizable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The text displayed in the window's title bar."] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the user can resize the window."] # [doc = ""] # [inline] pub fn set_resizable (& self , resizable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . set_resizable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , resizable) ; } } # [doc = "The text displayed in the window's title bar."] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WindowDialog { } unsafe impl GodotObject for WindowDialog { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "WindowDialog" } } impl QueueFree for WindowDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for WindowDialog { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WindowDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for WindowDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for WindowDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for WindowDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for WindowDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for WindowDialog { } impl Instanciable for WindowDialog { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WindowDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WindowDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_close_button : * mut sys :: godot_method_bind , pub get_resizable : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub set_resizable : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl WindowDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WindowDialogMethodTable = WindowDialogMethodTable { class_constructor : None , get_close_button : 0 as * mut sys :: godot_method_bind , get_resizable : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , set_resizable : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WindowDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WindowDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_close_button = (gd_api . godot_method_bind_get_method) (class_name , "get_close_button\0" . as_ptr () as * const c_char) ; table . get_resizable = (gd_api . godot_method_bind_get_method) (class_name , "get_resizable\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:772:7629 [INFO] [stdout] | [INFO] [stdout] 772 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 LargeTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_largetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nLargeTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LargeTexture { this : RawObject < Self > , } impl LargeTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LargeTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `texture` to this [LargeTexture], starting on offset `ofs`."] # [doc = ""] # [inline] pub fn add_piece (& self , ofs : Vector2 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . add_piece ; let ret = crate :: icalls :: icallptr_i64_vec2_obj (method_bind , self . this . sys () . as_ptr () , ofs , texture . as_arg_ptr ()) ; ret as _ } } # [doc = "Clears the [LargeTexture]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of pieces currently in this [LargeTexture]."] # [doc = ""] # [inline] pub fn get_piece_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the offset of the piece with the index `idx`."] # [doc = ""] # [inline] pub fn get_piece_offset (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_offset ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the [Texture] of the piece with the index `idx`."] # [doc = ""] # [inline] pub fn get_piece_texture (& self , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_texture ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets the offset of the piece with the index `idx` to `ofs`."] # [doc = ""] # [inline] pub fn set_piece_offset (& self , idx : i64 , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_piece_offset ; let ret = crate :: icalls :: icallptr_void_i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx , ofs) ; } } # [doc = "Sets the [Texture] of the piece with index `idx` to `texture`."] # [doc = ""] # [inline] pub fn set_piece_texture (& self , idx : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_piece_texture ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , texture . as_arg_ptr ()) ; } } # [doc = "Sets the size of this [LargeTexture]."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LargeTexture { } unsafe impl GodotObject for LargeTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LargeTexture" } } impl std :: ops :: Deref for LargeTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LargeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for LargeTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for LargeTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for LargeTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for LargeTexture { } impl Instanciable for LargeTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { LargeTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LargeTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_piece : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_piece_count : * mut sys :: godot_method_bind , pub get_piece_offset : * mut sys :: godot_method_bind , pub get_piece_texture : * mut sys :: godot_method_bind , pub set_piece_offset : * mut sys :: godot_method_bind , pub set_piece_texture : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl LargeTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LargeTextureMethodTable = LargeTextureMethodTable { class_constructor : None , add_piece : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_piece_count : 0 as * mut sys :: godot_method_bind , get_piece_offset : 0 as * mut sys :: godot_method_bind , get_piece_texture : 0 as * mut sys :: godot_method_bind , set_piece_offset : 0 as * mut sys :: godot_method_bind , set_piece_texture : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { LargeTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LargeTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_piece = (gd_api . godot_method_bind_get_method) (class_name , "add_piece\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_piece_count = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_count\0" . as_ptr () as * const c_char) ; table . get_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_offset\0" . as_ptr () as * const c_char) ; table . get_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_texture\0" . as_ptr () as * const c_char) ; table . set_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_offset\0" . as_ptr () as * const c_char) ; table . set_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_texture\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:778:5960 [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 VisualShaderNodeColorOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodecolorop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorOp { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const SCREEN : Operator = Operator (0i64) ; pub const DIFFERENCE : Operator = Operator (1i64) ; pub const DARKEN : Operator = Operator (2i64) ; pub const LIGHTEN : Operator = Operator (3i64) ; pub const OVERLAY : Operator = Operator (4i64) ; pub const DODGE : Operator = Operator (5i64) ; pub const BURN : Operator = Operator (6i64) ; pub const SOFT_LIGHT : Operator = Operator (7i64) ; pub const HARD_LIGHT : Operator = Operator (8i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeColorOp { pub const OP_BURN : i64 = 6i64 ; pub const OP_DARKEN : i64 = 2i64 ; pub const OP_DIFFERENCE : i64 = 1i64 ; pub const OP_DODGE : i64 = 5i64 ; pub const OP_HARD_LIGHT : i64 = 8i64 ; pub const OP_LIGHTEN : i64 = 3i64 ; pub const OP_OVERLAY : i64 = 4i64 ; pub const OP_SCREEN : i64 = 0i64 ; pub const OP_SOFT_LIGHT : i64 = 7i64 ; } impl VisualShaderNodeColorOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "An operator to be applied to the inputs. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_color_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_color_op :: Operator (ret) } } # [doc = "An operator to be applied to the inputs. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorOp { } unsafe impl GodotObject for VisualShaderNodeColorOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorOp" } } impl std :: ops :: Deref for VisualShaderNodeColorOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorOp { } impl Instanciable for VisualShaderNodeColorOp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeColorOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeColorOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorOpMethodTable = VisualShaderNodeColorOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:790:4452 [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 = "`core class AudioEffectPanner` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectpanner.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPanner inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPanner { this : RawObject < Self > , } impl AudioEffectPanner { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPannerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Pan position. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPannerMethodTable :: get (get_api ()) . get_pan ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pan position. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_pan (& self , cpanume : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPannerMethodTable :: get (get_api ()) . set_pan ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , cpanume) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPanner { } unsafe impl GodotObject for AudioEffectPanner { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPanner" } } impl std :: ops :: Deref for AudioEffectPanner { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPanner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectPanner { } impl Instanciable for AudioEffectPanner { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectPanner :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPannerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_pan : * mut sys :: godot_method_bind , pub set_pan : * mut sys :: godot_method_bind } impl AudioEffectPannerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPannerMethodTable = AudioEffectPannerMethodTable { class_constructor : None , get_pan : 0 as * mut sys :: godot_method_bind , set_pan : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectPannerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPanner\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_pan\0" . as_ptr () as * const c_char) ; table . set_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_pan\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:796:4806 [INFO] [stdout] | [INFO] [stdout] 796 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 796 | # [doc = "`core class VisualShaderNodeVec3Constant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevec3constant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVec3Constant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVec3Constant { this : RawObject < Self > , } impl VisualShaderNodeVec3Constant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVec3ConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [Vector3] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3ConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A [Vector3] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3ConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVec3Constant { } unsafe impl GodotObject for VisualShaderNodeVec3Constant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVec3Constant" } } impl std :: ops :: Deref for VisualShaderNodeVec3Constant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVec3Constant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVec3Constant { } impl Instanciable for VisualShaderNodeVec3Constant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVec3Constant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVec3ConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeVec3ConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVec3ConstantMethodTable = VisualShaderNodeVec3ConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVec3ConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVec3Constant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:802:4498 [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 ButtonGroup` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_buttongroup.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nButtonGroup inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ButtonGroup { this : RawObject < Self > , } impl ButtonGroup { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ButtonGroupMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.group])."] # [doc = ""] # [inline] pub fn get_buttons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonGroupMethodTable :: get (get_api ()) . get_buttons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current pressed button."] # [doc = ""] # [inline] pub fn get_pressed_button (& self) -> Option < Ref < crate :: generated :: base_button :: BaseButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonGroupMethodTable :: get (get_api ()) . get_pressed_button ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: base_button :: BaseButton , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for ButtonGroup { } unsafe impl GodotObject for ButtonGroup { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ButtonGroup" } } impl std :: ops :: Deref for ButtonGroup { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ButtonGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: object :: Object > for ButtonGroup { } impl Instanciable for ButtonGroup { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ButtonGroup :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ButtonGroupMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buttons : * mut sys :: godot_method_bind , pub get_pressed_button : * mut sys :: godot_method_bind } impl ButtonGroupMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ButtonGroupMethodTable = ButtonGroupMethodTable { class_constructor : None , get_buttons : 0 as * mut sys :: godot_method_bind , get_pressed_button : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ButtonGroupMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ButtonGroup\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buttons = (gd_api . godot_method_bind_get_method) (class_name , "get_buttons\0" . as_ptr () as * const c_char) ; table . get_pressed_button = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_button\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:808:4743 [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 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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:814:3440 [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 SceneTreeTimer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_scenetreetimer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneTreeTimer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneTreeTimer { this : RawObject < Self > , } impl SceneTreeTimer { # [doc = "The time remaining."] # [doc = ""] # [inline] pub fn time_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTimerMethodTable :: get (get_api ()) . get_time_left ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The time remaining."] # [doc = ""] # [inline] pub fn set_time_left (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTimerMethodTable :: get (get_api ()) . set_time_left ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTreeTimer { } unsafe impl GodotObject for SceneTreeTimer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneTreeTimer" } } impl std :: ops :: Deref for SceneTreeTimer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTreeTimer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SceneTreeTimer { } unsafe impl SubClass < crate :: generated :: object :: Object > for SceneTreeTimer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneTreeTimerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_time_left : * mut sys :: godot_method_bind , pub set_time_left : * mut sys :: godot_method_bind } impl SceneTreeTimerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneTreeTimerMethodTable = SceneTreeTimerMethodTable { class_constructor : None , get_time_left : 0 as * mut sys :: godot_method_bind , set_time_left : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SceneTreeTimerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneTreeTimer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_time_left = (gd_api . godot_method_bind_get_method) (class_name , "get_time_left\0" . as_ptr () as * const c_char) ; table . set_time_left = (gd_api . godot_method_bind_get_method) (class_name , "set_time_left\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:820:9585 [INFO] [stdout] | [INFO] [stdout] 820 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 820 | # [doc = "`core class NetworkedMultiplayerPeer` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_networkedmultiplayerpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNetworkedMultiplayerPeer inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NetworkedMultiplayerPeer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConnectionStatus (pub i64) ; impl ConnectionStatus { pub const DISCONNECTED : ConnectionStatus = ConnectionStatus (0i64) ; pub const CONNECTING : ConnectionStatus = ConnectionStatus (1i64) ; pub const CONNECTED : ConnectionStatus = ConnectionStatus (2i64) ; } impl From < i64 > for ConnectionStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConnectionStatus > for i64 { # [inline] fn from (v : ConnectionStatus) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TransferMode (pub i64) ; impl TransferMode { pub const UNRELIABLE : TransferMode = TransferMode (0i64) ; pub const UNRELIABLE_ORDERED : TransferMode = TransferMode (1i64) ; pub const RELIABLE : TransferMode = TransferMode (2i64) ; } impl From < i64 > for TransferMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TransferMode > for i64 { # [inline] fn from (v : TransferMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NetworkedMultiplayerPeer { pub const CONNECTION_CONNECTED : i64 = 2i64 ; pub const CONNECTION_CONNECTING : i64 = 1i64 ; pub const CONNECTION_DISCONNECTED : i64 = 0i64 ; pub const TARGET_PEER_BROADCAST : i64 = 0i64 ; pub const TARGET_PEER_SERVER : i64 = 1i64 ; pub const TRANSFER_MODE_RELIABLE : i64 = 2i64 ; pub const TRANSFER_MODE_UNRELIABLE : i64 = 0i64 ; pub const TRANSFER_MODE_UNRELIABLE_ORDERED : i64 = 1i64 ; } impl NetworkedMultiplayerPeer { # [doc = "Returns the current state of the connection. See [enum ConnectionStatus]."] # [doc = ""] # [inline] pub fn get_connection_status (& self) -> crate :: generated :: networked_multiplayer_peer :: ConnectionStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_connection_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: networked_multiplayer_peer :: ConnectionStatus (ret) } } # [doc = "Returns the ID of the [NetworkedMultiplayerPeer] who sent the most recent packet."] # [doc = ""] # [inline] pub fn get_packet_peer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_packet_peer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The manner in which to send packets to the `target_peer`. See [enum TransferMode]."] # [doc = ""] # [inline] pub fn transfer_mode (& self) -> crate :: generated :: networked_multiplayer_peer :: TransferMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_transfer_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: networked_multiplayer_peer :: TransferMode (ret) } } # [doc = "Returns the ID of this [NetworkedMultiplayerPeer]."] # [doc = ""] # [inline] pub fn get_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_unique_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this [NetworkedMultiplayerPeer] refuses new connections."] # [doc = ""] # [inline] pub fn is_refusing_new_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . is_refusing_new_connections ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Waits up to 1 second to receive a new network event."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, this [NetworkedMultiplayerPeer] refuses new connections."] # [doc = ""] # [inline] pub fn set_refuse_new_connections (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_refuse_new_connections ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets the peer to which packets will be sent.\nThe `id` can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]."] # [doc = ""] # [inline] pub fn set_target_peer (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_target_peer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "The manner in which to send packets to the `target_peer`. See [enum TransferMode]."] # [doc = ""] # [inline] pub fn set_transfer_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_transfer_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerPeer { } unsafe impl GodotObject for NetworkedMultiplayerPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerPeer" } } impl std :: ops :: Deref for NetworkedMultiplayerPeer { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for NetworkedMultiplayerPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NetworkedMultiplayerPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_connection_status : * mut sys :: godot_method_bind , pub get_packet_peer : * mut sys :: godot_method_bind , pub get_transfer_mode : * mut sys :: godot_method_bind , pub get_unique_id : * mut sys :: godot_method_bind , pub is_refusing_new_connections : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_refuse_new_connections : * mut sys :: godot_method_bind , pub set_target_peer : * mut sys :: godot_method_bind , pub set_transfer_mode : * mut sys :: godot_method_bind } impl NetworkedMultiplayerPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NetworkedMultiplayerPeerMethodTable = NetworkedMultiplayerPeerMethodTable { class_constructor : None , get_connection_status : 0 as * mut sys :: godot_method_bind , get_packet_peer : 0 as * mut sys :: godot_method_bind , get_transfer_mode : 0 as * mut sys :: godot_method_bind , get_unique_id : 0 as * mut sys :: godot_method_bind , is_refusing_new_connections : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_refuse_new_connections : 0 as * mut sys :: godot_method_bind , set_target_peer : 0 as * mut sys :: godot_method_bind , set_transfer_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { NetworkedMultiplayerPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NetworkedMultiplayerPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_connection_status = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_status\0" . as_ptr () as * const c_char) ; table . get_packet_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_peer\0" . as_ptr () as * const c_char) ; table . get_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_mode\0" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\0" . as_ptr () as * const c_char) ; table . is_refusing_new_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_connections\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_refuse_new_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_connections\0" . as_ptr () as * const c_char) ; table . set_target_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_target_peer\0" . as_ptr () as * const c_char) ; table . set_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:826:23674 [INFO] [stdout] | [INFO] [stdout] 826 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 826 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:832:12810 [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 CanvasItemMaterial` inherits `Material` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_canvasitemmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCanvasItemMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasItemMaterial { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const MIX : BlendMode = BlendMode (0i64) ; pub const ADD : BlendMode = BlendMode (1i64) ; pub const SUB : BlendMode = BlendMode (2i64) ; pub const MUL : BlendMode = BlendMode (3i64) ; pub const PREMULT_ALPHA : BlendMode = BlendMode (4i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightMode (pub i64) ; impl LightMode { pub const NORMAL : LightMode = LightMode (0i64) ; pub const UNSHADED : LightMode = LightMode (1i64) ; pub const LIGHT_ONLY : LightMode = LightMode (2i64) ; } impl From < i64 > for LightMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightMode > for i64 { # [inline] fn from (v : LightMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CanvasItemMaterial { pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_PREMULT_ALPHA : i64 = 4i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const LIGHT_MODE_LIGHT_ONLY : i64 = 2i64 ; pub const LIGHT_MODE_NORMAL : i64 = 0i64 ; pub const LIGHT_MODE_UNSHADED : i64 = 1i64 ; } impl CanvasItemMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasItemMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The manner in which a material's rendering is applied to underlying textures."] # [doc = ""] # [inline] pub fn blend_mode (& self) -> crate :: generated :: canvas_item_material :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_blend_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: canvas_item_material :: BlendMode (ret) } } # [doc = "The manner in which material reacts to lighting."] # [doc = ""] # [inline] pub fn light_mode (& self) -> crate :: generated :: canvas_item_material :: LightMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_light_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: canvas_item_material :: LightMode (ret) } } # [doc = "The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_h_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_h_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_v_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_v_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.\nThis property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes."] # [doc = ""] # [inline] pub fn particles_animation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_animation ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The manner in which a material's rendering is applied to underlying textures."] # [doc = ""] # [inline] pub fn set_blend_mode (& self , blend_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_blend_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , blend_mode) ; } } # [doc = "The manner in which material reacts to lighting."] # [doc = ""] # [inline] pub fn set_light_mode (& self , light_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_light_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , light_mode) ; } } # [doc = "The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_h_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_h_frames ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_loop (& self , _loop : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_loop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _loop) ; } } # [doc = "The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [member particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_v_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_v_frames ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frames) ; } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.\nThis property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes."] # [doc = ""] # [inline] pub fn set_particles_animation (& self , particles_anim : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_animation ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , particles_anim) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasItemMaterial { } unsafe impl GodotObject for CanvasItemMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CanvasItemMaterial" } } impl std :: ops :: Deref for CanvasItemMaterial { type Target = crate :: generated :: material :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasItemMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: material :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: material :: Material > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for CanvasItemMaterial { } impl Instanciable for CanvasItemMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CanvasItemMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasItemMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_blend_mode : * mut sys :: godot_method_bind , pub get_light_mode : * mut sys :: godot_method_bind , pub get_particles_anim_h_frames : * mut sys :: godot_method_bind , pub get_particles_anim_loop : * mut sys :: godot_method_bind , pub get_particles_anim_v_frames : * mut sys :: godot_method_bind , pub get_particles_animation : * mut sys :: godot_method_bind , pub set_blend_mode : * mut sys :: godot_method_bind , pub set_light_mode : * mut sys :: godot_method_bind , pub set_particles_anim_h_frames : * mut sys :: godot_method_bind , pub set_particles_anim_loop : * mut sys :: godot_method_bind , pub set_particles_anim_v_frames : * mut sys :: godot_method_bind , pub set_particles_animation : * mut sys :: godot_method_bind } impl CanvasItemMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasItemMaterialMethodTable = CanvasItemMaterialMethodTable { class_constructor : None , get_blend_mode : 0 as * mut sys :: godot_method_bind , get_light_mode : 0 as * mut sys :: godot_method_bind , get_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , get_particles_anim_loop : 0 as * mut sys :: godot_method_bind , get_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , get_particles_animation : 0 as * mut sys :: godot_method_bind , set_blend_mode : 0 as * mut sys :: godot_method_bind , set_light_mode : 0 as * mut sys :: godot_method_bind , set_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , set_particles_anim_loop : 0 as * mut sys :: godot_method_bind , set_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , set_particles_animation : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CanvasItemMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasItemMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mode\0" . as_ptr () as * const c_char) ; table . get_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . get_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . get_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . get_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_animation\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mode\0" . as_ptr () as * const c_char) ; table . set_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . set_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . set_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . set_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_animation\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:838:3598 [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 GDScriptFunctionState` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gdscriptfunctionstate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDScriptFunctionState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDScriptFunctionState { this : RawObject < Self > , } impl GDScriptFunctionState { # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self , extended_check : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptFunctionStateMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallptr_bool_bool (method_bind , self . this . sys () . as_ptr () , extended_check) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn resume (& self , arg : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptFunctionStateMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallptr_var_var (method_bind , self . this . sys () . as_ptr () , arg . owned_to_variant ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GDScriptFunctionState { } unsafe impl GodotObject for GDScriptFunctionState { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScriptFunctionState" } } impl std :: ops :: Deref for GDScriptFunctionState { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDScriptFunctionState { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDScriptFunctionState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDScriptFunctionStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_valid : * mut sys :: godot_method_bind , pub resume : * mut sys :: godot_method_bind } impl GDScriptFunctionStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDScriptFunctionStateMethodTable = GDScriptFunctionStateMethodTable { class_constructor : None , is_valid : 0 as * mut sys :: godot_method_bind , resume : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GDScriptFunctionStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDScriptFunctionState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:844:5046 [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 CapsuleShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_capsuleshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleShape { this : RawObject < Self > , } impl CapsuleShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape { } unsafe impl GodotObject for CapsuleShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape" } } impl std :: ops :: Deref for CapsuleShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleShape { } impl Instanciable for CapsuleShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CapsuleShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CapsuleShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleShapeMethodTable = CapsuleShapeMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CapsuleShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:856:6499 [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 PacketPeerStream` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packetpeerstream.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerStream inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerStream { this : RawObject < Self > , } impl PacketPeerStream { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerStreamMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn input_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_input_buffer_max_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn output_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_output_buffer_max_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The wrapped [StreamPeer] object."] # [doc = ""] # [inline] pub fn stream_peer (& self) -> Option < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_stream_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer :: StreamPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_buffer_max_size (& self , max_size_bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_input_buffer_max_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_output_buffer_max_size (& self , max_size_bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_output_buffer_max_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes) ; } } # [doc = "The wrapped [StreamPeer] object."] # [doc = ""] # [inline] pub fn set_stream_peer (& self , peer : impl AsArg < crate :: generated :: stream_peer :: StreamPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_stream_peer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerStream { } unsafe impl GodotObject for PacketPeerStream { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerStream" } } impl std :: ops :: Deref for PacketPeerStream { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerStream { } impl Instanciable for PacketPeerStream { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PacketPeerStream :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerStreamMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_input_buffer_max_size : * mut sys :: godot_method_bind , pub get_output_buffer_max_size : * mut sys :: godot_method_bind , pub get_stream_peer : * mut sys :: godot_method_bind , pub set_input_buffer_max_size : * mut sys :: godot_method_bind , pub set_output_buffer_max_size : * mut sys :: godot_method_bind , pub set_stream_peer : * mut sys :: godot_method_bind } impl PacketPeerStreamMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerStreamMethodTable = PacketPeerStreamMethodTable { class_constructor : None , get_input_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_output_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_stream_peer : 0 as * mut sys :: godot_method_bind , set_input_buffer_max_size : 0 as * mut sys :: godot_method_bind , set_output_buffer_max_size : 0 as * mut sys :: godot_method_bind , set_stream_peer : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PacketPeerStreamMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerStream\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_peer\0" . as_ptr () as * const c_char) ; table . set_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_peer\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:862:8095 [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 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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:868:4580 [INFO] [stdout] | [INFO] [stdout] 868 | ...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] 868 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:874:18273 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:880:9158 [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 CollisionShape2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_collisionshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CollisionShape2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionShape2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionShape2D { this : RawObject < Self > , } impl CollisionShape2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity."] # [doc = ""] # [inline] pub fn one_way_collision_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . get_one_way_collision_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape_2d :: Shape2D , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom)."] # [doc = ""] # [inline] pub fn is_one_way_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . is_one_way_collision_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom)."] # [doc = ""] # [inline] pub fn set_one_way_collision (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_one_way_collision ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity."] # [doc = ""] # [inline] pub fn set_one_way_collision_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_one_way_collision_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape_2d :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionShape2D { } unsafe impl GodotObject for CollisionShape2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionShape2D" } } impl QueueFree for CollisionShape2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionShape2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionShape2D { } impl Instanciable for CollisionShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CollisionShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_one_way_collision_margin : * mut sys :: godot_method_bind , pub get_shape : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub is_one_way_collision_enabled : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_one_way_collision : * mut sys :: godot_method_bind , pub set_one_way_collision_margin : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl CollisionShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionShape2DMethodTable = CollisionShape2DMethodTable { class_constructor : None , get_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , get_shape : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , is_one_way_collision_enabled : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_one_way_collision : 0 as * mut sys :: godot_method_bind , set_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CollisionShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision\0" . as_ptr () as * const c_char) ; table . set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:886:3805 [INFO] [stdout] | [INFO] [stdout] 886 | ...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] 886 | # [doc = "`core class VisualShaderNodeOuterProduct` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeouterproduct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeOuterProduct inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOuterProduct { this : RawObject < Self > , } impl VisualShaderNodeOuterProduct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeOuterProductMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeOuterProduct { } unsafe impl GodotObject for VisualShaderNodeOuterProduct { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOuterProduct" } } impl std :: ops :: Deref for VisualShaderNodeOuterProduct { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOuterProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeOuterProduct { } impl Instanciable for VisualShaderNodeOuterProduct { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeOuterProduct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeOuterProductMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeOuterProductMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeOuterProductMethodTable = VisualShaderNodeOuterProductMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeOuterProductMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeOuterProduct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:892:7086 [INFO] [stdout] | [INFO] [stdout] 892 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 892 | # [doc = "`core class DynamicFontData` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_dynamicfontdata.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDynamicFontData inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DynamicFontData { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Hinting (pub i64) ; impl Hinting { pub const NONE : Hinting = Hinting (0i64) ; pub const LIGHT : Hinting = Hinting (1i64) ; pub const NORMAL : Hinting = Hinting (2i64) ; } impl From < i64 > for Hinting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Hinting > for i64 { # [inline] fn from (v : Hinting) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DynamicFontData { pub const HINTING_LIGHT : i64 = 1i64 ; pub const HINTING_NONE : i64 = 0i64 ; pub const HINTING_NORMAL : i64 = 2i64 ; } impl DynamicFontData { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DynamicFontDataMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The path to the vector font file."] # [doc = ""] # [inline] pub fn font_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . get_font_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The font hinting mode used by FreeType. See [enum Hinting] for options."] # [doc = ""] # [inline] pub fn hinting (& self) -> crate :: generated :: dynamic_font_data :: Hinting { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . get_hinting ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: dynamic_font_data :: Hinting (ret) } } # [doc = "If `true`, the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one)."] # [doc = ""] # [inline] pub fn is_antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . is_antialiased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one)."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "The path to the vector font file."] # [doc = ""] # [inline] pub fn set_font_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_font_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The font hinting mode used by FreeType. See [enum Hinting] for options."] # [doc = ""] # [inline] pub fn set_hinting (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_hinting ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DynamicFontData { } unsafe impl GodotObject for DynamicFontData { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DynamicFontData" } } impl std :: ops :: Deref for DynamicFontData { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DynamicFontData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: object :: Object > for DynamicFontData { } impl Instanciable for DynamicFontData { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { DynamicFontData :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DynamicFontDataMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_font_path : * mut sys :: godot_method_bind , pub get_hinting : * mut sys :: godot_method_bind , pub is_antialiased : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_font_path : * mut sys :: godot_method_bind , pub set_hinting : * mut sys :: godot_method_bind } impl DynamicFontDataMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DynamicFontDataMethodTable = DynamicFontDataMethodTable { class_constructor : None , get_font_path : 0 as * mut sys :: godot_method_bind , get_hinting : 0 as * mut sys :: godot_method_bind , is_antialiased : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_font_path : 0 as * mut sys :: godot_method_bind , set_hinting : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { DynamicFontDataMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DynamicFontData\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_font_path = (gd_api . godot_method_bind_get_method) (class_name , "get_font_path\0" . as_ptr () as * const c_char) ; table . get_hinting = (gd_api . godot_method_bind_get_method) (class_name , "get_hinting\0" . as_ptr () as * const c_char) ; table . is_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "is_antialiased\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_font_path = (gd_api . godot_method_bind_get_method) (class_name , "set_font_path\0" . as_ptr () as * const c_char) ; table . set_hinting = (gd_api . godot_method_bind_get_method) (class_name , "set_hinting\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:898:12090 [INFO] [stdout] | [INFO] [stdout] 898 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 898 | # [doc = "`core class SpringArm` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_springarm.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SpringArm` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpringArm inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpringArm { this : RawObject < Self > , } impl SpringArm { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpringArmMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the [PhysicsBody] object with the given [RID] to the list of [PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub fn add_excluded_object (& self , RID : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . add_excluded_object ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , RID) ; } } # [doc = "Clears the list of [PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub fn clear_excluded_objects (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . clear_excluded_objects ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the spring arm's current length."] # [doc = ""] # [inline] pub fn get_hit_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_hit_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.\nTo know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState] documentation."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "When the collision check is made, a candidate length for the SpringArm is given.\nThe margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.\nThis margin is useful for when the SpringArm has a [Camera] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [Camera] would be placed close to the point of collision."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Removes the given [RID] from the list of [PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub fn remove_excluded_object (& self , RID : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . remove_excluded_object ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , RID) ; ret as _ } } # [doc = "The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.\nTo know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState] documentation."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , length) ; } } # [doc = "When the collision check is made, a candidate length for the SpringArm is given.\nThe margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.\nThis margin is useful for when the SpringArm has a [Camera] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [Camera] would be placed close to the point of collision."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The [Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpringArm { } unsafe impl GodotObject for SpringArm { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpringArm" } } impl QueueFree for SpringArm { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpringArm { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpringArm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SpringArm { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpringArm { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpringArm { } impl Instanciable for SpringArm { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SpringArm :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpringArmMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_excluded_object : * mut sys :: godot_method_bind , pub clear_excluded_objects : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_hit_length : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_shape : * mut sys :: godot_method_bind , pub remove_excluded_object : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl SpringArmMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpringArmMethodTable = SpringArmMethodTable { class_constructor : None , add_excluded_object : 0 as * mut sys :: godot_method_bind , clear_excluded_objects : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_hit_length : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_shape : 0 as * mut sys :: godot_method_bind , remove_excluded_object : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SpringArmMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpringArm\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_excluded_object = (gd_api . godot_method_bind_get_method) (class_name , "add_excluded_object\0" . as_ptr () as * const c_char) ; table . clear_excluded_objects = (gd_api . godot_method_bind_get_method) (class_name , "clear_excluded_objects\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_hit_length = (gd_api . godot_method_bind_get_method) (class_name , "get_hit_length\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . remove_excluded_object = (gd_api . godot_method_bind_get_method) (class_name , "remove_excluded_object\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:904:102938 [INFO] [stdout] | [INFO] [stdout] 904 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 singleton class OS` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_os.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nOS inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OS { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HandleType (pub i64) ; impl HandleType { pub const APPLICATION_HANDLE : HandleType = HandleType (0i64) ; pub const DISPLAY_HANDLE : HandleType = HandleType (1i64) ; pub const WINDOW_HANDLE : HandleType = HandleType (2i64) ; pub const WINDOW_VIEW : HandleType = HandleType (3i64) ; pub const OPENGL_CONTEXT : HandleType = HandleType (4i64) ; } impl From < i64 > for HandleType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HandleType > for i64 { # [inline] fn from (v : HandleType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Month (pub i64) ; impl Month { pub const JANUARY : Month = Month (1i64) ; pub const FEBRUARY : Month = Month (2i64) ; pub const MARCH : Month = Month (3i64) ; pub const APRIL : Month = Month (4i64) ; pub const MAY : Month = Month (5i64) ; pub const JUNE : Month = Month (6i64) ; pub const JULY : Month = Month (7i64) ; pub const AUGUST : Month = Month (8i64) ; pub const SEPTEMBER : Month = Month (9i64) ; pub const OCTOBER : Month = Month (10i64) ; pub const NOVEMBER : Month = Month (11i64) ; pub const DECEMBER : Month = Month (12i64) ; } impl From < i64 > for Month { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Month > for i64 { # [inline] fn from (v : Month) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PowerState (pub i64) ; impl PowerState { pub const UNKNOWN : PowerState = PowerState (0i64) ; pub const ON_BATTERY : PowerState = PowerState (1i64) ; pub const NO_BATTERY : PowerState = PowerState (2i64) ; pub const CHARGING : PowerState = PowerState (3i64) ; pub const CHARGED : PowerState = PowerState (4i64) ; } impl From < i64 > for PowerState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PowerState > for i64 { # [inline] fn from (v : PowerState) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ScreenOrientation (pub i64) ; impl ScreenOrientation { pub const LANDSCAPE : ScreenOrientation = ScreenOrientation (0i64) ; pub const PORTRAIT : ScreenOrientation = ScreenOrientation (1i64) ; pub const REVERSE_LANDSCAPE : ScreenOrientation = ScreenOrientation (2i64) ; pub const REVERSE_PORTRAIT : ScreenOrientation = ScreenOrientation (3i64) ; pub const SENSOR_LANDSCAPE : ScreenOrientation = ScreenOrientation (4i64) ; pub const SENSOR_PORTRAIT : ScreenOrientation = ScreenOrientation (5i64) ; pub const SENSOR : ScreenOrientation = ScreenOrientation (6i64) ; } impl From < i64 > for ScreenOrientation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ScreenOrientation > for i64 { # [inline] fn from (v : ScreenOrientation) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SystemDir (pub i64) ; impl SystemDir { pub const DESKTOP : SystemDir = SystemDir (0i64) ; pub const DCIM : SystemDir = SystemDir (1i64) ; pub const DOCUMENTS : SystemDir = SystemDir (2i64) ; pub const DOWNLOADS : SystemDir = SystemDir (3i64) ; pub const MOVIES : SystemDir = SystemDir (4i64) ; pub const MUSIC : SystemDir = SystemDir (5i64) ; pub const PICTURES : SystemDir = SystemDir (6i64) ; pub const RINGTONES : SystemDir = SystemDir (7i64) ; } impl From < i64 > for SystemDir { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SystemDir > for i64 { # [inline] fn from (v : SystemDir) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct VideoDriver (pub i64) ; impl VideoDriver { pub const GLES3 : VideoDriver = VideoDriver (0i64) ; pub const GLES2 : VideoDriver = VideoDriver (1i64) ; } impl From < i64 > for VideoDriver { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < VideoDriver > for i64 { # [inline] fn from (v : VideoDriver) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Weekday (pub i64) ; impl Weekday { pub const SUNDAY : Weekday = Weekday (0i64) ; pub const MONDAY : Weekday = Weekday (1i64) ; pub const TUESDAY : Weekday = Weekday (2i64) ; pub const WEDNESDAY : Weekday = Weekday (3i64) ; pub const THURSDAY : Weekday = Weekday (4i64) ; pub const FRIDAY : Weekday = Weekday (5i64) ; pub const SATURDAY : Weekday = Weekday (6i64) ; } impl From < i64 > for Weekday { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Weekday > for i64 { # [inline] fn from (v : Weekday) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OS { pub const APPLICATION_HANDLE : i64 = 0i64 ; pub const DAY_FRIDAY : i64 = 5i64 ; pub const DAY_MONDAY : i64 = 1i64 ; pub const DAY_SATURDAY : i64 = 6i64 ; pub const DAY_SUNDAY : i64 = 0i64 ; pub const DAY_THURSDAY : i64 = 4i64 ; pub const DAY_TUESDAY : i64 = 2i64 ; pub const DAY_WEDNESDAY : i64 = 3i64 ; pub const DISPLAY_HANDLE : i64 = 1i64 ; pub const MONTH_APRIL : i64 = 4i64 ; pub const MONTH_AUGUST : i64 = 8i64 ; pub const MONTH_DECEMBER : i64 = 12i64 ; pub const MONTH_FEBRUARY : i64 = 2i64 ; pub const MONTH_JANUARY : i64 = 1i64 ; pub const MONTH_JULY : i64 = 7i64 ; pub const MONTH_JUNE : i64 = 6i64 ; pub const MONTH_MARCH : i64 = 3i64 ; pub const MONTH_MAY : i64 = 5i64 ; pub const MONTH_NOVEMBER : i64 = 11i64 ; pub const MONTH_OCTOBER : i64 = 10i64 ; pub const MONTH_SEPTEMBER : i64 = 9i64 ; pub const OPENGL_CONTEXT : i64 = 4i64 ; pub const POWERSTATE_CHARGED : i64 = 4i64 ; pub const POWERSTATE_CHARGING : i64 = 3i64 ; pub const POWERSTATE_NO_BATTERY : i64 = 2i64 ; pub const POWERSTATE_ON_BATTERY : i64 = 1i64 ; pub const POWERSTATE_UNKNOWN : i64 = 0i64 ; pub const SCREEN_ORIENTATION_LANDSCAPE : i64 = 0i64 ; pub const SCREEN_ORIENTATION_PORTRAIT : i64 = 1i64 ; pub const SCREEN_ORIENTATION_REVERSE_LANDSCAPE : i64 = 2i64 ; pub const SCREEN_ORIENTATION_REVERSE_PORTRAIT : i64 = 3i64 ; pub const SCREEN_ORIENTATION_SENSOR : i64 = 6i64 ; pub const SCREEN_ORIENTATION_SENSOR_LANDSCAPE : i64 = 4i64 ; pub const SCREEN_ORIENTATION_SENSOR_PORTRAIT : i64 = 5i64 ; pub const SYSTEM_DIR_DCIM : i64 = 1i64 ; pub const SYSTEM_DIR_DESKTOP : i64 = 0i64 ; pub const SYSTEM_DIR_DOCUMENTS : i64 = 2i64 ; pub const SYSTEM_DIR_DOWNLOADS : i64 = 3i64 ; pub const SYSTEM_DIR_MOVIES : i64 = 4i64 ; pub const SYSTEM_DIR_MUSIC : i64 = 5i64 ; pub const SYSTEM_DIR_PICTURES : i64 = 6i64 ; pub const SYSTEM_DIR_RINGTONES : i64 = 7i64 ; pub const VIDEO_DRIVER_GLES2 : i64 = 1i64 ; pub const VIDEO_DRIVER_GLES3 : i64 = 0i64 ; pub const WINDOW_HANDLE : i64 = 2i64 ; pub const WINDOW_VIEW : i64 = 3i64 ; } impl OS { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("OS\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.\n# Default Arguments\n* `title` - `\"Alert!\"`"] # [doc = ""] # [inline] pub fn alert (& self , text : impl Into < GodotString > , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . alert ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , text . into () , title . into ()) ; } } # [doc = "Returns `true` if the host OS allows drawing."] # [doc = ""] # [inline] pub fn can_draw (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . can_draw ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the current host platform is using multiple threads."] # [doc = ""] # [inline] pub fn can_use_threads (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . can_use_threads ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Centers the window on the screen if in windowed mode."] # [doc = ""] # [inline] pub fn center_window (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . center_window ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shuts down system MIDI driver.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn close_midi_inputs (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . close_midi_inputs ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Delay execution of the current thread by `msec` milliseconds."] # [doc = ""] # [inline] pub fn delay_msec (& self , msec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . delay_msec ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , msec) ; } } # [doc = "Delay execution of the current thread by `usec` microseconds."] # [doc = ""] # [inline] pub fn delay_usec (& self , usec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . delay_usec ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usec) ; } } # [doc = "Dumps the memory allocation ringlist to a file (only works in debug).\nEntry format per line: \"Address - Size - Description\"."] # [doc = ""] # [inline] pub fn dump_memory_to_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . dump_memory_to_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "Dumps all used resources to file (only works in debug).\nEntry format per line: \"Resource Type : Resource Location\".\nAt the end of the file is a statistic of all used Resource Types."] # [doc = ""] # [inline] pub fn dump_resources_to_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . dump_resources_to_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nExecute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable.\nThe arguments are used in the given order and separated by a space, so `OS.execute(\"ping\", [\"-w\", \"3\", \"godotengine.org\"], false)` will resolve to `ping -w 3 godotengine.org` in the system's shell.\nThis method has slightly different behavior based on whether the `blocking` mode is enabled.\nIf `blocking` is `true`, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the `output` array as a single string. When the process terminates, the Godot thread will resume execution.\nIf `blocking` is `false`, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so `output` will be empty.\nThe return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return `-1` or another exit code.\nExample of blocking mode and retrieving the shell output:\n```gdscript\nvar output = []\nvar exit_code = OS.execute(\"ls\", [\"-l\", \"/tmp\"], true, output)\n```\nExample of non-blocking mode, running another instance of the project and storing its process ID:\n```gdscript\nvar pid = OS.execute(OS.get_executable_path(), [], false)\n```\nIf you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example:\n```gdscript\nOS.execute(\"CMD.exe\", [\"/C\", \"cd %TEMP% && dir\"], true, output)\n```\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows.\n# Default Arguments\n* `blocking` - `true`\n* `output` - `[ ]`\n* `read_stderr` - `false`"] # [doc = ""] # [inline] pub fn execute (& self , path : impl Into < GodotString > , arguments : StringArray , blocking : bool , output : VariantArray , read_stderr : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . execute ; let ret = crate :: icalls :: icallptr_i64_str_strarr_bool_arr_bool (method_bind , self . this . sys () . as_ptr () , path . into () , arguments , blocking , output , read_stderr) ; ret as _ } } # [doc = "Returns the scancode of the given string (e.g. \"Escape\")."] # [doc = ""] # [inline] pub fn find_scancode_from_string (& self , string : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . find_scancode_from_string ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; ret as _ } } # [doc = "Returns the total number of available audio drivers."] # [doc = ""] # [inline] pub fn get_audio_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_audio_driver_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the audio driver name for the given index."] # [doc = ""] # [inline] pub fn get_audio_driver_name (& self , driver : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_audio_driver_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , driver) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, removes the window frame.\n**Note:** Setting `window_borderless` to `false` disables per-pixel transparency."] # [doc = ""] # [inline] pub fn borderless_window (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_borderless_window ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The clipboard from the host OS. Might be unavailable on some platforms."] # [doc = ""] # [inline] pub fn clipboard (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_clipboard ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the command-line arguments passed to the engine.\nCommand-line arguments can be written in any form, including both `--key value` and `--key=value` forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.\nYou can also incorporate environment variables using the [method get_environment] method.\nYou can set `editor/main_run_args` in the Project Settings to define command-line arguments to be passed by the editor when running the project.\nHere's a minimal example on how to parse command-line arguments into a dictionary using the `--key=value` form for arguments:\n```gdscript\nvar arguments = {}\nfor argument in OS.get_cmdline_args():\n if argument.find(\"=\") > -1:\n var key_value = argument.split(\"=\")\n arguments[key_value[0].lstrip(\"--\")] = key_value[1]\n```"] # [doc = ""] # [inline] pub fn get_cmdline_args (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_cmdline_args ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns an array of MIDI device names.\nThe returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_connected_midi_inputs (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_connected_midi_inputs ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "The current screen index (starting from 0)."] # [doc = ""] # [inline] pub fn current_screen (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_screen ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current tablet drvier in use."] # [doc = ""] # [inline] pub fn current_tablet_driver (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_tablet_driver ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the currently used video driver, using one of the values from [enum VideoDriver]."] # [doc = ""] # [inline] pub fn get_current_video_driver (& self) -> crate :: generated :: os :: VideoDriver { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_video_driver ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: VideoDriver (ret) } } # [doc = "Returns current date as a dictionary of keys: `year`, `month`, `day`, `weekday`, `dst` (Daylight Savings Time).\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_date (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_date ; let ret = crate :: icalls :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [doc = "Returns current datetime as a dictionary of keys: `year`, `month`, `day`, `weekday`, `dst` (Daylight Savings Time), `hour`, `minute`, `second`.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_datetime (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_datetime ; let ret = crate :: icalls :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [doc = "Gets a dictionary of time values corresponding to the given UNIX epoch time (in seconds).\nThe returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch."] # [doc = ""] # [inline] pub fn get_datetime_from_unix_time (& self , unix_time_val : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_datetime_from_unix_time ; let ret = crate :: icalls :: icallptr_dict_i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the total amount of dynamic memory used (only works in debug)."] # [doc = ""] # [inline] pub fn get_dynamic_memory_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_dynamic_memory_usage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an environment variable."] # [doc = ""] # [inline] pub fn get_environment (& self , variable : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the path to the current engine executable."] # [doc = ""] # [inline] pub fn get_executable_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_executable_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The exit code passed to the OS when the main loop exits. By convention, an exit code of `0` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).\n**Note:** This value will be ignored if using [method SceneTree.quit] with an `exit_code` argument passed."] # [doc = ""] # [inline] pub fn exit_code (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_exit_code ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "With this function you can get the list of dangerous permissions that have been granted to the Android application.\n**Note:** This method is implemented on Android."] # [doc = ""] # [inline] pub fn get_granted_permissions (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_granted_permissions ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.\n[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_ime_selection (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ime_selection ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the IME intermediate composition string.\n[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_ime_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ime_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the current latin keyboard variant as a String.\nPossible return values are: `\"QWERTY\"`, `\"AZERTY\"`, `\"QZERTY\"`, `\"DVORAK\"`, `\"NEO\"`, `\"COLEMAK\"` or `\"ERROR\"`.\n**Note:** This method is implemented on Linux, macOS and Windows. Returns `\"QWERTY\"` on unsupported platforms."] # [doc = ""] # [inline] pub fn get_latin_keyboard_variant (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_latin_keyboard_variant ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the host OS locale."] # [doc = ""] # [inline] pub fn get_locale (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_locale ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage."] # [doc = ""] # [inline] pub fn low_processor_usage_mode_sleep_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_low_processor_usage_mode_sleep_usec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn max_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_max_window_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn min_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_min_window_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the model name of the current device.\n**Note:** This method is implemented on Android and iOS. Returns `\"GenericDevice\"` on unsupported platforms."] # [doc = ""] # [inline] pub fn get_model_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_model_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the host OS. Possible values are: `\"Android\"`, `\"iOS\"`, `\"HTML5\"`, `\"OSX\"`, `\"Server\"`, `\"Windows\"`, `\"UWP\"`, `\"X11\"`."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_native_handle (& self , handle_type : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_native_handle ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , handle_type) ; ret as _ } } # [doc = "Returns the amount of battery left in the device as a percentage. Returns `-1` if power state is unknown.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_percent_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_percent_left ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an estimate of the time left in seconds before the device runs out of battery. Returns `-1` if power state is unknown.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_seconds_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_seconds_left ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the current state of the device regarding battery and power. See [enum PowerState] constants.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_state (& self) -> crate :: generated :: os :: PowerState { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_state ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: PowerState (ret) } } # [doc = "Returns the project's process ID.\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_process_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_process_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of threads available on the host machine."] # [doc = ""] # [inline] pub fn get_processor_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_processor_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the window size including decorations like window borders."] # [doc = ""] # [inline] pub fn get_real_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_real_window_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the given scancode as a string (e.g. Return values: `\"Escape\"`, `\"Shift+Escape\"`).\nSee also [member InputEventKey.scancode] and [method InputEventKey.get_scancode_with_modifiers]."] # [doc = ""] # [inline] pub fn get_scancode_string (& self , code : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_scancode_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , code) ; GodotString :: from_sys (ret) } } # [doc = "Returns the number of displays attached to the host machine."] # [doc = ""] # [inline] pub fn get_screen_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the dots per inch density of the specified screen. If `screen` is `-1` (the default value), the current screen will be used.\nOn Android devices, the actual screen densities are grouped into six generalized densities:\n```gdscript\n ldpi - 120 dpi\n mdpi - 160 dpi\n hdpi - 240 dpi\n xhdpi - 320 dpi\n xxhdpi - 480 dpi\nxxxhdpi - 640 dpi\n```\n**Note:** This method is implemented on Android, Linux, macOS and Windows. Returns `72` on unsupported platforms.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_dpi (& self , screen : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_dpi ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; ret as _ } } # [doc = "Return the greatest scale factor of all screens.\n**Note:** On macOS returned value is `2.0` if there is at least one hiDPI (Retina) screen in the system, and `1.0` in all other cases.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_screen_max_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_max_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The current screen orientation."] # [doc = ""] # [inline] pub fn screen_orientation (& self) -> crate :: generated :: os :: ScreenOrientation { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_orientation ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: os :: ScreenOrientation (ret) } } # [doc = "Returns the position of the specified screen by index. If `screen` is `-1` (the default value), the current screen will be used.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_position (& self , screen : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; mem :: transmute (ret) } } # [doc = "Return the scale factor of the specified screen by index. If `screen` is `-1` (the default value), the current screen will be used.\n**Note:** On macOS returned value is `2.0` for hiDPI (Retina) screen, and `1.0` for all other cases.\n**Note:** This method is implemented on macOS.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_scale (& self , screen : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_scale ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; ret as _ } } # [doc = "Returns the dimensions in pixels of the specified screen. If `screen` is `-1` (the default value), the current screen will be used.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_size (& self , screen : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_size ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; mem :: transmute (ret) } } # [doc = "Returns the amount of time in milliseconds it took for the boot logo to appear."] # [doc = ""] # [inline] pub fn get_splash_tick_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_splash_tick_msec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the maximum amount of static memory used (only works in debug)."] # [doc = ""] # [inline] pub fn get_static_memory_peak_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_static_memory_peak_usage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of static memory being used by the program in bytes."] # [doc = ""] # [inline] pub fn get_static_memory_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_static_memory_usage ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir].\n**Note:** This method is implemented on Android, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_system_dir (& self , dir : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_dir ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , dir) ; GodotString :: from_sys (ret) } } # [doc = "Returns the epoch time of the operating system in milliseconds."] # [doc = ""] # [inline] pub fn get_system_time_msecs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_time_msecs ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the epoch time of the operating system in seconds."] # [doc = ""] # [inline] pub fn get_system_time_secs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_time_secs ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total number of available tablet drivers.\n**Note:** This method is implemented on Windows."] # [doc = ""] # [inline] pub fn get_tablet_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_tablet_driver_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the tablet driver name for the given index.\n**Note:** This method is implemented on Windows."] # [doc = ""] # [inline] pub fn get_tablet_driver_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_tablet_driver_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_thread_caller_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_thread_caller_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of time passed in milliseconds since the engine started."] # [doc = ""] # [inline] pub fn get_ticks_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ticks_msec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of time passed in microseconds since the engine started."] # [doc = ""] # [inline] pub fn get_ticks_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ticks_usec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns current time as a dictionary of keys: hour, minute, second.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_time (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_time ; let ret = crate :: icalls :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , utc) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the current time zone as a dictionary with the keys: bias and name."] # [doc = ""] # [inline] pub fn get_time_zone_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_time_zone_info ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns a string that is unique to the device.\n**Note:** Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet."] # [doc = ""] # [inline] pub fn get_unique_id (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unique_id ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the current UNIX epoch timestamp."] # [doc = ""] # [inline] pub fn get_unix_time (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unix_time ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets an epoch time value from a dictionary of time values.\n`datetime` must be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, `second`.\nYou can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time (`dst`), if present, is ignored."] # [doc = ""] # [inline] pub fn get_unix_time_from_datetime (& self , datetime : Dictionary) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unix_time_from_datetime ; let ret = crate :: icalls :: icallptr_i64_dict (method_bind , self . this . sys () . as_ptr () , datetime) ; ret as _ } } # [doc = "Returns the absolute directory path where user data is written (`user://`).\nOn Linux, this is `~/.local/share/godot/app_userdata/[project_name]`, or `~/.local/share/[custom_name]` if `use_custom_user_dir` is set.\nOn macOS, this is `~/Library/Application Support/Godot/app_userdata/[project_name]`, or `~/Library/Application Support/[custom_name]` if `use_custom_user_dir` is set.\nOn Windows, this is `%APPDATA%\\Godot\\app_userdata\\[project_name]`, or `%APPDATA%\\[custom_name]` if `use_custom_user_dir` is set. `%APPDATA%` expands to `%USERPROFILE%\\AppData\\Roaming`.\nIf the project name is empty, `user://` falls back to `res://`."] # [doc = ""] # [inline] pub fn get_user_data_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_user_data_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the number of video drivers supported on the current platform."] # [doc = ""] # [inline] pub fn get_video_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_video_driver_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the name of the video driver matching the given `driver` index. This index is a value from [enum VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index."] # [doc = ""] # [inline] pub fn get_video_driver_name (& self , driver : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_video_driver_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , driver) ; GodotString :: from_sys (ret) } } # [doc = "Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden."] # [doc = ""] # [inline] pub fn get_virtual_keyboard_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_virtual_keyboard_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window background is transparent and window frame is removed.\nUse `get_tree().get_root().set_transparent_background(true)` to disable main viewport background rendering.\n**Note:** This property has no effect if **Project > Project Settings > Display > Window > Per-pixel transparency > Allowed** setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn window_per_pixel_transparency_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_per_pixel_transparency_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right."] # [doc = ""] # [inline] pub fn window_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns unobscured area of the window where interactive controls should be rendered."] # [doc = ""] # [inline] pub fn get_window_safe_area (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_safe_area ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The size of the window (without counting window manager decorations)."] # [doc = ""] # [inline] pub fn window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Add a new item with text \"label\" to global menu. Use \"_dock\" menu to add item to the macOS dock icon menu.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_add_item (& self , menu : impl Into < GodotString > , label : impl Into < GodotString > , id : impl OwnedToVariant , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_add_item ; let ret = crate :: icalls :: icallptr_void_str_str_var_var (method_bind , self . this . sys () . as_ptr () , menu . into () , label . into () , id . owned_to_variant () , meta . owned_to_variant ()) ; } } # [doc = "Add a separator between items. Separators also occupy an index.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_add_separator (& self , menu : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_add_separator ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , menu . into ()) ; } } # [doc = "Clear the global menu, in effect removing all items.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_clear (& self , menu : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_clear ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , menu . into ()) ; } } # [doc = "Removes the item at index \"idx\" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_remove_item (& self , menu : impl Into < GodotString > , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_remove_item ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , menu . into () , idx) ; } } # [doc = "Returns `true` if an environment variable exists."] # [doc = ""] # [inline] pub fn has_environment (& self , variable : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_environment ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; ret as _ } } # [doc = "Returns `true` if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.\n**Note:** Tag names are case-sensitive."] # [doc = ""] # [inline] pub fn has_feature (& self , tag_name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_feature ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , tag_name . into ()) ; ret as _ } } # [doc = "Returns `true` if the device has a touchscreen or emulates one."] # [doc = ""] # [inline] pub fn has_touchscreen_ui_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_touchscreen_ui_hint ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the platform has a virtual keyboard, `false` otherwise."] # [doc = ""] # [inline] pub fn has_virtual_keyboard (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_virtual_keyboard ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Hides the virtual keyboard if it is shown, does nothing otherwise."] # [doc = ""] # [inline] pub fn hide_virtual_keyboard (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . hide_virtual_keyboard ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor.\nReturns `false` if the Godot binary used to run the project is a [i]release[/i] export template.\nTo check whether the Godot binary used to run the project is an export template (debug or release), use `OS.has_feature(\"standalone\")` instead."] # [doc = ""] # [inline] pub fn is_debug_build (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_debug_build ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile."] # [doc = ""] # [inline] pub fn is_in_low_processor_usage_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_in_low_processor_usage_mode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the engine tries to keep the screen on while the game is running. Useful on mobile."] # [doc = ""] # [inline] pub fn is_keep_screen_on (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_keep_screen_on ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the **OK** button should appear on the left and **Cancel** on the right."] # [doc = ""] # [inline] pub fn is_ok_left_and_cancel_right (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_ok_left_and_cancel_right ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the input scancode corresponds to a Unicode character."] # [doc = ""] # [inline] pub fn is_scancode_unicode (& self , code : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_scancode_unicode ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , code) ; ret as _ } } # [doc = "Returns `true` if the engine was executed with `-v` (verbose stdout)."] # [doc = ""] # [inline] pub fn is_stdout_verbose (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_stdout_verbose ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the `user://` file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable."] # [doc = ""] # [inline] pub fn is_userfs_persistent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_userfs_persistent ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, vertical synchronization (Vsync) is enabled."] # [doc = ""] # [inline] pub fn is_vsync_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_vsync_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true` and `vsync_enabled` is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.\n**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.\n**Note:** This property is only implemented on Windows."] # [doc = ""] # [inline] pub fn is_vsync_via_compositor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_vsync_via_compositor_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the window should always be on top of other windows."] # [doc = ""] # [inline] pub fn is_window_always_on_top (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_always_on_top ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the window is currently focused.\n**Note:** Only implemented on desktop platforms. On other platforms, it will always return `true`."] # [doc = ""] # [inline] pub fn is_window_focused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_focused ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window is fullscreen."] # [doc = ""] # [inline] pub fn is_window_fullscreen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_fullscreen ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window is maximized."] # [doc = ""] # [inline] pub fn is_window_maximized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_maximized ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window is minimized."] # [doc = ""] # [inline] pub fn is_window_minimized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_minimized ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window is resizable by the user."] # [doc = ""] # [inline] pub fn is_window_resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_resizable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns active keyboard layout index.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_current_layout (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_current_layout ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of keyboard layouts.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the ISO-639/BCP-47 language code of the keyboard layout at position `index`.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_language (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_language ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [doc = "Returns the localized name of the keyboard layout at position `index`.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_name (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [doc = "Sets active keyboard layout.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_set_current_layout (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_set_current_layout ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Kill (terminate) the process identified by the given process ID (`pid`), e.g. the one returned by [method execute] in non-blocking mode.\n**Note:** This method can also be used to kill processes that were not spawned by the game.\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn kill (& self , pid : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . kill ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , pid) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Moves the window to the front.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn move_window_to_foreground (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . move_window_to_foreground ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if native video is playing.\n**Note:** This method is implemented on Android and iOS."] # [doc = ""] # [inline] pub fn native_video_is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Pauses native video playback.\n**Note:** This method is implemented on Android and iOS."] # [doc = ""] # [inline] pub fn native_video_pause (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_pause ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Plays native video from the specified path, at the given volume and with audio and subtitle tracks.\n**Note:** This method is implemented on Android and iOS, and the current Android implementation does not support the `volume`, `audio_track` and `subtitle_track` options."] # [doc = ""] # [inline] pub fn native_video_play (& self , path : impl Into < GodotString > , volume : f64 , audio_track : impl Into < GodotString > , subtitle_track : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_play ; let ret = crate :: icalls :: icallptr_i64_str_f64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , volume , audio_track . into () , subtitle_track . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Stops native video playback.\n**Note:** This method is implemented on Android and iOS."] # [doc = ""] # [inline] pub fn native_video_stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resumes native video playback.\n**Note:** This method is implemented on Android and iOS."] # [doc = ""] # [inline] pub fn native_video_unpause (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_unpause ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Initialises the singleton for the system MIDI driver.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn open_midi_inputs (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . open_midi_inputs ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in `tofile`.\n# Default Arguments\n* `tofile` - `\"\"`"] # [doc = ""] # [inline] pub fn print_all_resources (& self , tofile : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_all_resources ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , tofile . into ()) ; } } # [doc = "Shows the list of loaded textures sorted by size in memory."] # [doc = ""] # [inline] pub fn print_all_textures_by_size (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_all_textures_by_size ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shows the number of resources loaded by the game of the given types."] # [doc = ""] # [inline] pub fn print_resources_by_type (& self , types : StringArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_resources_by_type ; let ret = crate :: icalls :: icallptr_void_strarr (method_bind , self . this . sys () . as_ptr () , types) ; } } # [doc = "Shows all resources currently used by the game.\n# Default Arguments\n* `short` - `false`"] # [doc = ""] # [inline] pub fn print_resources_in_use (& self , short : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_resources_in_use ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , short) ; } } # [doc = "Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn request_attention (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_attention ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "At the moment this function is only used by `AudioDriverOpenSL` to request permission for `RECORD_AUDIO` on Android."] # [doc = ""] # [inline] pub fn request_permission (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_permission ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application.\n**Note:** This method is implemented on Android."] # [doc = ""] # [inline] pub fn request_permissions (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_permissions ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, removes the window frame.\n**Note:** Setting `window_borderless` to `false` disables per-pixel transparency."] # [doc = ""] # [inline] pub fn set_borderless_window (& self , borderless : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_borderless_window ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , borderless) ; } } # [doc = "The clipboard from the host OS. Might be unavailable on some platforms."] # [doc = ""] # [inline] pub fn set_clipboard (& self , clipboard : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_clipboard ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , clipboard . into ()) ; } } # [doc = "The current screen index (starting from 0)."] # [doc = ""] # [inline] pub fn set_current_screen (& self , screen : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_current_screen ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , screen) ; } } # [doc = "The current tablet drvier in use."] # [doc = ""] # [inline] pub fn set_current_tablet_driver (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_current_tablet_driver ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_environment (& self , variable : impl Into < GodotString > , value : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , variable . into () , value . into ()) ; ret as _ } } # [doc = "The exit code passed to the OS when the main loop exits. By convention, an exit code of `0` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).\n**Note:** This value will be ignored if using [method SceneTree.quit] with an `exit_code` argument passed."] # [doc = ""] # [inline] pub fn set_exit_code (& self , code : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_exit_code ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , code) ; } } # [doc = "Sets the game's icon using an [Image] resource.\nThe same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.\n**Note:** This method is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_icon (& self , icon : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "Sets whether IME input mode should be enabled.\nIf active IME handles key events before the application and creates an composition string and suggestion list.\nApplication can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions.\nCompleted composition string is committed when input is finished.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_ime_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_ime_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "Sets position of IME suggestion list popup (in window coordinates).\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_ime_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_ime_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the engine tries to keep the screen on while the game is running. Useful on mobile."] # [doc = ""] # [inline] pub fn set_keep_screen_on (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_keep_screen_on ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile."] # [doc = ""] # [inline] pub fn set_low_processor_usage_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_low_processor_usage_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage."] # [doc = ""] # [inline] pub fn set_low_processor_usage_mode_sleep_usec (& self , usec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_low_processor_usage_mode_sleep_usec ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , usec) ; } } # [doc = "The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn set_max_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_max_window_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn set_min_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_min_window_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the game's icon using a multi-size platform-specific icon file (`*.ico` on Windows and `*.icns` on macOS).\nAppropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.\n**Note:** This method is implemented on macOS and Windows."] # [doc = ""] # [inline] pub fn set_native_icon (& self , filename : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_native_icon ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , filename . into ()) ; } } # [doc = "The current screen orientation."] # [doc = ""] # [inline] pub fn set_screen_orientation (& self , orientation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_screen_orientation ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , orientation) ; } } # [doc = "Sets the name of the current thread."] # [doc = ""] # [inline] pub fn set_thread_name (& self , name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_thread_name ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Enables backup saves if `enabled` is `true`."] # [doc = ""] # [inline] pub fn set_use_file_access_save_and_swap (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_use_file_access_save_and_swap ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, vertical synchronization (Vsync) is enabled."] # [doc = ""] # [inline] pub fn set_use_vsync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_use_vsync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true` and `vsync_enabled` is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.\n**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.\n**Note:** This property is only implemented on Windows."] # [doc = ""] # [inline] pub fn set_vsync_via_compositor (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_vsync_via_compositor ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets whether the window should always be on top.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_always_on_top (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_always_on_top ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the window is fullscreen."] # [doc = ""] # [inline] pub fn set_window_fullscreen (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_fullscreen ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the window is maximized."] # [doc = ""] # [inline] pub fn set_window_maximized (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_maximized ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the window is minimized."] # [doc = ""] # [inline] pub fn set_window_minimized (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_minimized ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_window_mouse_passthrough (& self , region : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_mouse_passthrough ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , region) ; } } # [doc = "If `true`, the window background is transparent and window frame is removed.\nUse `get_tree().get_root().set_transparent_background(true)` to disable main viewport background rendering.\n**Note:** This property has no effect if **Project > Project Settings > Display > Window > Per-pixel transparency > Allowed** setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_per_pixel_transparency_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_per_pixel_transparency_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right."] # [doc = ""] # [inline] pub fn set_window_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the window is resizable by the user."] # [doc = ""] # [inline] pub fn set_window_resizable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_resizable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The size of the window (without counting window manager decorations)."] # [doc = ""] # [inline] pub fn set_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the window title to the specified string.\n**Note:** This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.\n**Note:** This method is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_title ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } # [doc = "Requests the OS to open a resource with the most appropriate program. For example:\n- `OS.shell_open(\"C:\\\\Users\\name\\Downloads\")` on Windows opens the file explorer at the user's Downloads folder.\n- `OS.shell_open(\"https://godotengine.org\")` opens the default web browser on the official Godot website.\n- `OS.shell_open(\"mailto:example@example.com\")` opens the default email client with the \"To\" field set to `example@example.com`. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing `mailto:` Links[/url] for a list of fields that can be added.\nUse [method ProjectSettings.globalize_path] to convert a `res://` or `user://` path into a system path for use with this method.\n**Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn shell_open (& self , uri : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . shell_open ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , uri . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Shows the virtual keyboard if the platform has one.\nThe `existing_text` parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).\nThe `multiline` parameter needs to be set to `true` to be able to enter multiple lines of text, as in [TextEdit].\n**Note:** This method is implemented on Android, iOS and UWP.\n# Default Arguments\n* `existing_text` - `\"\"`\n* `multiline` - `false`"] # [doc = ""] # [inline] pub fn show_virtual_keyboard (& self , existing_text : impl Into < GodotString > , multiline : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . show_virtual_keyboard ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , existing_text . into () , multiline) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OS { } unsafe impl GodotObject for OS { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OS" } } impl std :: ops :: Deref for OS { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for OS { } unsafe impl Send for OS { } unsafe impl Sync for OS { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OSMethodTable { pub class_constructor : sys :: godot_class_constructor , pub alert : * mut sys :: godot_method_bind , pub can_draw : * mut sys :: godot_method_bind , pub can_use_threads : * mut sys :: godot_method_bind , pub center_window : * mut sys :: godot_method_bind , pub close_midi_inputs : * mut sys :: godot_method_bind , pub delay_msec : * mut sys :: godot_method_bind , pub delay_usec : * mut sys :: godot_method_bind , pub dump_memory_to_file : * mut sys :: godot_method_bind , pub dump_resources_to_file : * mut sys :: godot_method_bind , pub execute : * mut sys :: godot_method_bind , pub find_scancode_from_string : * mut sys :: godot_method_bind , pub get_audio_driver_count : * mut sys :: godot_method_bind , pub get_audio_driver_name : * mut sys :: godot_method_bind , pub get_borderless_window : * mut sys :: godot_method_bind , pub get_clipboard : * mut sys :: godot_method_bind , pub get_cmdline_args : * mut sys :: godot_method_bind , pub get_connected_midi_inputs : * mut sys :: godot_method_bind , pub get_current_screen : * mut sys :: godot_method_bind , pub get_current_tablet_driver : * mut sys :: godot_method_bind , pub get_current_video_driver : * mut sys :: godot_method_bind , pub get_date : * mut sys :: godot_method_bind , pub get_datetime : * mut sys :: godot_method_bind , pub get_datetime_from_unix_time : * mut sys :: godot_method_bind , pub get_dynamic_memory_usage : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_executable_path : * mut sys :: godot_method_bind , pub get_exit_code : * mut sys :: godot_method_bind , pub get_granted_permissions : * mut sys :: godot_method_bind , pub get_ime_selection : * mut sys :: godot_method_bind , pub get_ime_text : * mut sys :: godot_method_bind , pub get_latin_keyboard_variant : * mut sys :: godot_method_bind , pub get_locale : * mut sys :: godot_method_bind , pub get_low_processor_usage_mode_sleep_usec : * mut sys :: godot_method_bind , pub get_max_window_size : * mut sys :: godot_method_bind , pub get_min_window_size : * mut sys :: godot_method_bind , pub get_model_name : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_native_handle : * mut sys :: godot_method_bind , pub get_power_percent_left : * mut sys :: godot_method_bind , pub get_power_seconds_left : * mut sys :: godot_method_bind , pub get_power_state : * mut sys :: godot_method_bind , pub get_process_id : * mut sys :: godot_method_bind , pub get_processor_count : * mut sys :: godot_method_bind , pub get_real_window_size : * mut sys :: godot_method_bind , pub get_scancode_string : * mut sys :: godot_method_bind , pub get_screen_count : * mut sys :: godot_method_bind , pub get_screen_dpi : * mut sys :: godot_method_bind , pub get_screen_max_scale : * mut sys :: godot_method_bind , pub get_screen_orientation : * mut sys :: godot_method_bind , pub get_screen_position : * mut sys :: godot_method_bind , pub get_screen_scale : * mut sys :: godot_method_bind , pub get_screen_size : * mut sys :: godot_method_bind , pub get_splash_tick_msec : * mut sys :: godot_method_bind , pub get_static_memory_peak_usage : * mut sys :: godot_method_bind , pub get_static_memory_usage : * mut sys :: godot_method_bind , pub get_system_dir : * mut sys :: godot_method_bind , pub get_system_time_msecs : * mut sys :: godot_method_bind , pub get_system_time_secs : * mut sys :: godot_method_bind , pub get_tablet_driver_count : * mut sys :: godot_method_bind , pub get_tablet_driver_name : * mut sys :: godot_method_bind , pub get_thread_caller_id : * mut sys :: godot_method_bind , pub get_ticks_msec : * mut sys :: godot_method_bind , pub get_ticks_usec : * mut sys :: godot_method_bind , pub get_time : * mut sys :: godot_method_bind , pub get_time_zone_info : * mut sys :: godot_method_bind , pub get_unique_id : * mut sys :: godot_method_bind , pub get_unix_time : * mut sys :: godot_method_bind , pub get_unix_time_from_datetime : * mut sys :: godot_method_bind , pub get_user_data_dir : * mut sys :: godot_method_bind , pub get_video_driver_count : * mut sys :: godot_method_bind , pub get_video_driver_name : * mut sys :: godot_method_bind , pub get_virtual_keyboard_height : * mut sys :: godot_method_bind , pub get_window_per_pixel_transparency_enabled : * mut sys :: godot_method_bind , pub get_window_position : * mut sys :: godot_method_bind , pub get_window_safe_area : * mut sys :: godot_method_bind , pub get_window_size : * mut sys :: godot_method_bind , pub global_menu_add_item : * mut sys :: godot_method_bind , pub global_menu_add_separator : * mut sys :: godot_method_bind , pub global_menu_clear : * mut sys :: godot_method_bind , pub global_menu_remove_item : * mut sys :: godot_method_bind , pub has_environment : * mut sys :: godot_method_bind , pub has_feature : * mut sys :: godot_method_bind , pub has_touchscreen_ui_hint : * mut sys :: godot_method_bind , pub has_virtual_keyboard : * mut sys :: godot_method_bind , pub hide_virtual_keyboard : * mut sys :: godot_method_bind , pub is_debug_build : * mut sys :: godot_method_bind , pub is_in_low_processor_usage_mode : * mut sys :: godot_method_bind , pub is_keep_screen_on : * mut sys :: godot_method_bind , pub is_ok_left_and_cancel_right : * mut sys :: godot_method_bind , pub is_scancode_unicode : * mut sys :: godot_method_bind , pub is_stdout_verbose : * mut sys :: godot_method_bind , pub is_userfs_persistent : * mut sys :: godot_method_bind , pub is_vsync_enabled : * mut sys :: godot_method_bind , pub is_vsync_via_compositor_enabled : * mut sys :: godot_method_bind , pub is_window_always_on_top : * mut sys :: godot_method_bind , pub is_window_focused : * mut sys :: godot_method_bind , pub is_window_fullscreen : * mut sys :: godot_method_bind , pub is_window_maximized : * mut sys :: godot_method_bind , pub is_window_minimized : * mut sys :: godot_method_bind , pub is_window_resizable : * mut sys :: godot_method_bind , pub keyboard_get_current_layout : * mut sys :: godot_method_bind , pub keyboard_get_layout_count : * mut sys :: godot_method_bind , pub keyboard_get_layout_language : * mut sys :: godot_method_bind , pub keyboard_get_layout_name : * mut sys :: godot_method_bind , pub keyboard_set_current_layout : * mut sys :: godot_method_bind , pub kill : * mut sys :: godot_method_bind , pub move_window_to_foreground : * mut sys :: godot_method_bind , pub native_video_is_playing : * mut sys :: godot_method_bind , pub native_video_pause : * mut sys :: godot_method_bind , pub native_video_play : * mut sys :: godot_method_bind , pub native_video_stop : * mut sys :: godot_method_bind , pub native_video_unpause : * mut sys :: godot_method_bind , pub open_midi_inputs : * mut sys :: godot_method_bind , pub print_all_resources : * mut sys :: godot_method_bind , pub print_all_textures_by_size : * mut sys :: godot_method_bind , pub print_resources_by_type : * mut sys :: godot_method_bind , pub print_resources_in_use : * mut sys :: godot_method_bind , pub request_attention : * mut sys :: godot_method_bind , pub request_permission : * mut sys :: godot_method_bind , pub request_permissions : * mut sys :: godot_method_bind , pub set_borderless_window : * mut sys :: godot_method_bind , pub set_clipboard : * mut sys :: godot_method_bind , pub set_current_screen : * mut sys :: godot_method_bind , pub set_current_tablet_driver : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_exit_code : * mut sys :: godot_method_bind , pub set_icon : * mut sys :: godot_method_bind , pub set_ime_active : * mut sys :: godot_method_bind , pub set_ime_position : * mut sys :: godot_method_bind , pub set_keep_screen_on : * mut sys :: godot_method_bind , pub set_low_processor_usage_mode : * mut sys :: godot_method_bind , pub set_low_processor_usage_mode_sleep_usec : * mut sys :: godot_method_bind , pub set_max_window_size : * mut sys :: godot_method_bind , pub set_min_window_size : * mut sys :: godot_method_bind , pub set_native_icon : * mut sys :: godot_method_bind , pub set_screen_orientation : * mut sys :: godot_method_bind , pub set_thread_name : * mut sys :: godot_method_bind , pub set_use_file_access_save_and_swap : * mut sys :: godot_method_bind , pub set_use_vsync : * mut sys :: godot_method_bind , pub set_vsync_via_compositor : * mut sys :: godot_method_bind , pub set_window_always_on_top : * mut sys :: godot_method_bind , pub set_window_fullscreen : * mut sys :: godot_method_bind , pub set_window_maximized : * mut sys :: godot_method_bind , pub set_window_minimized : * mut sys :: godot_method_bind , pub set_window_mouse_passthrough : * mut sys :: godot_method_bind , pub set_window_per_pixel_transparency_enabled : * mut sys :: godot_method_bind , pub set_window_position : * mut sys :: godot_method_bind , pub set_window_resizable : * mut sys :: godot_method_bind , pub set_window_size : * mut sys :: godot_method_bind , pub set_window_title : * mut sys :: godot_method_bind , pub shell_open : * mut sys :: godot_method_bind , pub show_virtual_keyboard : * mut sys :: godot_method_bind } impl OSMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OSMethodTable = OSMethodTable { class_constructor : None , alert : 0 as * mut sys :: godot_method_bind , can_draw : 0 as * mut sys :: godot_method_bind , can_use_threads : 0 as * mut sys :: godot_method_bind , center_window : 0 as * mut sys :: godot_method_bind , close_midi_inputs : 0 as * mut sys :: godot_method_bind , delay_msec : 0 as * mut sys :: godot_method_bind , delay_usec : 0 as * mut sys :: godot_method_bind , dump_memory_to_file : 0 as * mut sys :: godot_method_bind , dump_resources_to_file : 0 as * mut sys :: godot_method_bind , execute : 0 as * mut sys :: godot_method_bind , find_scancode_from_string : 0 as * mut sys :: godot_method_bind , get_audio_driver_count : 0 as * mut sys :: godot_method_bind , get_audio_driver_name : 0 as * mut sys :: godot_method_bind , get_borderless_window : 0 as * mut sys :: godot_method_bind , get_clipboard : 0 as * mut sys :: godot_method_bind , get_cmdline_args : 0 as * mut sys :: godot_method_bind , get_connected_midi_inputs : 0 as * mut sys :: godot_method_bind , get_current_screen : 0 as * mut sys :: godot_method_bind , get_current_tablet_driver : 0 as * mut sys :: godot_method_bind , get_current_video_driver : 0 as * mut sys :: godot_method_bind , get_date : 0 as * mut sys :: godot_method_bind , get_datetime : 0 as * mut sys :: godot_method_bind , get_datetime_from_unix_time : 0 as * mut sys :: godot_method_bind , get_dynamic_memory_usage : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_executable_path : 0 as * mut sys :: godot_method_bind , get_exit_code : 0 as * mut sys :: godot_method_bind , get_granted_permissions : 0 as * mut sys :: godot_method_bind , get_ime_selection : 0 as * mut sys :: godot_method_bind , get_ime_text : 0 as * mut sys :: godot_method_bind , get_latin_keyboard_variant : 0 as * mut sys :: godot_method_bind , get_locale : 0 as * mut sys :: godot_method_bind , get_low_processor_usage_mode_sleep_usec : 0 as * mut sys :: godot_method_bind , get_max_window_size : 0 as * mut sys :: godot_method_bind , get_min_window_size : 0 as * mut sys :: godot_method_bind , get_model_name : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_native_handle : 0 as * mut sys :: godot_method_bind , get_power_percent_left : 0 as * mut sys :: godot_method_bind , get_power_seconds_left : 0 as * mut sys :: godot_method_bind , get_power_state : 0 as * mut sys :: godot_method_bind , get_process_id : 0 as * mut sys :: godot_method_bind , get_processor_count : 0 as * mut sys :: godot_method_bind , get_real_window_size : 0 as * mut sys :: godot_method_bind , get_scancode_string : 0 as * mut sys :: godot_method_bind , get_screen_count : 0 as * mut sys :: godot_method_bind , get_screen_dpi : 0 as * mut sys :: godot_method_bind , get_screen_max_scale : 0 as * mut sys :: godot_method_bind , get_screen_orientation : 0 as * mut sys :: godot_method_bind , get_screen_position : 0 as * mut sys :: godot_method_bind , get_screen_scale : 0 as * mut sys :: godot_method_bind , get_screen_size : 0 as * mut sys :: godot_method_bind , get_splash_tick_msec : 0 as * mut sys :: godot_method_bind , get_static_memory_peak_usage : 0 as * mut sys :: godot_method_bind , get_static_memory_usage : 0 as * mut sys :: godot_method_bind , get_system_dir : 0 as * mut sys :: godot_method_bind , get_system_time_msecs : 0 as * mut sys :: godot_method_bind , get_system_time_secs : 0 as * mut sys :: godot_method_bind , get_tablet_driver_count : 0 as * mut sys :: godot_method_bind , get_tablet_driver_name : 0 as * mut sys :: godot_method_bind , get_thread_caller_id : 0 as * mut sys :: godot_method_bind , get_ticks_msec : 0 as * mut sys :: godot_method_bind , get_ticks_usec : 0 as * mut sys :: godot_method_bind , get_time : 0 as * mut sys :: godot_method_bind , get_time_zone_info : 0 as * mut sys :: godot_method_bind , get_unique_id : 0 as * mut sys :: godot_method_bind , get_unix_time : 0 as * mut sys :: godot_method_bind , get_unix_time_from_datetime : 0 as * mut sys :: godot_method_bind , get_user_data_dir : 0 as * mut sys :: godot_method_bind , get_video_driver_count : 0 as * mut sys :: godot_method_bind , get_video_driver_name : 0 as * mut sys :: godot_method_bind , get_virtual_keyboard_height : 0 as * mut sys :: godot_method_bind , get_window_per_pixel_transparency_enabled : 0 as * mut sys :: godot_method_bind , get_window_position : 0 as * mut sys :: godot_method_bind , get_window_safe_area : 0 as * mut sys :: godot_method_bind , get_window_size : 0 as * mut sys :: godot_method_bind , global_menu_add_item : 0 as * mut sys :: godot_method_bind , global_menu_add_separator : 0 as * mut sys :: godot_method_bind , global_menu_clear : 0 as * mut sys :: godot_method_bind , global_menu_remove_item : 0 as * mut sys :: godot_method_bind , has_environment : 0 as * mut sys :: godot_method_bind , has_feature : 0 as * mut sys :: godot_method_bind , has_touchscreen_ui_hint : 0 as * mut sys :: godot_method_bind , has_virtual_keyboard : 0 as * mut sys :: godot_method_bind , hide_virtual_keyboard : 0 as * mut sys :: godot_method_bind , is_debug_build : 0 as * mut sys :: godot_method_bind , is_in_low_processor_usage_mode : 0 as * mut sys :: godot_method_bind , is_keep_screen_on : 0 as * mut sys :: godot_method_bind , is_ok_left_and_cancel_right : 0 as * mut sys :: godot_method_bind , is_scancode_unicode : 0 as * mut sys :: godot_method_bind , is_stdout_verbose : 0 as * mut sys :: godot_method_bind , is_userfs_persistent : 0 as * mut sys :: godot_method_bind , is_vsync_enabled : 0 as * mut sys :: godot_method_bind , is_vsync_via_compositor_enabled : 0 as * mut sys :: godot_method_bind , is_window_always_on_top : 0 as * mut sys :: godot_method_bind , is_window_focused : 0 as * mut sys :: godot_method_bind , is_window_fullscreen : 0 as * mut sys :: godot_method_bind , is_window_maximized : 0 as * mut sys :: godot_method_bind , is_window_minimized : 0 as * mut sys :: godot_method_bind , is_window_resizable : 0 as * mut sys :: godot_method_bind , keyboard_get_current_layout : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_count : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_language : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_name : 0 as * mut sys :: godot_method_bind , keyboard_set_current_layout : 0 as * mut sys :: godot_method_bind , kill : 0 as * mut sys :: godot_method_bind , move_window_to_foreground : 0 as * mut sys :: godot_method_bind , native_video_is_playing : 0 as * mut sys :: godot_method_bind , native_video_pause : 0 as * mut sys :: godot_method_bind , native_video_play : 0 as * mut sys :: godot_method_bind , native_video_stop : 0 as * mut sys :: godot_method_bind , native_video_unpause : 0 as * mut sys :: godot_method_bind , open_midi_inputs : 0 as * mut sys :: godot_method_bind , print_all_resources : 0 as * mut sys :: godot_method_bind , print_all_textures_by_size : 0 as * mut sys :: godot_method_bind , print_resources_by_type : 0 as * mut sys :: godot_method_bind , print_resources_in_use : 0 as * mut sys :: godot_method_bind , request_attention : 0 as * mut sys :: godot_method_bind , request_permission : 0 as * mut sys :: godot_method_bind , request_permissions : 0 as * mut sys :: godot_method_bind , set_borderless_window : 0 as * mut sys :: godot_method_bind , set_clipboard : 0 as * mut sys :: godot_method_bind , set_current_screen : 0 as * mut sys :: godot_method_bind , set_current_tablet_driver : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_exit_code : 0 as * mut sys :: godot_method_bind , set_icon : 0 as * mut sys :: godot_method_bind , set_ime_active : 0 as * mut sys :: godot_method_bind , set_ime_position : 0 as * mut sys :: godot_method_bind , set_keep_screen_on : 0 as * mut sys :: godot_method_bind , set_low_processor_usage_mode : 0 as * mut sys :: godot_method_bind , set_low_processor_usage_mode_sleep_usec : 0 as * mut sys :: godot_method_bind , set_max_window_size : 0 as * mut sys :: godot_method_bind , set_min_window_size : 0 as * mut sys :: godot_method_bind , set_native_icon : 0 as * mut sys :: godot_method_bind , set_screen_orientation : 0 as * mut sys :: godot_method_bind , set_thread_name : 0 as * mut sys :: godot_method_bind , set_use_file_access_save_and_swap : 0 as * mut sys :: godot_method_bind , set_use_vsync : 0 as * mut sys :: godot_method_bind , set_vsync_via_compositor : 0 as * mut sys :: godot_method_bind , set_window_always_on_top : 0 as * mut sys :: godot_method_bind , set_window_fullscreen : 0 as * mut sys :: godot_method_bind , set_window_maximized : 0 as * mut sys :: godot_method_bind , set_window_minimized : 0 as * mut sys :: godot_method_bind , set_window_mouse_passthrough : 0 as * mut sys :: godot_method_bind , set_window_per_pixel_transparency_enabled : 0 as * mut sys :: godot_method_bind , set_window_position : 0 as * mut sys :: godot_method_bind , set_window_resizable : 0 as * mut sys :: godot_method_bind , set_window_size : 0 as * mut sys :: godot_method_bind , set_window_title : 0 as * mut sys :: godot_method_bind , shell_open : 0 as * mut sys :: godot_method_bind , show_virtual_keyboard : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { OSMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_OS\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . alert = (gd_api . godot_method_bind_get_method) (class_name , "alert\0" . as_ptr () as * const c_char) ; table . can_draw = (gd_api . godot_method_bind_get_method) (class_name , "can_draw\0" . as_ptr () as * const c_char) ; table . can_use_threads = (gd_api . godot_method_bind_get_method) (class_name , "can_use_threads\0" . as_ptr () as * const c_char) ; table . center_window = (gd_api . godot_method_bind_get_method) (class_name , "center_window\0" . as_ptr () as * const c_char) ; table . close_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "close_midi_inputs\0" . as_ptr () as * const c_char) ; table . delay_msec = (gd_api . godot_method_bind_get_method) (class_name , "delay_msec\0" . as_ptr () as * const c_char) ; table . delay_usec = (gd_api . godot_method_bind_get_method) (class_name , "delay_usec\0" . as_ptr () as * const c_char) ; table . dump_memory_to_file = (gd_api . godot_method_bind_get_method) (class_name , "dump_memory_to_file\0" . as_ptr () as * const c_char) ; table . dump_resources_to_file = (gd_api . godot_method_bind_get_method) (class_name , "dump_resources_to_file\0" . as_ptr () as * const c_char) ; table . execute = (gd_api . godot_method_bind_get_method) (class_name , "execute\0" . as_ptr () as * const c_char) ; table . find_scancode_from_string = (gd_api . godot_method_bind_get_method) (class_name , "find_scancode_from_string\0" . as_ptr () as * const c_char) ; table . get_audio_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_driver_count\0" . as_ptr () as * const c_char) ; table . get_audio_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_driver_name\0" . as_ptr () as * const c_char) ; table . get_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "get_borderless_window\0" . as_ptr () as * const c_char) ; table . get_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "get_clipboard\0" . as_ptr () as * const c_char) ; table . get_cmdline_args = (gd_api . godot_method_bind_get_method) (class_name , "get_cmdline_args\0" . as_ptr () as * const c_char) ; table . get_connected_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_midi_inputs\0" . as_ptr () as * const c_char) ; table . get_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "get_current_screen\0" . as_ptr () as * const c_char) ; table . get_current_tablet_driver = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tablet_driver\0" . as_ptr () as * const c_char) ; table . get_current_video_driver = (gd_api . godot_method_bind_get_method) (class_name , "get_current_video_driver\0" . as_ptr () as * const c_char) ; table . get_date = (gd_api . godot_method_bind_get_method) (class_name , "get_date\0" . as_ptr () as * const c_char) ; table . get_datetime = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime\0" . as_ptr () as * const c_char) ; table . get_datetime_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_dynamic_memory_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_memory_usage\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_executable_path = (gd_api . godot_method_bind_get_method) (class_name , "get_executable_path\0" . as_ptr () as * const c_char) ; table . get_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "get_exit_code\0" . as_ptr () as * const c_char) ; table . get_granted_permissions = (gd_api . godot_method_bind_get_method) (class_name , "get_granted_permissions\0" . as_ptr () as * const c_char) ; table . get_ime_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_selection\0" . as_ptr () as * const c_char) ; table . get_ime_text = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_text\0" . as_ptr () as * const c_char) ; table . get_latin_keyboard_variant = (gd_api . godot_method_bind_get_method) (class_name , "get_latin_keyboard_variant\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_low_processor_usage_mode_sleep_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_low_processor_usage_mode_sleep_usec\0" . as_ptr () as * const c_char) ; table . get_max_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_max_window_size\0" . as_ptr () as * const c_char) ; table . get_min_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_min_window_size\0" . as_ptr () as * const c_char) ; table . get_model_name = (gd_api . godot_method_bind_get_method) (class_name , "get_model_name\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_native_handle = (gd_api . godot_method_bind_get_method) (class_name , "get_native_handle\0" . as_ptr () as * const c_char) ; table . get_power_percent_left = (gd_api . godot_method_bind_get_method) (class_name , "get_power_percent_left\0" . as_ptr () as * const c_char) ; table . get_power_seconds_left = (gd_api . godot_method_bind_get_method) (class_name , "get_power_seconds_left\0" . as_ptr () as * const c_char) ; table . get_power_state = (gd_api . godot_method_bind_get_method) (class_name , "get_power_state\0" . as_ptr () as * const c_char) ; table . get_process_id = (gd_api . godot_method_bind_get_method) (class_name , "get_process_id\0" . as_ptr () as * const c_char) ; table . get_processor_count = (gd_api . godot_method_bind_get_method) (class_name , "get_processor_count\0" . as_ptr () as * const c_char) ; table . get_real_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_real_window_size\0" . as_ptr () as * const c_char) ; table . get_scancode_string = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_string\0" . as_ptr () as * const c_char) ; table . get_screen_count = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_count\0" . as_ptr () as * const c_char) ; table . get_screen_dpi = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_dpi\0" . as_ptr () as * const c_char) ; table . get_screen_max_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_max_scale\0" . as_ptr () as * const c_char) ; table . get_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_orientation\0" . as_ptr () as * const c_char) ; table . get_screen_position = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_position\0" . as_ptr () as * const c_char) ; table . get_screen_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_scale\0" . as_ptr () as * const c_char) ; table . get_screen_size = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_size\0" . as_ptr () as * const c_char) ; table . get_splash_tick_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_splash_tick_msec\0" . as_ptr () as * const c_char) ; table . get_static_memory_peak_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_static_memory_peak_usage\0" . as_ptr () as * const c_char) ; table . get_static_memory_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_static_memory_usage\0" . as_ptr () as * const c_char) ; table . get_system_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_system_dir\0" . as_ptr () as * const c_char) ; table . get_system_time_msecs = (gd_api . godot_method_bind_get_method) (class_name , "get_system_time_msecs\0" . as_ptr () as * const c_char) ; table . get_system_time_secs = (gd_api . godot_method_bind_get_method) (class_name , "get_system_time_secs\0" . as_ptr () as * const c_char) ; table . get_tablet_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tablet_driver_count\0" . as_ptr () as * const c_char) ; table . get_tablet_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_tablet_driver_name\0" . as_ptr () as * const c_char) ; table . get_thread_caller_id = (gd_api . godot_method_bind_get_method) (class_name , "get_thread_caller_id\0" . as_ptr () as * const c_char) ; table . get_ticks_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_msec\0" . as_ptr () as * const c_char) ; table . get_ticks_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_usec\0" . as_ptr () as * const c_char) ; table . get_time = (gd_api . godot_method_bind_get_method) (class_name , "get_time\0" . as_ptr () as * const c_char) ; table . get_time_zone_info = (gd_api . godot_method_bind_get_method) (class_name , "get_time_zone_info\0" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\0" . as_ptr () as * const c_char) ; table . get_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time\0" . as_ptr () as * const c_char) ; table . get_unix_time_from_datetime = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time_from_datetime\0" . as_ptr () as * const c_char) ; table . get_user_data_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_user_data_dir\0" . as_ptr () as * const c_char) ; table . get_video_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_video_driver_count\0" . as_ptr () as * const c_char) ; table . get_video_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_video_driver_name\0" . as_ptr () as * const c_char) ; table . get_virtual_keyboard_height = (gd_api . godot_method_bind_get_method) (class_name , "get_virtual_keyboard_height\0" . as_ptr () as * const c_char) ; table . get_window_per_pixel_transparency_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_window_per_pixel_transparency_enabled\0" . as_ptr () as * const c_char) ; table . get_window_position = (gd_api . godot_method_bind_get_method) (class_name , "get_window_position\0" . as_ptr () as * const c_char) ; table . get_window_safe_area = (gd_api . godot_method_bind_get_method) (class_name , "get_window_safe_area\0" . as_ptr () as * const c_char) ; table . get_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_window_size\0" . as_ptr () as * const c_char) ; table . global_menu_add_item = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_add_item\0" . as_ptr () as * const c_char) ; table . global_menu_add_separator = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_add_separator\0" . as_ptr () as * const c_char) ; table . global_menu_clear = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_clear\0" . as_ptr () as * const c_char) ; table . global_menu_remove_item = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_remove_item\0" . as_ptr () as * const c_char) ; table . has_environment = (gd_api . godot_method_bind_get_method) (class_name , "has_environment\0" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\0" . as_ptr () as * const c_char) ; table . has_touchscreen_ui_hint = (gd_api . godot_method_bind_get_method) (class_name , "has_touchscreen_ui_hint\0" . as_ptr () as * const c_char) ; table . has_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "has_virtual_keyboard\0" . as_ptr () as * const c_char) ; table . hide_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "hide_virtual_keyboard\0" . as_ptr () as * const c_char) ; table . is_debug_build = (gd_api . godot_method_bind_get_method) (class_name , "is_debug_build\0" . as_ptr () as * const c_char) ; table . is_in_low_processor_usage_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_in_low_processor_usage_mode\0" . as_ptr () as * const c_char) ; table . is_keep_screen_on = (gd_api . godot_method_bind_get_method) (class_name , "is_keep_screen_on\0" . as_ptr () as * const c_char) ; table . is_ok_left_and_cancel_right = (gd_api . godot_method_bind_get_method) (class_name , "is_ok_left_and_cancel_right\0" . as_ptr () as * const c_char) ; table . is_scancode_unicode = (gd_api . godot_method_bind_get_method) (class_name , "is_scancode_unicode\0" . as_ptr () as * const c_char) ; table . is_stdout_verbose = (gd_api . godot_method_bind_get_method) (class_name , "is_stdout_verbose\0" . as_ptr () as * const c_char) ; table . is_userfs_persistent = (gd_api . godot_method_bind_get_method) (class_name , "is_userfs_persistent\0" . as_ptr () as * const c_char) ; table . is_vsync_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_vsync_enabled\0" . as_ptr () as * const c_char) ; table . is_vsync_via_compositor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_vsync_via_compositor_enabled\0" . as_ptr () as * const c_char) ; table . is_window_always_on_top = (gd_api . godot_method_bind_get_method) (class_name , "is_window_always_on_top\0" . as_ptr () as * const c_char) ; table . is_window_focused = (gd_api . godot_method_bind_get_method) (class_name , "is_window_focused\0" . as_ptr () as * const c_char) ; table . is_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "is_window_fullscreen\0" . as_ptr () as * const c_char) ; table . is_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_maximized\0" . as_ptr () as * const c_char) ; table . is_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_minimized\0" . as_ptr () as * const c_char) ; table . is_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_window_resizable\0" . as_ptr () as * const c_char) ; table . keyboard_get_current_layout = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_current_layout\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_count = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_count\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_language = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_language\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_name = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_name\0" . as_ptr () as * const c_char) ; table . keyboard_set_current_layout = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_set_current_layout\0" . as_ptr () as * const c_char) ; table . kill = (gd_api . godot_method_bind_get_method) (class_name , "kill\0" . as_ptr () as * const c_char) ; table . move_window_to_foreground = (gd_api . godot_method_bind_get_method) (class_name , "move_window_to_foreground\0" . as_ptr () as * const c_char) ; table . native_video_is_playing = (gd_api . godot_method_bind_get_method) (class_name , "native_video_is_playing\0" . as_ptr () as * const c_char) ; table . native_video_pause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_pause\0" . as_ptr () as * const c_char) ; table . native_video_play = (gd_api . godot_method_bind_get_method) (class_name , "native_video_play\0" . as_ptr () as * const c_char) ; table . native_video_stop = (gd_api . godot_method_bind_get_method) (class_name , "native_video_stop\0" . as_ptr () as * const c_char) ; table . native_video_unpause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_unpause\0" . as_ptr () as * const c_char) ; table . open_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "open_midi_inputs\0" . as_ptr () as * const c_char) ; table . print_all_resources = (gd_api . godot_method_bind_get_method) (class_name , "print_all_resources\0" . as_ptr () as * const c_char) ; table . print_all_textures_by_size = (gd_api . godot_method_bind_get_method) (class_name , "print_all_textures_by_size\0" . as_ptr () as * const c_char) ; table . print_resources_by_type = (gd_api . godot_method_bind_get_method) (class_name , "print_resources_by_type\0" . as_ptr () as * const c_char) ; table . print_resources_in_use = (gd_api . godot_method_bind_get_method) (class_name , "print_resources_in_use\0" . as_ptr () as * const c_char) ; table . request_attention = (gd_api . godot_method_bind_get_method) (class_name , "request_attention\0" . as_ptr () as * const c_char) ; table . request_permission = (gd_api . godot_method_bind_get_method) (class_name , "request_permission\0" . as_ptr () as * const c_char) ; table . request_permissions = (gd_api . godot_method_bind_get_method) (class_name , "request_permissions\0" . as_ptr () as * const c_char) ; table . set_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "set_borderless_window\0" . as_ptr () as * const c_char) ; table . set_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "set_clipboard\0" . as_ptr () as * const c_char) ; table . set_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "set_current_screen\0" . as_ptr () as * const c_char) ; table . set_current_tablet_driver = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tablet_driver\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "set_exit_code\0" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\0" . as_ptr () as * const c_char) ; table . set_ime_active = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_active\0" . as_ptr () as * const c_char) ; table . set_ime_position = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_position\0" . as_ptr () as * const c_char) ; table . set_keep_screen_on = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_screen_on\0" . as_ptr () as * const c_char) ; table . set_low_processor_usage_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_low_processor_usage_mode\0" . as_ptr () as * const c_char) ; table . set_low_processor_usage_mode_sleep_usec = (gd_api . godot_method_bind_get_method) (class_name , "set_low_processor_usage_mode_sleep_usec\0" . as_ptr () as * const c_char) ; table . set_max_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_max_window_size\0" . as_ptr () as * const c_char) ; table . set_min_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_min_window_size\0" . as_ptr () as * const c_char) ; table . set_native_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_native_icon\0" . as_ptr () as * const c_char) ; table . set_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_orientation\0" . as_ptr () as * const c_char) ; table . set_thread_name = (gd_api . godot_method_bind_get_method) (class_name , "set_thread_name\0" . as_ptr () as * const c_char) ; table . set_use_file_access_save_and_swap = (gd_api . godot_method_bind_get_method) (class_name , "set_use_file_access_save_and_swap\0" . as_ptr () as * const c_char) ; table . set_use_vsync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_vsync\0" . as_ptr () as * const c_char) ; table . set_vsync_via_compositor = (gd_api . godot_method_bind_get_method) (class_name , "set_vsync_via_compositor\0" . as_ptr () as * const c_char) ; table . set_window_always_on_top = (gd_api . godot_method_bind_get_method) (class_name , "set_window_always_on_top\0" . as_ptr () as * const c_char) ; table . set_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "set_window_fullscreen\0" . as_ptr () as * const c_char) ; table . set_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_maximized\0" . as_ptr () as * const c_char) ; table . set_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_minimized\0" . as_ptr () as * const c_char) ; table . set_window_mouse_passthrough = (gd_api . godot_method_bind_get_method) (class_name , "set_window_mouse_passthrough\0" . as_ptr () as * const c_char) ; table . set_window_per_pixel_transparency_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_window_per_pixel_transparency_enabled\0" . as_ptr () as * const c_char) ; table . set_window_position = (gd_api . godot_method_bind_get_method) (class_name , "set_window_position\0" . as_ptr () as * const c_char) ; table . set_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_window_resizable\0" . as_ptr () as * const c_char) ; table . set_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_window_size\0" . as_ptr () as * const c_char) ; table . set_window_title = (gd_api . godot_method_bind_get_method) (class_name , "set_window_title\0" . as_ptr () as * const c_char) ; table . shell_open = (gd_api . godot_method_bind_get_method) (class_name , "shell_open\0" . as_ptr () as * const c_char) ; table . show_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "show_virtual_keyboard\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:910:7682 [INFO] [stdout] | [INFO] [stdout] 910 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 910 | # [doc = "`core class AtlasTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_atlastexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAtlasTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AtlasTexture { this : RawObject < Self > , } impl AtlasTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AtlasTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The texture that contains the atlas. Can be any [Texture] subtype."] # [doc = ""] # [inline] pub fn atlas (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_atlas ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The margin around the region. The [Rect2]'s [member Rect2.size] parameter (\"w\" and \"h\" in the editor) resizes the texture so it fits within the margin."] # [doc = ""] # [inline] pub fn margin (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The AtlasTexture's used region."] # [doc = ""] # [inline] pub fn region (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_region ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, clips the area outside of the region to avoid bleeding of the surrounding texture pixels."] # [doc = ""] # [inline] pub fn has_filter_clip (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . has_filter_clip ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture that contains the atlas. Can be any [Texture] subtype."] # [doc = ""] # [inline] pub fn set_atlas (& self , atlas : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_atlas ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , atlas . as_arg_ptr ()) ; } } # [doc = "If `true`, clips the area outside of the region to avoid bleeding of the surrounding texture pixels."] # [doc = ""] # [inline] pub fn set_filter_clip (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_filter_clip ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The margin around the region. The [Rect2]'s [member Rect2.size] parameter (\"w\" and \"h\" in the editor) resizes the texture so it fits within the margin."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The AtlasTexture's used region."] # [doc = ""] # [inline] pub fn set_region (& self , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_region ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , region) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AtlasTexture { } unsafe impl GodotObject for AtlasTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AtlasTexture" } } impl std :: ops :: Deref for AtlasTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AtlasTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for AtlasTexture { } impl Instanciable for AtlasTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AtlasTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AtlasTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_atlas : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_region : * mut sys :: godot_method_bind , pub has_filter_clip : * mut sys :: godot_method_bind , pub set_atlas : * mut sys :: godot_method_bind , pub set_filter_clip : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_region : * mut sys :: godot_method_bind } impl AtlasTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AtlasTextureMethodTable = AtlasTextureMethodTable { class_constructor : None , get_atlas : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_region : 0 as * mut sys :: godot_method_bind , has_filter_clip : 0 as * mut sys :: godot_method_bind , set_atlas : 0 as * mut sys :: godot_method_bind , set_filter_clip : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_region : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AtlasTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AtlasTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_atlas = (gd_api . godot_method_bind_get_method) (class_name , "get_atlas\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_region = (gd_api . godot_method_bind_get_method) (class_name , "get_region\0" . as_ptr () as * const c_char) ; table . has_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "has_filter_clip\0" . as_ptr () as * const c_char) ; table . set_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_atlas\0" . as_ptr () as * const c_char) ; table . set_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_clip\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:916:6914 [INFO] [stdout] | [INFO] [stdout] 916 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 916 | # [doc = "`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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:922:5249 [INFO] [stdout] | [INFO] [stdout] 922 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 922 | # [doc = "`core class ConvexPolygonShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_convexpolygonshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConvexPolygonShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConvexPolygonShape2D { this : RawObject < Self > , } impl ConvexPolygonShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConvexPolygonShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The polygon's list of vertices. Can be in either clockwise or counterclockwise order."] # [doc = ""] # [inline] pub fn points (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details."] # [doc = ""] # [inline] pub fn set_point_cloud (& self , point_cloud : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_point_cloud ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , point_cloud) ; } } # [doc = "The polygon's list of vertices. Can be in either clockwise or counterclockwise order."] # [doc = ""] # [inline] pub fn set_points (& self , points : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape2D { } unsafe impl GodotObject for ConvexPolygonShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape2D" } } impl std :: ops :: Deref for ConvexPolygonShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConvexPolygonShape2D { } impl Instanciable for ConvexPolygonShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConvexPolygonShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConvexPolygonShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_points : * mut sys :: godot_method_bind , pub set_point_cloud : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind } impl ConvexPolygonShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConvexPolygonShape2DMethodTable = ConvexPolygonShape2DMethodTable { class_constructor : None , get_points : 0 as * mut sys :: godot_method_bind , set_point_cloud : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ConvexPolygonShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConvexPolygonShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . set_point_cloud = (gd_api . godot_method_bind_get_method) (class_name , "set_point_cloud\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:928:10052 [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 = "`tools class EditorVCSInterface` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorvcsinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorVCSInterface inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorVCSInterface { this : RawObject < Self > , } impl EditorVCSInterface { # [doc = "Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument."] # [doc = ""] # [inline] pub fn commit (& self , msg : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , msg . into ()) ; } } # [doc = "Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file.\nEach [Dictionary] object has the line diff contents under the keys:\n- `\"content\"` to store a [String] containing the line contents\n- `\"status\"` to store a [String] which contains `\"+\"` in case the content is a line addition but it stores a `\"-\"` in case of deletion and an empty string in the case the line content is neither an addition nor a deletion.\n- `\"new_line_number\"` to store an integer containing the new line number of the line content.\n- `\"line_count\"` to store an integer containing the number of lines in the line content.\n- `\"old_line_number\"` to store an integer containing the old line number of the line content.\n- `\"offset\"` to store the offset of the line change since the first contextual line content."] # [doc = ""] # [inline] pub fn get_file_diff (& self , file_path : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_file_diff ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of a change the corresponding file has experienced.\nThe following integer values are being used to signify that the detected file is:\n- `0`: New to the VCS working directory\n- `1`: Modified\n- `2`: Renamed\n- `3`: Deleted\n- `4`: Typechanged"] # [doc = ""] # [inline] pub fn get_modified_files_data (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_modified_files_data ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the project name of the VCS working directory."] # [doc = ""] # [inline] pub fn get_project_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_project_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the VCS if the VCS has been initialized, else return an empty string."] # [doc = ""] # [inline] pub fn get_vcs_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . get_vcs_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns `true` if no failure occurs, else returns `false`."] # [doc = ""] # [inline] pub fn initialize (& self , project_root_path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , project_root_path . into ()) ; ret as _ } } # [doc = "Returns `true` if the addon is ready to respond to function calls, else returns `false`."] # [doc = ""] # [inline] pub fn is_addon_ready (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . is_addon_ready ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the VCS addon has been initialized, else returns `false`."] # [doc = ""] # [inline] pub fn is_vcs_initialized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . is_vcs_initialized ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Shuts down the VCS addon to allow cleanup code to run on call. Returns `true` is no failure occurs, else returns `false`."] # [doc = ""] # [inline] pub fn shut_down (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . shut_down ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path."] # [doc = ""] # [inline] pub fn stage_file (& self , file_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . stage_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; } } # [doc = "Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path."] # [doc = ""] # [inline] pub fn unstage_file (& self , file_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . unstage_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorVCSInterface { } unsafe impl GodotObject for EditorVCSInterface { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorVCSInterface" } } impl std :: ops :: Deref for EditorVCSInterface { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorVCSInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorVCSInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorVCSInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub commit : * mut sys :: godot_method_bind , pub get_file_diff : * mut sys :: godot_method_bind , pub get_modified_files_data : * mut sys :: godot_method_bind , pub get_project_name : * mut sys :: godot_method_bind , pub get_vcs_name : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub is_addon_ready : * mut sys :: godot_method_bind , pub is_vcs_initialized : * mut sys :: godot_method_bind , pub shut_down : * mut sys :: godot_method_bind , pub stage_file : * mut sys :: godot_method_bind , pub unstage_file : * mut sys :: godot_method_bind } impl EditorVCSInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorVCSInterfaceMethodTable = EditorVCSInterfaceMethodTable { class_constructor : None , commit : 0 as * mut sys :: godot_method_bind , get_file_diff : 0 as * mut sys :: godot_method_bind , get_modified_files_data : 0 as * mut sys :: godot_method_bind , get_project_name : 0 as * mut sys :: godot_method_bind , get_vcs_name : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , is_addon_ready : 0 as * mut sys :: godot_method_bind , is_vcs_initialized : 0 as * mut sys :: godot_method_bind , shut_down : 0 as * mut sys :: godot_method_bind , stage_file : 0 as * mut sys :: godot_method_bind , unstage_file : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorVCSInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorVCSInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\0" . as_ptr () as * const c_char) ; table . get_file_diff = (gd_api . godot_method_bind_get_method) (class_name , "get_file_diff\0" . as_ptr () as * const c_char) ; table . get_modified_files_data = (gd_api . godot_method_bind_get_method) (class_name , "get_modified_files_data\0" . as_ptr () as * const c_char) ; table . get_project_name = (gd_api . godot_method_bind_get_method) (class_name , "get_project_name\0" . as_ptr () as * const c_char) ; table . get_vcs_name = (gd_api . godot_method_bind_get_method) (class_name , "get_vcs_name\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_addon_ready = (gd_api . godot_method_bind_get_method) (class_name , "is_addon_ready\0" . as_ptr () as * const c_char) ; table . is_vcs_initialized = (gd_api . godot_method_bind_get_method) (class_name , "is_vcs_initialized\0" . as_ptr () as * const c_char) ; table . shut_down = (gd_api . godot_method_bind_get_method) (class_name , "shut_down\0" . as_ptr () as * const c_char) ; table . stage_file = (gd_api . godot_method_bind_get_method) (class_name , "stage_file\0" . as_ptr () as * const c_char) ; table . unstage_file = (gd_api . godot_method_bind_get_method) (class_name , "unstage_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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:934:5667 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:940:3287 [INFO] [stdout] | [INFO] [stdout] 940 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 940 | # [doc = "`core class RichTextEffect` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_richtexteffect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRichTextEffect inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RichTextEffect { this : RawObject < Self > , } impl RichTextEffect { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RichTextEffectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextEffect { } unsafe impl GodotObject for RichTextEffect { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RichTextEffect" } } impl std :: ops :: Deref for RichTextEffect { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextEffect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: object :: Object > for RichTextEffect { } impl Instanciable for RichTextEffect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RichTextEffect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RichTextEffectMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl RichTextEffectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RichTextEffectMethodTable = RichTextEffectMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RichTextEffectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RichTextEffect\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:946:3784 [INFO] [stdout] | [INFO] [stdout] 946 | ...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] 946 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:952:21187 [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 StyleBoxFlat` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_styleboxflat.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxFlat inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxFlat { this : RawObject < Self > , } impl StyleBoxFlat { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxFlatMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "This changes the size of the faded ring. Higher values can be used to achieve a \"blurry\" effect."] # [doc = ""] # [inline] pub fn aa_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_aa_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The background color of the stylebox."] # [doc = ""] # [inline] pub fn bg_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_bg_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, the border will fade into the background color."] # [doc = ""] # [inline] pub fn border_blend (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_blend ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the color of the border."] # [doc = ""] # [inline] pub fn border_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Border width for the top border."] # [doc = ""] # [inline] pub fn border_width (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Returns the smallest border width out of all four borders."] # [doc = ""] # [inline] pub fn get_border_width_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width_min ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account.\nFor corner radii smaller than 10, `4` or `5` should be enough. For corner radii smaller than 30, values between `8` and `12` should be enough.\nA corner detail of `1` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects."] # [doc = ""] # [inline] pub fn corner_detail (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_detail ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn corner_radius (& self , corner : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , corner) ; ret as _ } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect."] # [doc = ""] # [inline] pub fn expand_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "The color of the shadow. This has no effect if [member shadow_size] is lower than 1."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox."] # [doc = ""] # [inline] pub fn shadow_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The shadow size in pixels."] # [doc = ""] # [inline] pub fn shadow_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners."] # [doc = ""] # [inline] pub fn is_anti_aliased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . is_anti_aliased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Toggles drawing of the inner part of the stylebox."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "This changes the size of the faded ring. Higher values can be used to achieve a \"blurry\" effect."] # [doc = ""] # [inline] pub fn set_aa_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_aa_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners."] # [doc = ""] # [inline] pub fn set_anti_aliased (& self , anti_aliased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_anti_aliased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , anti_aliased) ; } } # [doc = "The background color of the stylebox."] # [doc = ""] # [inline] pub fn set_bg_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_bg_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the border will fade into the background color."] # [doc = ""] # [inline] pub fn set_border_blend (& self , blend : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_blend ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , blend) ; } } # [doc = "Sets the color of the border."] # [doc = ""] # [inline] pub fn set_border_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Border width for the top border."] # [doc = ""] # [inline] pub fn set_border_width (& self , margin : i64 , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , width) ; } } # [doc = "Sets the border width to `width` pixels for all margins."] # [doc = ""] # [inline] pub fn set_border_width_all (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width_all ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [doc = "This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account.\nFor corner radii smaller than 10, `4` or `5` should be enough. For corner radii smaller than 30, values between `8` and `12` should be enough.\nA corner detail of `1` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects."] # [doc = ""] # [inline] pub fn set_corner_detail (& self , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_detail ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail) ; } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn set_corner_radius (& self , corner : i64 , radius : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , corner , radius) ; } } # [doc = "Sets the corner radius to `radius` pixels for all corners."] # [doc = ""] # [inline] pub fn set_corner_radius_all (& self , radius : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius_all ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = "Sets the corner radius for each corner to `radius_top_left`, `radius_top_right`, `radius_bottom_right`, and `radius_bottom_left` pixels."] # [doc = ""] # [inline] pub fn set_corner_radius_individual (& self , radius_top_left : i64 , radius_top_right : i64 , radius_bottom_right : i64 , radius_bottom_left : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius_individual ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , radius_top_left , radius_top_right , radius_bottom_right , radius_bottom_left) ; } } # [doc = "Toggles drawing of the inner part of the stylebox."] # [doc = ""] # [inline] pub fn set_draw_center (& self , draw_center : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_center) ; } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect."] # [doc = ""] # [inline] pub fn set_expand_margin (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [doc = "Sets the expand margin to `size` pixels for all margins."] # [doc = ""] # [inline] pub fn set_expand_margin_all (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin_all ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the expand margin for each margin to `size_left`, `size_top`, `size_right`, and `size_bottom` pixels."] # [doc = ""] # [inline] pub fn set_expand_margin_individual (& self , size_left : f64 , size_top : f64 , size_right : f64 , size_bottom : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin_individual ; let ret = crate :: icalls :: icallptr_void_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left , size_top , size_right , size_bottom) ; } } # [doc = "The color of the shadow. This has no effect if [member shadow_size] is lower than 1."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox."] # [doc = ""] # [inline] pub fn set_shadow_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The shadow size in pixels."] # [doc = ""] # [inline] pub fn set_shadow_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxFlat { } unsafe impl GodotObject for StyleBoxFlat { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxFlat" } } impl std :: ops :: Deref for StyleBoxFlat { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxFlat { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxFlat { } impl Instanciable for StyleBoxFlat { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StyleBoxFlat :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxFlatMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aa_size : * mut sys :: godot_method_bind , pub get_bg_color : * mut sys :: godot_method_bind , pub get_border_blend : * mut sys :: godot_method_bind , pub get_border_color : * mut sys :: godot_method_bind , pub get_border_width : * mut sys :: godot_method_bind , pub get_border_width_min : * mut sys :: godot_method_bind , pub get_corner_detail : * mut sys :: godot_method_bind , pub get_corner_radius : * mut sys :: godot_method_bind , pub get_expand_margin : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_offset : * mut sys :: godot_method_bind , pub get_shadow_size : * mut sys :: godot_method_bind , pub is_anti_aliased : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_aa_size : * mut sys :: godot_method_bind , pub set_anti_aliased : * mut sys :: godot_method_bind , pub set_bg_color : * mut sys :: godot_method_bind , pub set_border_blend : * mut sys :: godot_method_bind , pub set_border_color : * mut sys :: godot_method_bind , pub set_border_width : * mut sys :: godot_method_bind , pub set_border_width_all : * mut sys :: godot_method_bind , pub set_corner_detail : * mut sys :: godot_method_bind , pub set_corner_radius : * mut sys :: godot_method_bind , pub set_corner_radius_all : * mut sys :: godot_method_bind , pub set_corner_radius_individual : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_expand_margin : * mut sys :: godot_method_bind , pub set_expand_margin_all : * mut sys :: godot_method_bind , pub set_expand_margin_individual : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_offset : * mut sys :: godot_method_bind , pub set_shadow_size : * mut sys :: godot_method_bind } impl StyleBoxFlatMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxFlatMethodTable = StyleBoxFlatMethodTable { class_constructor : None , get_aa_size : 0 as * mut sys :: godot_method_bind , get_bg_color : 0 as * mut sys :: godot_method_bind , get_border_blend : 0 as * mut sys :: godot_method_bind , get_border_color : 0 as * mut sys :: godot_method_bind , get_border_width : 0 as * mut sys :: godot_method_bind , get_border_width_min : 0 as * mut sys :: godot_method_bind , get_corner_detail : 0 as * mut sys :: godot_method_bind , get_corner_radius : 0 as * mut sys :: godot_method_bind , get_expand_margin : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_offset : 0 as * mut sys :: godot_method_bind , get_shadow_size : 0 as * mut sys :: godot_method_bind , is_anti_aliased : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_aa_size : 0 as * mut sys :: godot_method_bind , set_anti_aliased : 0 as * mut sys :: godot_method_bind , set_bg_color : 0 as * mut sys :: godot_method_bind , set_border_blend : 0 as * mut sys :: godot_method_bind , set_border_color : 0 as * mut sys :: godot_method_bind , set_border_width : 0 as * mut sys :: godot_method_bind , set_border_width_all : 0 as * mut sys :: godot_method_bind , set_corner_detail : 0 as * mut sys :: godot_method_bind , set_corner_radius : 0 as * mut sys :: godot_method_bind , set_corner_radius_all : 0 as * mut sys :: godot_method_bind , set_corner_radius_individual : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_expand_margin : 0 as * mut sys :: godot_method_bind , set_expand_margin_all : 0 as * mut sys :: godot_method_bind , set_expand_margin_individual : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_offset : 0 as * mut sys :: godot_method_bind , set_shadow_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StyleBoxFlatMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxFlat\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aa_size = (gd_api . godot_method_bind_get_method) (class_name , "get_aa_size\0" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\0" . as_ptr () as * const c_char) ; table . get_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "get_border_blend\0" . as_ptr () as * const c_char) ; table . get_border_color = (gd_api . godot_method_bind_get_method) (class_name , "get_border_color\0" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\0" . as_ptr () as * const c_char) ; table . get_border_width_min = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width_min\0" . as_ptr () as * const c_char) ; table . get_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_detail\0" . as_ptr () as * const c_char) ; table . get_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_radius\0" . as_ptr () as * const c_char) ; table . get_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_margin\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_offset\0" . as_ptr () as * const c_char) ; table . get_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_size\0" . as_ptr () as * const c_char) ; table . is_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "is_anti_aliased\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_aa_size = (gd_api . godot_method_bind_get_method) (class_name , "set_aa_size\0" . as_ptr () as * const c_char) ; table . set_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "set_anti_aliased\0" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\0" . as_ptr () as * const c_char) ; table . set_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "set_border_blend\0" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\0" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\0" . as_ptr () as * const c_char) ; table . set_border_width_all = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width_all\0" . as_ptr () as * const c_char) ; table . set_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_detail\0" . as_ptr () as * const c_char) ; table . set_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius\0" . as_ptr () as * const c_char) ; table . set_corner_radius_all = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius_all\0" . as_ptr () as * const c_char) ; table . set_corner_radius_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius_individual\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin\0" . as_ptr () as * const c_char) ; table . set_expand_margin_all = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_all\0" . as_ptr () as * const c_char) ; table . set_expand_margin_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_individual\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_offset\0" . as_ptr () as * const c_char) ; table . set_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:958:3711 [INFO] [stdout] | [INFO] [stdout] 958 | ...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] 958 | # [doc = "`core class WebRTCPeerConnectionGDNative` inherits `WebRTCPeerConnection` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webrtcpeerconnectiongdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCPeerConnectionGDNative inherits methods from:\n - [WebRTCPeerConnection](struct.WebRTCPeerConnection.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCPeerConnectionGDNative { this : RawObject < Self > , } impl WebRTCPeerConnectionGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCPeerConnectionGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCPeerConnectionGDNative { } unsafe impl GodotObject for WebRTCPeerConnectionGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCPeerConnectionGDNative" } } impl std :: ops :: Deref for WebRTCPeerConnectionGDNative { type Target = crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection ; # [inline] fn deref (& self) -> & crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCPeerConnectionGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: web_rtc_peer_connection :: WebRTCPeerConnection > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebRTCPeerConnectionGDNative { } impl Instanciable for WebRTCPeerConnectionGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { WebRTCPeerConnectionGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCPeerConnectionGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl WebRTCPeerConnectionGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCPeerConnectionGDNativeMethodTable = WebRTCPeerConnectionGDNativeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WebRTCPeerConnectionGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCPeerConnectionGDNative\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:964:4084 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:970:5554 [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 Container` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_container.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Container` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nContainer inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Container { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Container { pub const NOTIFICATION_SORT_CHILDREN : i64 = 50i64 ; } impl Container { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Fit a child control in a given rect. This is mainly a helper for creating custom container classes."] # [doc = ""] # [inline] pub fn fit_child_in_rect (& self , child : impl AsArg < crate :: generated :: control :: Control > , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ContainerMethodTable :: get (get_api ()) . fit_child_in_rect ; let ret = crate :: icalls :: icallptr_void_obj_rect2 (method_bind , self . this . sys () . as_ptr () , child . as_arg_ptr () , rect) ; } } # [doc = "Queue resort of the contained children. This is called automatically anyway, but can be called upon request."] # [doc = ""] # [inline] pub fn queue_sort (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ContainerMethodTable :: get (get_api ()) . queue_sort ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Container { } unsafe impl GodotObject for Container { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Container" } } impl QueueFree for Container { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Container { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Container { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Container { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Container { } unsafe impl SubClass < crate :: generated :: node :: Node > for Container { } unsafe impl SubClass < crate :: generated :: object :: Object > for Container { } impl Instanciable for Container { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Container :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub fit_child_in_rect : * mut sys :: godot_method_bind , pub queue_sort : * mut sys :: godot_method_bind } impl ContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ContainerMethodTable = ContainerMethodTable { class_constructor : None , fit_child_in_rect : 0 as * mut sys :: godot_method_bind , queue_sort : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Container\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . fit_child_in_rect = (gd_api . godot_method_bind_get_method) (class_name , "fit_child_in_rect\0" . as_ptr () as * const c_char) ; table . queue_sort = (gd_api . godot_method_bind_get_method) (class_name , "queue_sort\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:976:17190 [INFO] [stdout] | [INFO] [stdout] 976 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 976 | # [doc = "`core class GeometryInstance` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_geometryinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nGeometryInstance inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GeometryInstance { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const USE_BAKED_LIGHT : Flags = Flags (0i64) ; pub const DRAW_NEXT_FRAME_IF_VISIBLE : Flags = Flags (1i64) ; pub const MAX : Flags = Flags (2i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightmapScale (pub i64) ; impl LightmapScale { pub const _1X : LightmapScale = LightmapScale (0i64) ; pub const _2X : LightmapScale = LightmapScale (1i64) ; pub const _4X : LightmapScale = LightmapScale (2i64) ; pub const _8X : LightmapScale = LightmapScale (3i64) ; pub const MAX : LightmapScale = LightmapScale (4i64) ; } impl From < i64 > for LightmapScale { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightmapScale > for i64 { # [inline] fn from (v : LightmapScale) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowCastingSetting (pub i64) ; impl ShadowCastingSetting { pub const OFF : ShadowCastingSetting = ShadowCastingSetting (0i64) ; pub const ON : ShadowCastingSetting = ShadowCastingSetting (1i64) ; pub const DOUBLE_SIDED : ShadowCastingSetting = ShadowCastingSetting (2i64) ; pub const SHADOWS_ONLY : ShadowCastingSetting = ShadowCastingSetting (3i64) ; } impl From < i64 > for ShadowCastingSetting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowCastingSetting > for i64 { # [inline] fn from (v : ShadowCastingSetting) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GeometryInstance { pub const FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const LIGHTMAP_SCALE_1X : i64 = 0i64 ; pub const LIGHTMAP_SCALE_2X : i64 = 1i64 ; pub const LIGHTMAP_SCALE_4X : i64 = 2i64 ; pub const LIGHTMAP_SCALE_8X : i64 = 3i64 ; pub const LIGHTMAP_SCALE_MAX : i64 = 4i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; } impl GeometryInstance { # [doc = "The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values."] # [doc = ""] # [inline] pub fn cast_shadows_setting (& self) -> crate :: generated :: geometry_instance :: ShadowCastingSetting { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_cast_shadows_setting ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: geometry_instance :: ShadowCastingSetting (ret) } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box."] # [doc = ""] # [inline] pub fn extra_cull_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_extra_cull_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap]."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn generate_lightmap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_generate_lightmap ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn lightmap_scale (& self) -> crate :: generated :: geometry_instance :: LightmapScale { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lightmap_scale ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: geometry_instance :: LightmapScale (ret) } } # [doc = "The GeometryInstance's max LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_max_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The GeometryInstance's max LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_max_hysteresis (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_max_hysteresis ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The GeometryInstance's min LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_min_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The GeometryInstance's min LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_min_hysteresis (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_min_hysteresis ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The material override for the whole geometry.\nIf a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh."] # [doc = ""] # [inline] pub fn material_override (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values."] # [doc = ""] # [inline] pub fn set_cast_shadows_setting (& self , shadow_casting_setting : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_cast_shadows_setting ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shadow_casting_setting) ; } } # [doc = "Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box."] # [doc = ""] # [inline] pub fn set_extra_cull_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_extra_cull_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap]."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_generate_lightmap (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_generate_lightmap ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_lightmap_scale (& self , scale : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lightmap_scale ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The GeometryInstance's max LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_max_distance (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_max_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The GeometryInstance's max LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_max_hysteresis (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_max_hysteresis ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The GeometryInstance's min LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_min_distance (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_min_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The GeometryInstance's min LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_min_hysteresis (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_min_hysteresis ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The material override for the whole geometry.\nIf a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh."] # [doc = ""] # [inline] pub fn set_material_override (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_material_override ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GeometryInstance { } unsafe impl GodotObject for GeometryInstance { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GeometryInstance" } } impl QueueFree for GeometryInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GeometryInstance { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GeometryInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: node :: Node > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: object :: Object > for GeometryInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GeometryInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cast_shadows_setting : * mut sys :: godot_method_bind , pub get_extra_cull_margin : * mut sys :: godot_method_bind , pub get_flag : * mut sys :: godot_method_bind , pub get_generate_lightmap : * mut sys :: godot_method_bind , pub get_lightmap_scale : * mut sys :: godot_method_bind , pub get_lod_max_distance : * mut sys :: godot_method_bind , pub get_lod_max_hysteresis : * mut sys :: godot_method_bind , pub get_lod_min_distance : * mut sys :: godot_method_bind , pub get_lod_min_hysteresis : * mut sys :: godot_method_bind , pub get_material_override : * mut sys :: godot_method_bind , pub set_cast_shadows_setting : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub set_extra_cull_margin : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_generate_lightmap : * mut sys :: godot_method_bind , pub set_lightmap_scale : * mut sys :: godot_method_bind , pub set_lod_max_distance : * mut sys :: godot_method_bind , pub set_lod_max_hysteresis : * mut sys :: godot_method_bind , pub set_lod_min_distance : * mut sys :: godot_method_bind , pub set_lod_min_hysteresis : * mut sys :: godot_method_bind , pub set_material_override : * mut sys :: godot_method_bind } impl GeometryInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GeometryInstanceMethodTable = GeometryInstanceMethodTable { class_constructor : None , get_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , get_extra_cull_margin : 0 as * mut sys :: godot_method_bind , get_flag : 0 as * mut sys :: godot_method_bind , get_generate_lightmap : 0 as * mut sys :: godot_method_bind , get_lightmap_scale : 0 as * mut sys :: godot_method_bind , get_lod_max_distance : 0 as * mut sys :: godot_method_bind , get_lod_max_hysteresis : 0 as * mut sys :: godot_method_bind , get_lod_min_distance : 0 as * mut sys :: godot_method_bind , get_lod_min_hysteresis : 0 as * mut sys :: godot_method_bind , get_material_override : 0 as * mut sys :: godot_method_bind , set_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , set_extra_cull_margin : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_generate_lightmap : 0 as * mut sys :: godot_method_bind , set_lightmap_scale : 0 as * mut sys :: godot_method_bind , set_lod_max_distance : 0 as * mut sys :: godot_method_bind , set_lod_max_hysteresis : 0 as * mut sys :: godot_method_bind , set_lod_min_distance : 0 as * mut sys :: godot_method_bind , set_lod_min_hysteresis : 0 as * mut sys :: godot_method_bind , set_material_override : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GeometryInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GeometryInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . get_extra_cull_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_extra_cull_margin\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_generate_lightmap\0" . as_ptr () as * const c_char) ; table . get_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_scale\0" . as_ptr () as * const c_char) ; table . get_lod_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_max_distance\0" . as_ptr () as * const c_char) ; table . get_lod_max_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_max_hysteresis\0" . as_ptr () as * const c_char) ; table . get_lod_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_min_distance\0" . as_ptr () as * const c_char) ; table . get_lod_min_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_min_hysteresis\0" . as_ptr () as * const c_char) ; table . get_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_material_override\0" . as_ptr () as * const c_char) ; table . set_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . set_extra_cull_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_extra_cull_margin\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_lightmap\0" . as_ptr () as * const c_char) ; table . set_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_scale\0" . as_ptr () as * const c_char) ; table . set_lod_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_max_distance\0" . as_ptr () as * const c_char) ; table . set_lod_max_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_max_hysteresis\0" . as_ptr () as * const c_char) ; table . set_lod_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_min_distance\0" . as_ptr () as * const c_char) ; table . set_lod_min_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_min_hysteresis\0" . as_ptr () as * const c_char) ; table . set_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:982:32552 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:988:16637 [INFO] [stdout] | [INFO] [stdout] 988 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 988 | # [doc = "`core class Mesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_mesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Mesh { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const FORMAT_VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const FORMAT_NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const FORMAT_TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const FORMAT_COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const COMPRESS_BASE : ArrayFormat = ArrayFormat (9i64) ; pub const FORMAT_TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const FORMAT_TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const FORMAT_BONES : ArrayFormat = ArrayFormat (64i64) ; pub const FORMAT_WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const FORMAT_INDEX : ArrayFormat = ArrayFormat (256i64) ; pub const COMPRESS_VERTEX : ArrayFormat = ArrayFormat (512i64) ; pub const COMPRESS_NORMAL : ArrayFormat = ArrayFormat (1024i64) ; pub const COMPRESS_TANGENT : ArrayFormat = ArrayFormat (2048i64) ; pub const COMPRESS_COLOR : ArrayFormat = ArrayFormat (4096i64) ; pub const COMPRESS_TEX_UV : ArrayFormat = ArrayFormat (8192i64) ; pub const COMPRESS_TEX_UV2 : ArrayFormat = ArrayFormat (16384i64) ; pub const COMPRESS_BONES : ArrayFormat = ArrayFormat (32768i64) ; pub const COMPRESS_WEIGHTS : ArrayFormat = ArrayFormat (65536i64) ; pub const COMPRESS_DEFAULT : ArrayFormat = ArrayFormat (97280i64) ; pub const COMPRESS_INDEX : ArrayFormat = ArrayFormat (131072i64) ; pub const FLAG_USE_2D_VERTICES : ArrayFormat = ArrayFormat (262144i64) ; pub const FLAG_USE_16_BIT_BONES : ArrayFormat = ArrayFormat (524288i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendShapeMode (pub i64) ; impl BlendShapeMode { pub const NORMALIZED : BlendShapeMode = BlendShapeMode (0i64) ; pub const RELATIVE : BlendShapeMode = BlendShapeMode (1i64) ; } impl From < i64 > for BlendShapeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendShapeMode > for i64 { # [inline] fn from (v : BlendShapeMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PrimitiveType (pub i64) ; impl PrimitiveType { pub const POINTS : PrimitiveType = PrimitiveType (0i64) ; pub const LINES : PrimitiveType = PrimitiveType (1i64) ; pub const LINE_STRIP : PrimitiveType = PrimitiveType (2i64) ; pub const LINE_LOOP : PrimitiveType = PrimitiveType (3i64) ; pub const TRIANGLES : PrimitiveType = PrimitiveType (4i64) ; pub const TRIANGLE_STRIP : PrimitiveType = PrimitiveType (5i64) ; pub const TRIANGLE_FAN : PrimitiveType = PrimitiveType (6i64) ; } impl From < i64 > for PrimitiveType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PrimitiveType > for i64 { # [inline] fn from (v : PrimitiveType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Mesh { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_COMPRESS_BASE : i64 = 9i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 97280i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; } impl Mesh { # [doc = "Calculate a [ConvexPolygonShape] from the mesh."] # [doc = ""] # [inline] pub fn create_convex_shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_convex_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Calculate an outline mesh at a defined offset (margin) from the original mesh.\n**Note:** This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise)."] # [doc = ""] # [inline] pub fn create_outline (& self , margin : f64) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_outline ; let ret = crate :: icalls :: icallptr_obj_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Calculate a [ConcavePolygonShape] from the mesh."] # [doc = ""] # [inline] pub fn create_trimesh_shape (& self) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_trimesh_shape ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Generate a [TriangleMesh] from the mesh."] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the smallest [AABB] enclosing this mesh in local space. Not affected by `custom_aabb`. See also [method VisualInstance.get_transformed_aabb].\n**Note:** This is only implemented for [ArrayMesh] and [PrimitiveMesh]."] # [doc = ""] # [inline] pub fn get_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle."] # [doc = ""] # [inline] pub fn get_faces (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]."] # [doc = ""] # [inline] pub fn lightmap_size_hint (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_lightmap_size_hint ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the amount of surfaces that the [Mesh] holds."] # [doc = ""] # [inline] pub fn get_surface_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_surface_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]."] # [doc = ""] # [inline] pub fn set_lightmap_size_hint (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . set_lightmap_size_hint ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_arrays (& self , surf_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_arrays ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the blend shape arrays for the requested surface."] # [doc = ""] # [inline] pub fn surface_get_blend_shape_arrays (& self , surf_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_blend_shape_arrays ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [Material] in a given surface. Surface is rendered using this material."] # [doc = ""] # [inline] pub fn surface_get_material (& self , surf_idx : i64) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_material ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets a [Material] for a given surface. Surface will be rendered using this material."] # [doc = ""] # [inline] pub fn surface_set_material (& self , surf_idx : i64 , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_set_material ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , surf_idx , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mesh { } unsafe impl GodotObject for Mesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mesh" } } impl std :: ops :: Deref for Mesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Mesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Mesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for Mesh { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_convex_shape : * mut sys :: godot_method_bind , pub create_outline : * mut sys :: godot_method_bind , pub create_trimesh_shape : * mut sys :: godot_method_bind , pub generate_triangle_mesh : * mut sys :: godot_method_bind , pub get_aabb : * mut sys :: godot_method_bind , pub get_faces : * mut sys :: godot_method_bind , pub get_lightmap_size_hint : * mut sys :: godot_method_bind , pub get_surface_count : * mut sys :: godot_method_bind , pub set_lightmap_size_hint : * mut sys :: godot_method_bind , pub surface_get_arrays : * mut sys :: godot_method_bind , pub surface_get_blend_shape_arrays : * mut sys :: godot_method_bind , pub surface_get_material : * mut sys :: godot_method_bind , pub surface_set_material : * mut sys :: godot_method_bind } impl MeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshMethodTable = MeshMethodTable { class_constructor : None , create_convex_shape : 0 as * mut sys :: godot_method_bind , create_outline : 0 as * mut sys :: godot_method_bind , create_trimesh_shape : 0 as * mut sys :: godot_method_bind , generate_triangle_mesh : 0 as * mut sys :: godot_method_bind , get_aabb : 0 as * mut sys :: godot_method_bind , get_faces : 0 as * mut sys :: godot_method_bind , get_lightmap_size_hint : 0 as * mut sys :: godot_method_bind , get_surface_count : 0 as * mut sys :: godot_method_bind , set_lightmap_size_hint : 0 as * mut sys :: godot_method_bind , surface_get_arrays : 0 as * mut sys :: godot_method_bind , surface_get_blend_shape_arrays : 0 as * mut sys :: godot_method_bind , surface_get_material : 0 as * mut sys :: godot_method_bind , surface_set_material : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Mesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_convex_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_convex_shape\0" . as_ptr () as * const c_char) ; table . create_outline = (gd_api . godot_method_bind_get_method) (class_name , "create_outline\0" . as_ptr () as * const c_char) ; table . create_trimesh_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_shape\0" . as_ptr () as * const c_char) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\0" . as_ptr () as * const c_char) ; table . get_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_count\0" . as_ptr () as * const c_char) ; table . set_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_blend_shape_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_blend_shape_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_material\0" . as_ptr () as * const c_char) ; table . surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:994:16462 [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 TextureButton` inherits `BaseButton` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texturebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`TextureButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextureButton inherits methods from:\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureButton { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const SCALE : StretchMode = StretchMode (0i64) ; pub const TILE : StretchMode = StretchMode (1i64) ; pub const KEEP : StretchMode = StretchMode (2i64) ; pub const KEEP_CENTERED : StretchMode = StretchMode (3i64) ; pub const KEEP_ASPECT : StretchMode = StretchMode (4i64) ; pub const KEEP_ASPECT_CENTERED : StretchMode = StretchMode (5i64) ; pub const KEEP_ASPECT_COVERED : StretchMode = StretchMode (6i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureButton { pub const STRETCH_KEEP : i64 = 2i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 4i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 6i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 3i64 ; pub const STRETCH_SCALE : i64 = 0i64 ; pub const STRETCH_TILE : i64 = 1i64 ; } impl TextureButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes."] # [doc = ""] # [inline] pub fn click_mask (& self) -> Option < Ref < crate :: generated :: bit_map :: BitMap , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_click_mask ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: bit_map :: BitMap , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display when the node is disabled. See [member BaseButton.disabled]."] # [doc = ""] # [inline] pub fn disabled_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_disabled_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If `false`, the texture will not scale with the node."] # [doc = ""] # [inline] pub fn expand (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_expand ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Texture to display when the node has mouse or keyboard focus."] # [doc = ""] # [inline] pub fn focused_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_focused_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display when the mouse hovers the node."] # [doc = ""] # [inline] pub fn hover_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_hover_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state."] # [doc = ""] # [inline] pub fn normal_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_normal_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key."] # [doc = ""] # [inline] pub fn pressed_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_pressed_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Controls the texture's behavior when you resize the node's bounding rectangle, **only if** [member expand] is `true`. Set it to one of the [enum StretchMode] constants. See the constants to learn more."] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: texture_button :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: texture_button :: StretchMode (ret) } } # [doc = "Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes."] # [doc = ""] # [inline] pub fn set_click_mask (& self , mask : impl AsArg < crate :: generated :: bit_map :: BitMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_click_mask ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mask . as_arg_ptr ()) ; } } # [doc = "Texture to display when the node is disabled. See [member BaseButton.disabled]."] # [doc = ""] # [inline] pub fn set_disabled_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_disabled_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If `false`, the texture will not scale with the node."] # [doc = ""] # [inline] pub fn set_expand (& self , p_expand : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_expand ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , p_expand) ; } } # [doc = "Texture to display when the node has mouse or keyboard focus."] # [doc = ""] # [inline] pub fn set_focused_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_focused_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display when the mouse hovers the node."] # [doc = ""] # [inline] pub fn set_hover_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_hover_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state."] # [doc = ""] # [inline] pub fn set_normal_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_normal_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key."] # [doc = ""] # [inline] pub fn set_pressed_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_pressed_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Controls the texture's behavior when you resize the node's bounding rectangle, **only if** [member expand] is `true`. Set it to one of the [enum StretchMode] constants. See the constants to learn more."] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , p_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , p_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureButton { } unsafe impl GodotObject for TextureButton { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextureButton" } } impl QueueFree for TextureButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TextureButton { type Target = crate :: generated :: base_button :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: base_button :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: base_button :: BaseButton > for TextureButton { } unsafe impl SubClass < crate :: generated :: control :: Control > for TextureButton { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TextureButton { } unsafe impl SubClass < crate :: generated :: node :: Node > for TextureButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextureButton { } impl Instanciable for TextureButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { TextureButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_click_mask : * mut sys :: godot_method_bind , pub get_disabled_texture : * mut sys :: godot_method_bind , pub get_expand : * mut sys :: godot_method_bind , pub get_focused_texture : * mut sys :: godot_method_bind , pub get_hover_texture : * mut sys :: godot_method_bind , pub get_normal_texture : * mut sys :: godot_method_bind , pub get_pressed_texture : * mut sys :: godot_method_bind , pub get_stretch_mode : * mut sys :: godot_method_bind , pub set_click_mask : * mut sys :: godot_method_bind , pub set_disabled_texture : * mut sys :: godot_method_bind , pub set_expand : * mut sys :: godot_method_bind , pub set_focused_texture : * mut sys :: godot_method_bind , pub set_hover_texture : * mut sys :: godot_method_bind , pub set_normal_texture : * mut sys :: godot_method_bind , pub set_pressed_texture : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind } impl TextureButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureButtonMethodTable = TextureButtonMethodTable { class_constructor : None , get_click_mask : 0 as * mut sys :: godot_method_bind , get_disabled_texture : 0 as * mut sys :: godot_method_bind , get_expand : 0 as * mut sys :: godot_method_bind , get_focused_texture : 0 as * mut sys :: godot_method_bind , get_hover_texture : 0 as * mut sys :: godot_method_bind , get_normal_texture : 0 as * mut sys :: godot_method_bind , get_pressed_texture : 0 as * mut sys :: godot_method_bind , get_stretch_mode : 0 as * mut sys :: godot_method_bind , set_click_mask : 0 as * mut sys :: godot_method_bind , set_disabled_texture : 0 as * mut sys :: godot_method_bind , set_expand : 0 as * mut sys :: godot_method_bind , set_focused_texture : 0 as * mut sys :: godot_method_bind , set_hover_texture : 0 as * mut sys :: godot_method_bind , set_normal_texture : 0 as * mut sys :: godot_method_bind , set_pressed_texture : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TextureButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_click_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_click_mask\0" . as_ptr () as * const c_char) ; table . get_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_disabled_texture\0" . as_ptr () as * const c_char) ; table . get_expand = (gd_api . godot_method_bind_get_method) (class_name , "get_expand\0" . as_ptr () as * const c_char) ; table . get_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_focused_texture\0" . as_ptr () as * const c_char) ; table . get_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_hover_texture\0" . as_ptr () as * const c_char) ; table . get_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_texture\0" . as_ptr () as * const c_char) ; table . get_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_texture\0" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_click_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_click_mask\0" . as_ptr () as * const c_char) ; table . set_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled_texture\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_focused_texture\0" . as_ptr () as * const c_char) ; table . set_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_hover_texture\0" . as_ptr () as * const c_char) ; table . set_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_texture\0" . as_ptr () as * const c_char) ; table . set_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed_texture\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1006:7048 [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 PacketPeerDTLS` inherits `PacketPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packetpeerdtls.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerDTLS inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerDTLS { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const DISCONNECTED : Status = Status (0i64) ; pub const HANDSHAKING : Status = Status (1i64) ; pub const CONNECTED : Status = Status (2i64) ; pub const ERROR : Status = Status (3i64) ; pub const ERROR_HOSTNAME_MISMATCH : Status = Status (4i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PacketPeerDTLS { pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; } impl PacketPeerDTLS { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerDTLSMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Connects a `peer` beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If `validate_certs` is `true`, [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the `for_hostname` argument. You can specify a custom [X509Certificate] to use for validation via the `valid_certificate` argument.\n# Default Arguments\n* `validate_certs` - `true`\n* `for_hostname` - `\"\"`\n* `valid_certificate` - `null`"] # [doc = ""] # [inline] pub fn connect_to_peer (& self , packet_peer : impl AsArg < crate :: generated :: packet_peer_udp :: PacketPeerUDP > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . connect_to_peer ; let ret = crate :: icalls :: icallptr_i64_obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , packet_peer . as_arg_ptr () , validate_certs , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Disconnects this peer, terminating the DTLS session."] # [doc = ""] # [inline] pub fn disconnect_from_peer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . disconnect_from_peer ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [enum Status] for values."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: packet_peer_dtls :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: packet_peer_dtls :: Status (ret) } } # [doc = "Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerDTLS { } unsafe impl GodotObject for PacketPeerDTLS { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerDTLS" } } impl std :: ops :: Deref for PacketPeerDTLS { type Target = crate :: generated :: packet_peer :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerDTLS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: packet_peer :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeerDTLS { } impl Instanciable for PacketPeerDTLS { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PacketPeerDTLS :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerDTLSMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_peer : * mut sys :: godot_method_bind , pub disconnect_from_peer : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind } impl PacketPeerDTLSMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerDTLSMethodTable = PacketPeerDTLSMethodTable { class_constructor : None , connect_to_peer : 0 as * mut sys :: godot_method_bind , disconnect_from_peer : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PacketPeerDTLSMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerDTLS\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_peer = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_peer\0" . as_ptr () as * const c_char) ; table . disconnect_from_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_peer\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1012:6878 [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 StreamPeerBuffer` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_streampeerbuffer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerBuffer inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerBuffer { this : RawObject < Self > , } impl StreamPeerBuffer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerBufferMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn duplicate (& self) -> Option < Ref < crate :: generated :: stream_peer_buffer :: StreamPeerBuffer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: stream_peer_buffer :: StreamPeerBuffer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn data_array (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_data_array ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn resize (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . resize ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn seek (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data_array (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . set_data_array ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerBuffer { } unsafe impl GodotObject for StreamPeerBuffer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerBuffer" } } impl std :: ops :: Deref for StreamPeerBuffer { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerBuffer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerBuffer { } impl Instanciable for StreamPeerBuffer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StreamPeerBuffer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerBufferMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub duplicate : * mut sys :: godot_method_bind , pub get_data_array : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub resize : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_data_array : * mut sys :: godot_method_bind } impl StreamPeerBufferMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerBufferMethodTable = StreamPeerBufferMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , duplicate : 0 as * mut sys :: godot_method_bind , get_data_array : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , resize : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_data_array : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StreamPeerBufferMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerBuffer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . get_data_array = (gd_api . godot_method_bind_get_method) (class_name , "get_data_array\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_data_array = (gd_api . godot_method_bind_get_method) (class_name , "set_data_array\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1018:10664 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1024:3679 [INFO] [stdout] | [INFO] [stdout] 1024 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1024 | # [doc = "`core class VisualScriptExpression` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptExpression inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptExpression { this : RawObject < Self > , } impl VisualScriptExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptExpression { } unsafe impl GodotObject for VisualScriptExpression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptExpression" } } impl std :: ops :: Deref for VisualScriptExpression { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptExpression { } impl Instanciable for VisualScriptExpression { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptExpressionMethodTable = VisualScriptExpressionMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptExpression\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1030:10159 [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 RemoteTransform` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_remotetransform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RemoteTransform` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRemoteTransform inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RemoteTransform { this : RawObject < Self > , } impl RemoteTransform { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RemoteTransformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[RemoteTransform] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again."] # [doc = ""] # [inline] pub fn force_update_cache (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . force_update_cache ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene."] # [doc = ""] # [inline] pub fn remote_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_remote_node ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn update_position (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_position ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn update_rotation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_rotation ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn update_scale (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_scale ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn use_global_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_use_global_coordinates ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene."] # [doc = ""] # [inline] pub fn set_remote_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_remote_node ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn set_update_position (& self , update_remote_position : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_position ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_position) ; } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn set_update_rotation (& self , update_remote_rotation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_rotation ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation) ; } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn set_update_scale (& self , update_remote_scale : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_scale ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale) ; } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn set_use_global_coordinates (& self , use_global_coordinates : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_use_global_coordinates ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform { } unsafe impl GodotObject for RemoteTransform { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RemoteTransform" } } impl QueueFree for RemoteTransform { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RemoteTransform { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: node :: Node > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: object :: Object > for RemoteTransform { } impl Instanciable for RemoteTransform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RemoteTransform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RemoteTransformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_cache : * mut sys :: godot_method_bind , pub get_remote_node : * mut sys :: godot_method_bind , pub get_update_position : * mut sys :: godot_method_bind , pub get_update_rotation : * mut sys :: godot_method_bind , pub get_update_scale : * mut sys :: godot_method_bind , pub get_use_global_coordinates : * mut sys :: godot_method_bind , pub set_remote_node : * mut sys :: godot_method_bind , pub set_update_position : * mut sys :: godot_method_bind , pub set_update_rotation : * mut sys :: godot_method_bind , pub set_update_scale : * mut sys :: godot_method_bind , pub set_use_global_coordinates : * mut sys :: godot_method_bind } impl RemoteTransformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RemoteTransformMethodTable = RemoteTransformMethodTable { class_constructor : None , force_update_cache : 0 as * mut sys :: godot_method_bind , get_remote_node : 0 as * mut sys :: godot_method_bind , get_update_position : 0 as * mut sys :: godot_method_bind , get_update_rotation : 0 as * mut sys :: godot_method_bind , get_update_scale : 0 as * mut sys :: godot_method_bind , get_use_global_coordinates : 0 as * mut sys :: godot_method_bind , set_remote_node : 0 as * mut sys :: godot_method_bind , set_update_position : 0 as * mut sys :: godot_method_bind , set_update_rotation : 0 as * mut sys :: godot_method_bind , set_update_scale : 0 as * mut sys :: godot_method_bind , set_use_global_coordinates : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RemoteTransformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RemoteTransform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . force_update_cache = (gd_api . godot_method_bind_get_method) (class_name , "force_update_cache\0" . as_ptr () as * const c_char) ; table . get_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "get_remote_node\0" . as_ptr () as * const c_char) ; table . get_update_position = (gd_api . godot_method_bind_get_method) (class_name , "get_update_position\0" . as_ptr () as * const c_char) ; table . get_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_update_rotation\0" . as_ptr () as * const c_char) ; table . get_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_update_scale\0" . as_ptr () as * const c_char) ; table . get_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_global_coordinates\0" . as_ptr () as * const c_char) ; table . set_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_node\0" . as_ptr () as * const c_char) ; table . set_update_position = (gd_api . godot_method_bind_get_method) (class_name , "set_update_position\0" . as_ptr () as * const c_char) ; table . set_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_update_rotation\0" . as_ptr () as * const c_char) ; table . set_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_update_scale\0" . as_ptr () as * const c_char) ; table . set_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_global_coordinates\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1036:5412 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1042:3868 [INFO] [stdout] | [INFO] [stdout] 1042 | ...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] 1042 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1048:5411 [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 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1054:4054 [INFO] [stdout] | [INFO] [stdout] 1054 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1054 | # [doc = "`core class PHashTranslation` inherits `Translation` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_phashtranslation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPHashTranslation inherits methods from:\n - [Translation](struct.Translation.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PHashTranslation { this : RawObject < Self > , } impl PHashTranslation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PHashTranslationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Generates and sets an optimized translation from the given [Translation] resource."] # [doc = ""] # [inline] pub fn generate (& self , from : impl AsArg < crate :: generated :: translation :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PHashTranslationMethodTable :: get (get_api ()) . generate ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , from . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PHashTranslation { } unsafe impl GodotObject for PHashTranslation { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PHashTranslation" } } impl std :: ops :: Deref for PHashTranslation { type Target = crate :: generated :: translation :: Translation ; # [inline] fn deref (& self) -> & crate :: generated :: translation :: Translation { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PHashTranslation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: translation :: Translation { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: translation :: Translation > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: object :: Object > for PHashTranslation { } impl Instanciable for PHashTranslation { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PHashTranslation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PHashTranslationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate : * mut sys :: godot_method_bind } impl PHashTranslationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PHashTranslationMethodTable = PHashTranslationMethodTable { class_constructor : None , generate : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PHashTranslationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PHashTranslation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate = (gd_api . godot_method_bind_get_method) (class_name , "generate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1060:4202 [INFO] [stdout] | [INFO] [stdout] 1060 | ...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] 1060 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1066:4604 [INFO] [stdout] | [INFO] [stdout] 1066 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1066 | # [doc = "`core class VisualScriptVariableSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptvariableset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptVariableSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptVariableSet { this : RawObject < Self > , } impl VisualScriptVariableSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptVariableSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn variable (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableSetMethodTable :: get (get_api ()) . get_variable ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableSetMethodTable :: get (get_api ()) . set_variable ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptVariableSet { } unsafe impl GodotObject for VisualScriptVariableSet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptVariableSet" } } impl std :: ops :: Deref for VisualScriptVariableSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptVariableSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptVariableSet { } impl Instanciable for VisualScriptVariableSet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptVariableSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptVariableSetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_variable : * mut sys :: godot_method_bind , pub set_variable : * mut sys :: godot_method_bind } impl VisualScriptVariableSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptVariableSetMethodTable = VisualScriptVariableSetMethodTable { class_constructor : None , get_variable : 0 as * mut sys :: godot_method_bind , set_variable : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptVariableSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptVariableSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_variable = (gd_api . godot_method_bind_get_method) (class_name , "get_variable\0" . as_ptr () as * const c_char) ; table . set_variable = (gd_api . godot_method_bind_get_method) (class_name , "set_variable\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1072:21662 [INFO] [stdout] | [INFO] [stdout] 1072 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1072 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1078:3621 [INFO] [stdout] | [INFO] [stdout] 1078 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1078 | # [doc = "`core class AnimationNodeTimeSeek` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodetimeseek.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeTimeSeek inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeSeek { this : RawObject < Self > , } impl AnimationNodeTimeSeek { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeTimeSeekMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTimeSeek { } unsafe impl GodotObject for AnimationNodeTimeSeek { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTimeSeek" } } impl std :: ops :: Deref for AnimationNodeTimeSeek { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTimeSeek { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeTimeSeek { } impl Instanciable for AnimationNodeTimeSeek { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeTimeSeek :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeTimeSeekMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationNodeTimeSeekMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeTimeSeekMethodTable = AnimationNodeTimeSeekMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeTimeSeekMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeTimeSeek\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1084:6362 [INFO] [stdout] | [INFO] [stdout] 1084 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1084 | # [doc = "`core class FuncRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_funcref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nFuncRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FuncRef { this : RawObject < Self > , } impl FuncRef { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = FuncRefMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]."] # [doc = ""] # [inline] pub fn call_func (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . call_func ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } # [doc = "Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]."] # [doc = ""] # [inline] pub fn call_funcv (& self , arg_array : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . call_funcv ; let ret = crate :: icalls :: icallptr_var_arr (method_bind , self . this . sys () . as_ptr () , arg_array) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn function (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns whether the object still exists and has the function assigned."] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The name of the referenced function to call on the object, without parentheses or any parameters."] # [doc = ""] # [inline] pub fn set_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]."] # [doc = ""] # [inline] pub fn set_instance (& self , instance : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . set_instance ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FuncRef { } unsafe impl GodotObject for FuncRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "FuncRef" } } impl std :: ops :: Deref for FuncRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FuncRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for FuncRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for FuncRef { } impl Instanciable for FuncRef { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { FuncRef :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FuncRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub call_func : * mut sys :: godot_method_bind , pub call_funcv : * mut sys :: godot_method_bind , pub get_function : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind , pub set_instance : * mut sys :: godot_method_bind } impl FuncRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FuncRefMethodTable = FuncRefMethodTable { class_constructor : None , call_func : 0 as * mut sys :: godot_method_bind , call_funcv : 0 as * mut sys :: godot_method_bind , get_function : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind , set_instance : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { FuncRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FuncRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_func = (gd_api . godot_method_bind_get_method) (class_name , "call_func\0" . as_ptr () as * const c_char) ; table . call_funcv = (gd_api . godot_method_bind_get_method) (class_name , "call_funcv\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; table . set_instance = (gd_api . godot_method_bind_get_method) (class_name , "set_instance\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1090:3537 [INFO] [stdout] | [INFO] [stdout] 1090 | ...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] 1090 | # [doc = "`core class AnimationRootNode` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationrootnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationRootNode inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationRootNode { this : RawObject < Self > , } impl AnimationRootNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationRootNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationRootNode { } unsafe impl GodotObject for AnimationRootNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationRootNode" } } impl std :: ops :: Deref for AnimationRootNode { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationRootNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationRootNode { } impl Instanciable for AnimationRootNode { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationRootNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationRootNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationRootNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationRootNodeMethodTable = AnimationRootNodeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationRootNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationRootNode\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1096:4445 [INFO] [stdout] | [INFO] [stdout] 1096 | ...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] 1096 | # [doc = "`core class PopupDialog` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_popupdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`PopupDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopupDialog inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PopupDialog { this : RawObject < Self > , } impl PopupDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupDialog { } unsafe impl GodotObject for PopupDialog { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PopupDialog" } } impl QueueFree for PopupDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PopupDialog { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for PopupDialog { } unsafe impl SubClass < crate :: generated :: control :: Control > for PopupDialog { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PopupDialog { } unsafe impl SubClass < crate :: generated :: node :: Node > for PopupDialog { } unsafe impl SubClass < crate :: generated :: object :: Object > for PopupDialog { } impl Instanciable for PopupDialog { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PopupDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PopupDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupDialogMethodTable = PopupDialogMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PopupDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PopupDialog\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1102:6726 [INFO] [stdout] | [INFO] [stdout] 1102 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1102 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1108:15548 [INFO] [stdout] | [INFO] [stdout] 1108 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1108 | # [doc = "`core singleton class ARVRServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nARVRServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RotationMode (pub i64) ; impl RotationMode { pub const RESET_FULL_ROTATION : RotationMode = RotationMode (0i64) ; pub const RESET_BUT_KEEP_TILT : RotationMode = RotationMode (1i64) ; pub const DONT_RESET_ROTATION : RotationMode = RotationMode (2i64) ; } impl From < i64 > for RotationMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RotationMode > for i64 { # [inline] fn from (v : RotationMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackerType (pub i64) ; impl TrackerType { pub const CONTROLLER : TrackerType = TrackerType (1i64) ; pub const BASESTATION : TrackerType = TrackerType (2i64) ; pub const ANCHOR : TrackerType = TrackerType (4i64) ; pub const ANY_KNOWN : TrackerType = TrackerType (127i64) ; pub const UNKNOWN : TrackerType = TrackerType (128i64) ; pub const ANY : TrackerType = TrackerType (255i64) ; } impl From < i64 > for TrackerType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackerType > for i64 { # [inline] fn from (v : TrackerType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRServer { pub const DONT_RESET_ROTATION : i64 = 2i64 ; pub const RESET_BUT_KEEP_TILT : i64 = 1i64 ; pub const RESET_FULL_ROTATION : i64 = 0i64 ; pub const TRACKER_ANCHOR : i64 = 4i64 ; pub const TRACKER_ANY : i64 = 255i64 ; pub const TRACKER_ANY_KNOWN : i64 = 127i64 ; pub const TRACKER_BASESTATION : i64 = 2i64 ; pub const TRACKER_CONTROLLER : i64 = 1i64 ; pub const TRACKER_UNKNOWN : i64 = 128i64 ; } impl ARVRServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ARVRServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.\nFor platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.\nFor platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera.\nThis method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world.\nFor this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game.\nYou should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism."] # [doc = ""] # [inline] pub fn center_on_hmd (& self , rotation_mode : i64 , keep_height : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . center_on_hmd ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , rotation_mode , keep_height) ; } } # [doc = "Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it."] # [doc = ""] # [inline] pub fn find_interface (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . find_interface ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the primary interface's transformation."] # [doc = ""] # [inline] pub fn get_hmd_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_hmd_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the interface registered at a given index in our list of interfaces."] # [doc = ""] # [inline] pub fn get_interface (& self , idx : i64) -> Option < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interface ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns `true`."] # [doc = ""] # [inline] pub fn get_interface_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interface_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of available interfaces the ID and name of each interface."] # [doc = ""] # [inline] pub fn get_interfaces (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interfaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method OS.get_ticks_usec]."] # [doc = ""] # [inline] pub fn get_last_commit_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_commit_usec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing."] # [doc = ""] # [inline] pub fn get_last_frame_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_frame_usec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the absolute timestamp (in μs) of the last [ARVRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec]."] # [doc = ""] # [inline] pub fn get_last_process_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_process_usec ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The primary [ARVRInterface] currently bound to the [ARVRServer]."] # [doc = ""] # [inline] pub fn primary_interface (& self) -> Option < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_primary_interface ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_interface :: ARVRInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces."] # [doc = ""] # [inline] pub fn get_reference_frame (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_reference_frame ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the positional tracker at the given ID."] # [doc = ""] # [inline] pub fn get_tracker (& self , idx : i64) -> Option < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_tracker ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of trackers currently registered."] # [doc = ""] # [inline] pub fn get_tracker_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_tracker_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter."] # [doc = ""] # [inline] pub fn world_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_world_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The primary [ARVRInterface] currently bound to the [ARVRServer]."] # [doc = ""] # [inline] pub fn set_primary_interface (& self , interface : impl AsArg < crate :: generated :: arvr_interface :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_primary_interface ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , interface . as_arg_ptr ()) ; } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter."] # [doc = ""] # [inline] pub fn set_world_scale (& self , arg0 : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_world_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , arg0) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRServer { } unsafe impl GodotObject for ARVRServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRServer" } } impl std :: ops :: Deref for ARVRServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRServer { } unsafe impl Send for ARVRServer { } unsafe impl Sync for ARVRServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub center_on_hmd : * mut sys :: godot_method_bind , pub find_interface : * mut sys :: godot_method_bind , pub get_hmd_transform : * mut sys :: godot_method_bind , pub get_interface : * mut sys :: godot_method_bind , pub get_interface_count : * mut sys :: godot_method_bind , pub get_interfaces : * mut sys :: godot_method_bind , pub get_last_commit_usec : * mut sys :: godot_method_bind , pub get_last_frame_usec : * mut sys :: godot_method_bind , pub get_last_process_usec : * mut sys :: godot_method_bind , pub get_primary_interface : * mut sys :: godot_method_bind , pub get_reference_frame : * mut sys :: godot_method_bind , pub get_tracker : * mut sys :: godot_method_bind , pub get_tracker_count : * mut sys :: godot_method_bind , pub get_world_scale : * mut sys :: godot_method_bind , pub set_primary_interface : * mut sys :: godot_method_bind , pub set_world_scale : * mut sys :: godot_method_bind } impl ARVRServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRServerMethodTable = ARVRServerMethodTable { class_constructor : None , center_on_hmd : 0 as * mut sys :: godot_method_bind , find_interface : 0 as * mut sys :: godot_method_bind , get_hmd_transform : 0 as * mut sys :: godot_method_bind , get_interface : 0 as * mut sys :: godot_method_bind , get_interface_count : 0 as * mut sys :: godot_method_bind , get_interfaces : 0 as * mut sys :: godot_method_bind , get_last_commit_usec : 0 as * mut sys :: godot_method_bind , get_last_frame_usec : 0 as * mut sys :: godot_method_bind , get_last_process_usec : 0 as * mut sys :: godot_method_bind , get_primary_interface : 0 as * mut sys :: godot_method_bind , get_reference_frame : 0 as * mut sys :: godot_method_bind , get_tracker : 0 as * mut sys :: godot_method_bind , get_tracker_count : 0 as * mut sys :: godot_method_bind , get_world_scale : 0 as * mut sys :: godot_method_bind , set_primary_interface : 0 as * mut sys :: godot_method_bind , set_world_scale : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ARVRServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . center_on_hmd = (gd_api . godot_method_bind_get_method) (class_name , "center_on_hmd\0" . as_ptr () as * const c_char) ; table . find_interface = (gd_api . godot_method_bind_get_method) (class_name , "find_interface\0" . as_ptr () as * const c_char) ; table . get_hmd_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_hmd_transform\0" . as_ptr () as * const c_char) ; table . get_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_interface\0" . as_ptr () as * const c_char) ; table . get_interface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_interface_count\0" . as_ptr () as * const c_char) ; table . get_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_interfaces\0" . as_ptr () as * const c_char) ; table . get_last_commit_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_commit_usec\0" . as_ptr () as * const c_char) ; table . get_last_frame_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_frame_usec\0" . as_ptr () as * const c_char) ; table . get_last_process_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_process_usec\0" . as_ptr () as * const c_char) ; table . get_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_primary_interface\0" . as_ptr () as * const c_char) ; table . get_reference_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_frame\0" . as_ptr () as * const c_char) ; table . get_tracker = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker\0" . as_ptr () as * const c_char) ; table . get_tracker_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_count\0" . as_ptr () as * const c_char) ; table . get_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_world_scale\0" . as_ptr () as * const c_char) ; table . set_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "set_primary_interface\0" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1114:11026 [INFO] [stdout] | [INFO] [stdout] 1114 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1114 | # [doc = "`core class 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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1120:4567 [INFO] [stdout] | [INFO] [stdout] 1120 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1120 | # [doc = "`core class VisualScriptSceneNode` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptscenenode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSceneNode inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSceneNode { this : RawObject < Self > , } impl VisualScriptSceneNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSceneNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn node_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_path (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . set_node_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSceneNode { } unsafe impl GodotObject for VisualScriptSceneNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneNode" } } impl std :: ops :: Deref for VisualScriptSceneNode { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSceneNode { } impl Instanciable for VisualScriptSceneNode { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSceneNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSceneNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_node_path : * mut sys :: godot_method_bind , pub set_node_path : * mut sys :: godot_method_bind } impl VisualScriptSceneNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSceneNodeMethodTable = VisualScriptSceneNodeMethodTable { class_constructor : None , get_node_path : 0 as * mut sys :: godot_method_bind , set_node_path : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSceneNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSceneNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . set_node_path = (gd_api . godot_method_bind_get_method) (class_name , "set_node_path\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1126:3553 [INFO] [stdout] | [INFO] [stdout] 1126 | ...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] 1126 | # [doc = "`core class VisualScriptSelf` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptself.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSelf inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSelf { this : RawObject < Self > , } impl VisualScriptSelf { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSelfMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSelf { } unsafe impl GodotObject for VisualScriptSelf { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSelf" } } impl std :: ops :: Deref for VisualScriptSelf { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSelf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSelf { } impl Instanciable for VisualScriptSelf { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSelf :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSelfMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSelfMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSelfMethodTable = VisualScriptSelfMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSelfMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSelf\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1132:5711 [INFO] [stdout] | [INFO] [stdout] 1132 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1132 | # [doc = "`core class VisualShaderNodeTransformMult` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetransformmult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformMult inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformMult { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const AXB : Operator = Operator (0i64) ; pub const BXA : Operator = Operator (1i64) ; pub const AXB_COMP : Operator = Operator (2i64) ; pub const BXA_COMP : Operator = Operator (3i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformMult { pub const OP_AxB : i64 = 0i64 ; pub const OP_AxB_COMP : i64 = 2i64 ; pub const OP_BxA : i64 = 1i64 ; pub const OP_BxA_COMP : i64 = 3i64 ; } impl VisualShaderNodeTransformMult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformMultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The multiplication type to be performed on the transforms. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_transform_mult :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformMultMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_transform_mult :: Operator (ret) } } # [doc = "The multiplication type to be performed on the transforms. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformMultMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformMult { } unsafe impl GodotObject for VisualShaderNodeTransformMult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformMult" } } impl std :: ops :: Deref for VisualShaderNodeTransformMult { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformMult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformMult { } impl Instanciable for VisualShaderNodeTransformMult { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformMult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformMultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformMultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformMultMethodTable = VisualShaderNodeTransformMultMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformMultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformMult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1138:10367 [INFO] [stdout] | [INFO] [stdout] 1138 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1138 | # [doc = "`core class 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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1144:4062 [INFO] [stdout] | [INFO] [stdout] 1144 | ...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] 1144 | # [doc = "`core class VisualShaderNodeColorUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodecoloruniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorUniform { this : RawObject < Self > , } impl VisualShaderNodeColorUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorUniform { } unsafe impl GodotObject for VisualShaderNodeColorUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorUniform" } } impl std :: ops :: Deref for VisualShaderNodeColorUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeColorUniform { } impl Instanciable for VisualShaderNodeColorUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeColorUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeColorUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorUniformMethodTable = VisualShaderNodeColorUniformMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorUniform\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1150:4150 [INFO] [stdout] | [INFO] [stdout] 1150 | ...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] 1150 | # [doc = "`core class VisualShaderNodeTransformUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetransformuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformUniform { this : RawObject < Self > , } impl VisualShaderNodeTransformUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformUniform { } unsafe impl GodotObject for VisualShaderNodeTransformUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformUniform" } } impl std :: ops :: Deref for VisualShaderNodeTransformUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformUniform { } impl Instanciable for VisualShaderNodeTransformUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTransformUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformUniformMethodTable = VisualShaderNodeTransformUniformMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformUniform\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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1156:3847 [INFO] [stdout] | [INFO] [stdout] 1156 | ...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] 1156 | # [doc = "`core class VisualShaderNodeVectorDistance` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectordistance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorDistance inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDistance { this : RawObject < Self > , } impl VisualShaderNodeVectorDistance { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorDistanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDistance { } unsafe impl GodotObject for VisualShaderNodeVectorDistance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDistance" } } impl std :: ops :: Deref for VisualShaderNodeVectorDistance { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDistance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorDistance { } impl Instanciable for VisualShaderNodeVectorDistance { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorDistance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorDistanceMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorDistanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorDistanceMethodTable = VisualShaderNodeVectorDistanceMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorDistanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorDistance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1162:14674 [INFO] [stdout] | [INFO] [stdout] 1162 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1162 | # [doc = "`core class Light` inherits `VisualInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_light.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nLight inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Light { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeMode (pub i64) ; impl BakeMode { pub const DISABLED : BakeMode = BakeMode (0i64) ; pub const INDIRECT : BakeMode = BakeMode (1i64) ; pub const ALL : BakeMode = BakeMode (2i64) ; } impl From < i64 > for BakeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeMode > for i64 { # [inline] fn from (v : BakeMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const ENERGY : Param = Param (0i64) ; pub const INDIRECT_ENERGY : Param = Param (1i64) ; pub const SPECULAR : Param = Param (2i64) ; pub const RANGE : Param = Param (3i64) ; pub const ATTENUATION : Param = Param (4i64) ; pub const SPOT_ANGLE : Param = Param (5i64) ; pub const SPOT_ATTENUATION : Param = Param (6i64) ; pub const CONTACT_SHADOW_SIZE : Param = Param (7i64) ; pub const SHADOW_MAX_DISTANCE : Param = Param (8i64) ; pub const SHADOW_SPLIT_1_OFFSET : Param = Param (9i64) ; pub const SHADOW_SPLIT_2_OFFSET : Param = Param (10i64) ; pub const SHADOW_SPLIT_3_OFFSET : Param = Param (11i64) ; pub const SHADOW_NORMAL_BIAS : Param = Param (12i64) ; pub const SHADOW_BIAS : Param = Param (13i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : Param = Param (14i64) ; pub const MAX : Param = Param (15i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light { pub const BAKE_ALL : i64 = 2i64 ; pub const BAKE_DISABLED : i64 = 0i64 ; pub const BAKE_INDIRECT : i64 = 1i64 ; pub const PARAM_ATTENUATION : i64 = 4i64 ; pub const PARAM_CONTACT_SHADOW_SIZE : i64 = 7i64 ; pub const PARAM_ENERGY : i64 = 0i64 ; pub const PARAM_INDIRECT_ENERGY : i64 = 1i64 ; pub const PARAM_MAX : i64 = 15i64 ; pub const PARAM_RANGE : i64 = 3i64 ; pub const PARAM_SHADOW_BIAS : i64 = 13i64 ; pub const PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 14i64 ; pub const PARAM_SHADOW_MAX_DISTANCE : i64 = 8i64 ; pub const PARAM_SHADOW_NORMAL_BIAS : i64 = 12i64 ; pub const PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 9i64 ; pub const PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 10i64 ; pub const PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 11i64 ; pub const PARAM_SPECULAR : i64 = 2i64 ; pub const PARAM_SPOT_ANGLE : i64 = 5i64 ; pub const PARAM_SPOT_ATTENUATION : i64 = 6i64 ; } impl Light { # [doc = "The light's bake mode. See [enum BakeMode]."] # [doc = ""] # [inline] pub fn bake_mode (& self) -> crate :: generated :: light :: BakeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_bake_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: light :: BakeMode (ret) } } # [doc = "The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy]."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The light will affect objects in the selected layers."] # [doc = ""] # [inline] pub fn cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_cull_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Attempts to reduce [member shadow_bias] gap."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "The color of shadows cast by this light."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]."] # [doc = ""] # [inline] pub fn shadow_reverse_cull_face (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_shadow_reverse_cull_face ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the light will cast shadows."] # [doc = ""] # [inline] pub fn has_shadow (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . has_shadow ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the light only appears in the editor and will not be visible at runtime."] # [doc = ""] # [inline] pub fn is_editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . is_editor_only ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the light's effect is reversed, darkening areas and casting bright shadows."] # [doc = ""] # [inline] pub fn is_negative (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . is_negative ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The light's bake mode. See [enum BakeMode]."] # [doc = ""] # [inline] pub fn set_bake_mode (& self , bake_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_bake_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , bake_mode) ; } } # [doc = "The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy]."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The light will affect objects in the selected layers."] # [doc = ""] # [inline] pub fn set_cull_mask (& self , cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_cull_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cull_mask) ; } } # [doc = "If `true`, the light only appears in the editor and will not be visible at runtime."] # [doc = ""] # [inline] pub fn set_editor_only (& self , editor_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editor_only) ; } } # [doc = "If `true`, the light's effect is reversed, darkening areas and casting bright shadows."] # [doc = ""] # [inline] pub fn set_negative (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_negative ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Attempts to reduce [member shadow_bias] gap."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "If `true`, the light will cast shadows."] # [doc = ""] # [inline] pub fn set_shadow (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The color of shadows cast by this light."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , shadow_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , shadow_color) ; } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]."] # [doc = ""] # [inline] pub fn set_shadow_reverse_cull_face (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow_reverse_cull_face ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light { } unsafe impl GodotObject for Light { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Light" } } impl QueueFree for Light { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Light { type Target = crate :: generated :: visual_instance :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_instance :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for Light { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Light { } unsafe impl SubClass < crate :: generated :: node :: Node > for Light { } unsafe impl SubClass < crate :: generated :: object :: Object > for Light { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bake_mode : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_cull_mask : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_reverse_cull_face : * mut sys :: godot_method_bind , pub has_shadow : * mut sys :: godot_method_bind , pub is_editor_only : * mut sys :: godot_method_bind , pub is_negative : * mut sys :: godot_method_bind , pub set_bake_mode : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_cull_mask : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind , pub set_negative : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_shadow : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_reverse_cull_face : * mut sys :: godot_method_bind } impl LightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LightMethodTable = LightMethodTable { class_constructor : None , get_bake_mode : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_cull_mask : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_reverse_cull_face : 0 as * mut sys :: godot_method_bind , has_shadow : 0 as * mut sys :: godot_method_bind , is_editor_only : 0 as * mut sys :: godot_method_bind , is_negative : 0 as * mut sys :: godot_method_bind , set_bake_mode : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_cull_mask : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind , set_negative : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_shadow : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_reverse_cull_face : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { LightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Light\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_mode\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_reverse_cull_face = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_reverse_cull_face\0" . as_ptr () as * const c_char) ; table . has_shadow = (gd_api . godot_method_bind_get_method) (class_name , "has_shadow\0" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\0" . as_ptr () as * const c_char) ; table . is_negative = (gd_api . godot_method_bind_get_method) (class_name , "is_negative\0" . as_ptr () as * const c_char) ; table . set_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_mode\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; table . set_negative = (gd_api . godot_method_bind_get_method) (class_name , "set_negative\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_reverse_cull_face = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_reverse_cull_face\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1174:21076 [INFO] [stdout] | [INFO] [stdout] 1174 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1174 | # [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/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1180:9007 [INFO] [stdout] | [INFO] [stdout] 1180 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1180 | # [doc = "`core class MultiMeshInstance2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_multimeshinstance2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`MultiMeshInstance2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMultiMeshInstance2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiMeshInstance2D { this : RawObject < Self > , } impl MultiMeshInstance2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiMeshInstance2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn multimesh (& self) -> Option < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_multimesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: multi_mesh :: MultiMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn set_multimesh (& self , multimesh : impl AsArg < crate :: generated :: multi_mesh :: MultiMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_multimesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , multimesh . as_arg_ptr ()) ; } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMeshInstance2D { } unsafe impl GodotObject for MultiMeshInstance2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MultiMeshInstance2D" } } impl QueueFree for MultiMeshInstance2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MultiMeshInstance2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiMeshInstance2D { } impl Instanciable for MultiMeshInstance2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MultiMeshInstance2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiMeshInstance2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_multimesh : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub set_multimesh : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl MultiMeshInstance2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiMeshInstance2DMethodTable = MultiMeshInstance2DMethodTable { class_constructor : None , get_multimesh : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , set_multimesh : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MultiMeshInstance2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiMeshInstance2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "get_multimesh\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . set_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "set_multimesh\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/gdnative-bindings-lily-583f230823c86397/out/generated.rs:1186:9259 [INFO] [stdout] | [INFO] [stdout] 1186 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1186 | # [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) ; } } } [WARN] too much data in the log, truncating it